1Feature: Interactive session shell
2
3 The interactive session provides a single, cohesive terminal interface
4 for all of keld's interactive flows. It manages the visual frame —
5 theme, help bar, breadcrumb, and cancellation — so that individual
6 screens do not have to.
7
8 Rule: The interface runs as a single continuous terminal session
9
10 Scenario: Transitioning between screens
11 Given the user launches keld interactively
12 When they progress from one screen to the next
13 Then the interface transitions directly without returning to the shell
14
15 Rule: The terminal background is detected once and determines the colour palette
16
17 Scenario: Dark terminal
18 Given the terminal has a dark background
19 When the session starts
20 Then the dark colour palette is used for all screens
21
22 Scenario: Light terminal
23 Given the terminal has a light background
24 When the session starts
25 Then the light colour palette is used for all screens
26
27 Scenario: Background detection is unavailable
28 Given the terminal background cannot be detected
29 When the session starts
30 Then the dark colour palette is used as a default
31
32 Rule: Colour is used intentionally to highlight actionable elements
33
34 Scenario: Body text uses the terminal's default foreground
35 Given any screen in the session
36 Then descriptive and body text is not styled with a custom colour
37
38 Scenario: No text is rendered in a muted or dim style
39 Given any screen in the session
40 Then all text is rendered at full brightness
41
42 Rule: A help bar at the bottom shows available key bindings for the current screen
43
44 Scenario: Help bar reflects the current screen
45 Given the user is on any screen
46 Then the help bar shows the key bindings relevant to that screen
47 And the help bar uses the same visual format on every screen
48
49 Rule: The highlighted item in any list is indicated with a consistent cursor
50
51 Scenario: Cursor on a selectable list
52 Given any screen with a selectable list
53 Then the highlighted item is marked with a consistent visual indicator
54
55 Rule: A breadcrumb at the top shows the path of selections made so far
56
57 Scenario: No breadcrumb on the first screen
58 Given the user is on the command menu
59 Then no breadcrumb is displayed
60
61 Scenario: Breadcrumb builds as selections are made
62 Given the user has selected a command and a preset
63 When they reach a command-specific screen
64 Then the breadcrumb shows their prior selections in order
65
66 Scenario: Breadcrumb updates on back navigation
67 Given the user has progressed several screens into a flow
68 When they navigate back one step
69 Then the breadcrumb removes the most recent selection
70
71 Rule: The current screen's title is displayed below the breadcrumb
72
73 Scenario: Screen title is always visible
74 Given the user is on any screen
75 Then the screen's title is displayed below the breadcrumb
76
77 Rule: Ctrl+C exits the session cleanly from any screen
78
79 Scenario: Cancelling during a flow
80 Given the user is on any screen
81 When they press Ctrl+C
82 Then the session exits without executing restic