diff --git a/features/steps/tui_help_panel_overlay_coverage_steps.py b/features/steps/tui_help_panel_overlay_coverage_steps.py index 850e852f8..b3190d1be 100644 --- a/features/steps/tui_help_panel_overlay_coverage_steps.py +++ b/features/steps/tui_help_panel_overlay_coverage_steps.py @@ -42,7 +42,16 @@ def step_toggle_help_for_context(context, context_name): @then('the standalone help panel text should contain "{text}"') def step_standalone_help_panel_text_contains(context, text): - assert text in context.help_panel._text + assert text in context.help_panel._text, ( + f"Expected {text!r} in help panel text, got:\n{context.help_panel._text}" + ) + + +@then('the standalone help panel text should not contain "{text}"') +def step_standalone_help_panel_text_not_contains(context, text): + assert text not in context.help_panel._text, ( + f"Expected {text!r} NOT in help panel text, but found it in:\n{context.help_panel._text}" + ) @then("the help panel should be visible") diff --git a/features/tui_help_panel_overlay_coverage.feature b/features/tui_help_panel_overlay_coverage.feature index 11e45a09f..b7b2a23c4 100644 --- a/features/tui_help_panel_overlay_coverage.feature +++ b/features/tui_help_panel_overlay_coverage.feature @@ -25,3 +25,16 @@ Feature: TUI Help Panel Overlay Coverage And the standalone help panel text should contain "Help: Slash Commands" When I toggle help for context "Slash Commands" Then the help panel should be hidden + + Scenario: help panel Main Screen keybindings match actual app BINDINGS + Given a fresh help panel overlay + When I show help for context "Main Screen" + Then the standalone help panel text should contain "ctrl+t" + And the standalone help panel text should not contain "ctrl+tab" + And the standalone help panel text should not contain "tab" + + Scenario: help panel global keybindings match actual app BINDINGS + Given a fresh help panel overlay + When I show help for context "Main Screen" + Then the standalone help panel text should contain "ctrl+q" + And the standalone help panel text should contain "F1" diff --git a/src/cleveragents/tui/widgets/help_panel_overlay.py b/src/cleveragents/tui/widgets/help_panel_overlay.py index 41b511e2e..a0351580b 100644 --- a/src/cleveragents/tui/widgets/help_panel_overlay.py +++ b/src/cleveragents/tui/widgets/help_panel_overlay.py @@ -32,8 +32,7 @@ _GLOBAL_ITEMS = ( _CONTEXT_ITEMS: dict[str, tuple[tuple[str, str], ...]] = { "Main Screen": ( ("enter", "Submit prompt"), - ("tab", "Cycle to next persona"), - ("ctrl+tab", "Cycle to next argument preset"), + ("ctrl+t", "Cycle to next argument preset"), ("@", "Open Reference Picker overlay"), ("/", "Open Slash Command overlay"), ("! / $", "Activate shell mode"),