fix(tui): synchronize HelpPanelOverlay keybinding display with actual app BINDINGS

Reviewed and APPROVED. Closes #3444.
This commit is contained in:
2026-04-05 21:06:53 +00:00
committed by Forgejo
3 changed files with 24 additions and 3 deletions
@@ -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")
@@ -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"
@@ -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"),