UAT: TUI HelpPanelOverlay shows ctrl+tab for preset cycling but actual app binding is ctrl+t — help panel displays incorrect hotkeys #3444

Closed
opened 2026-04-05 16:52:21 +00:00 by freemo · 4 comments
Owner

Metadata

  • Branch: fix/tui-help-panel-keybinding-accuracy
  • Commit Message: fix(tui): synchronize HelpPanelOverlay keybinding display with actual app BINDINGS
  • Milestone: (none — backlog)
  • Parent Epic: #868

Backlog note: This issue was discovered during autonomous operation
on milestone v3.7.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Background and Context

Cross-referencing src/cleveragents/tui/widgets/help_panel_overlay.py against src/cleveragents/tui/app.py revealed that the help panel (F1) displays a keybinding (ctrl+tab) for preset cycling that does not match the actual registered application binding (ctrl+t). This creates a double-inconsistency: the app binding is wrong vs. the spec (tracked in #3316), and the help panel is wrong vs. the app — meaning users who follow the help panel instructions will press the wrong key and get no response.

Per ADR-044, the help panel should "dynamically reflect the current context's available hotkeys." A static _CONTEXT_ITEMS dict that is not kept in sync with BINDINGS violates this requirement and actively misleads users.

Related issues:

  • #3316 — App uses ctrl+t instead of spec-correct ctrl+tab for preset cycling
  • #3338 — Help panel shows tab for persona cycling, but no tab binding exists in BINDINGS

Expected Behavior (from spec)

Per ADR-044, the help panel content must accurately describe the actual keybindings registered in the application. The _CONTEXT_ITEMS dict in HelpPanelOverlay must be kept in sync with BINDINGS in app.py. For preset cycling, the help panel should display whichever binding is actually registered — currently ctrl+t.

Actual Behavior

src/cleveragents/tui/widgets/help_panel_overlay.py (line 36) shows:

_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"),  # ← shows ctrl+tab
        ...
    ),
    ...
}

src/cleveragents/tui/app.py (line 95) has:

BINDINGS: ClassVar[list[tuple[str, str, str]]] = [
    ("ctrl+q", "quit", "Quit"),
    ("f1", "help", "Help"),
    ("ctrl+t", "cycle_preset", "Cycle Preset"),  # ← actual binding is ctrl+t, not ctrl+tab
]

Impact:

  1. The help panel tells users to press ctrl+tab to cycle presets, but the actual binding is ctrl+t
  2. Users who follow the help panel instructions press the wrong key and get no response
  3. The help panel is inconsistent with the actual application state

Note: The spec-correct binding is ctrl+tab (per ADR-045), but the app currently uses ctrl+t (tracked in #3316). This issue is specifically about the help panel being inconsistent with the actual (incorrect) binding, creating a double-inconsistency.

Code Locations

  • src/cleveragents/tui/widgets/help_panel_overlay.py line 36: ("ctrl+tab", "Cycle to next argument preset") — shows ctrl+tab
  • src/cleveragents/tui/app.py line 95: ("ctrl+t", "cycle_preset", "Cycle Preset") — actual binding is ctrl+t

Steps to Reproduce

  1. In the TUI, press F1 to open the help panel
  2. Observe: Help panel shows ctrl+tab for preset cycling
  3. Press ctrl+tab — nothing happens (binding is actually ctrl+t)
  4. Press ctrl+t — preset cycles (actual binding)
  5. The help panel is actively misleading users

Subtasks

  • Update _CONTEXT_ITEMS in src/cleveragents/tui/widgets/help_panel_overlay.py line 36 to display ctrl+t instead of ctrl+tab for preset cycling, matching the actual BINDINGS in app.py
  • Audit all other entries in _CONTEXT_ITEMS against BINDINGS in app.py to identify any additional mismatches (see also #3338 for the tab/persona cycling discrepancy)
  • Consider refactoring HelpPanelOverlay to derive its displayed keybindings dynamically from app.BINDINGS rather than a static _CONTEXT_ITEMS dict, to prevent future drift (per ADR-044's "dynamically reflect" requirement)
  • Add Behave BDD scenario asserting that the help panel's displayed keybindings match the registered BINDINGS in app.py
  • Verify nox -e typecheck passes (Pyright — no # type: ignore suppressions)
  • Verify coverage >= 97% via nox -e coverage_report
  • Run full nox suite (all default sessions) and fix any errors

Definition of Done

  • HelpPanelOverlay displays ctrl+t (not ctrl+tab) for preset cycling, matching the actual app.BINDINGS
  • All entries in _CONTEXT_ITEMS are verified to match the actual registered bindings in app.py
  • A Behave BDD scenario exists asserting help panel keybinding accuracy against app.BINDINGS
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional details about the implementation
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Branch**: `fix/tui-help-panel-keybinding-accuracy` - **Commit Message**: `fix(tui): synchronize HelpPanelOverlay keybinding display with actual app BINDINGS` - **Milestone**: *(none — backlog)* - **Parent Epic**: #868 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context Cross-referencing `src/cleveragents/tui/widgets/help_panel_overlay.py` against `src/cleveragents/tui/app.py` revealed that the help panel (`F1`) displays a keybinding (`ctrl+tab`) for preset cycling that does not match the actual registered application binding (`ctrl+t`). This creates a double-inconsistency: the app binding is wrong vs. the spec (tracked in #3316), and the help panel is wrong vs. the app — meaning users who follow the help panel instructions will press the wrong key and get no response. Per **ADR-044**, the help panel should "dynamically reflect the current context's available hotkeys." A static `_CONTEXT_ITEMS` dict that is not kept in sync with `BINDINGS` violates this requirement and actively misleads users. **Related issues:** - #3316 — App uses `ctrl+t` instead of spec-correct `ctrl+tab` for preset cycling - #3338 — Help panel shows `tab` for persona cycling, but no `tab` binding exists in `BINDINGS` ## Expected Behavior (from spec) Per ADR-044, the help panel content must accurately describe the **actual** keybindings registered in the application. The `_CONTEXT_ITEMS` dict in `HelpPanelOverlay` must be kept in sync with `BINDINGS` in `app.py`. For preset cycling, the help panel should display whichever binding is actually registered — currently `ctrl+t`. ## Actual Behavior **`src/cleveragents/tui/widgets/help_panel_overlay.py`** (line 36) shows: ```python _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"), # ← shows ctrl+tab ... ), ... } ``` **`src/cleveragents/tui/app.py`** (line 95) has: ```python BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), # ← actual binding is ctrl+t, not ctrl+tab ] ``` **Impact:** 1. The help panel tells users to press `ctrl+tab` to cycle presets, but the actual binding is `ctrl+t` 2. Users who follow the help panel instructions press the wrong key and get no response 3. The help panel is inconsistent with the actual application state **Note:** The spec-correct binding is `ctrl+tab` (per ADR-045), but the app currently uses `ctrl+t` (tracked in #3316). This issue is specifically about the help panel being inconsistent with the *actual* (incorrect) binding, creating a double-inconsistency. ## Code Locations - `src/cleveragents/tui/widgets/help_panel_overlay.py` line 36: `("ctrl+tab", "Cycle to next argument preset")` — shows `ctrl+tab` - `src/cleveragents/tui/app.py` line 95: `("ctrl+t", "cycle_preset", "Cycle Preset")` — actual binding is `ctrl+t` ## Steps to Reproduce 1. In the TUI, press `F1` to open the help panel 2. Observe: Help panel shows `ctrl+tab` for preset cycling 3. Press `ctrl+tab` — nothing happens (binding is actually `ctrl+t`) 4. Press `ctrl+t` — preset cycles (actual binding) 5. The help panel is actively misleading users ## Subtasks - [ ] Update `_CONTEXT_ITEMS` in `src/cleveragents/tui/widgets/help_panel_overlay.py` line 36 to display `ctrl+t` instead of `ctrl+tab` for preset cycling, matching the actual `BINDINGS` in `app.py` - [ ] Audit all other entries in `_CONTEXT_ITEMS` against `BINDINGS` in `app.py` to identify any additional mismatches (see also #3338 for the `tab`/persona cycling discrepancy) - [ ] Consider refactoring `HelpPanelOverlay` to derive its displayed keybindings dynamically from `app.BINDINGS` rather than a static `_CONTEXT_ITEMS` dict, to prevent future drift (per ADR-044's "dynamically reflect" requirement) - [ ] Add Behave BDD scenario asserting that the help panel's displayed keybindings match the registered `BINDINGS` in `app.py` - [ ] Verify `nox -e typecheck` passes (Pyright — no `# type: ignore` suppressions) - [ ] Verify coverage >= 97% via `nox -e coverage_report` - [ ] Run full `nox` suite (all default sessions) and fix any errors ## Definition of Done - [ ] `HelpPanelOverlay` displays `ctrl+t` (not `ctrl+tab`) for preset cycling, matching the actual `app.BINDINGS` - [ ] All entries in `_CONTEXT_ITEMS` are verified to match the actual registered bindings in `app.py` - [ ] A Behave BDD scenario exists asserting help panel keybinding accuracy against `app.BINDINGS` - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional details about the implementation - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 17:06:15 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog (confirmed) — TUI help panel keybinding mismatch. Cosmetic UX issue, does not block functionality.
  • Milestone: v3.7.0 (TUI Implementation)
  • Story Points: 2 (S) — Simple string update + audit of static dict entries
  • MoSCoW: Could Have — Nice-to-have UX polish. The help panel is functional, just displays wrong hotkey for one binding.
  • Parent Epic: #868 (TUI Interface, Modals and Persona System)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog (confirmed) — TUI help panel keybinding mismatch. Cosmetic UX issue, does not block functionality. - **Milestone**: v3.7.0 (TUI Implementation) - **Story Points**: 2 (S) — Simple string update + audit of static dict entries - **MoSCoW**: Could Have — Nice-to-have UX polish. The help panel is functional, just displays wrong hotkey for one binding. - **Parent Epic**: #868 (TUI Interface, Modals and Persona System) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

PR #3471 created on branch fix/tui-help-panel-keybinding-accuracy. I will monitor and handle all review feedback until merged.

Implementation summary:

  • Fixed ctrl+tabctrl+t in _CONTEXT_ITEMS Main Screen context to match actual app.BINDINGS
  • Removed stale tab/persona cycling entry (no such binding in BINDINGS; tracked in #3338)
  • Added 2 new BDD scenarios asserting keybinding accuracy
  • Added should not contain step definition for negative assertions
  • nox -e lint passed | nox -e typecheck passed (0 errors)

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

PR #3471 created on branch `fix/tui-help-panel-keybinding-accuracy`. I will monitor and handle all review feedback until merged. **Implementation summary:** - Fixed `ctrl+tab` → `ctrl+t` in `_CONTEXT_ITEMS` Main Screen context to match actual `app.BINDINGS` - Removed stale `tab`/persona cycling entry (no such binding in `BINDINGS`; tracked in #3338) - Added 2 new BDD scenarios asserting keybinding accuracy - Added `should not contain` step definition for negative assertions - ✅ `nox -e lint` passed | ✅ `nox -e typecheck` passed (0 errors) --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3471 has been merged successfully! 🎉

Summary of work:

  • Fixed HelpPanelOverlay._CONTEXT_ITEMS to show ctrl+t (not ctrl+tab) for preset cycling — now matches actual app.BINDINGS
  • Removed stale (\"tab\", \"Cycle to next persona\") entry with no corresponding binding
  • Added 2 new BDD scenarios verifying keybinding accuracy (positive + negative assertions)
  • Added should not contain step definition for negative-assertion scenarios

Pre-merge actions taken:

  • Assigned milestone v3.7.0 to PR (was missing, flagged by code review)
  • Verified all core CI checks passing: lint , typecheck , quality , security , build , helm , unit_tests , e2e_tests , integration_tests
  • Confirmed PR mergeable with no blocking branch protection rules

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

PR #3471 has been merged successfully! 🎉 **Summary of work:** - Fixed `HelpPanelOverlay._CONTEXT_ITEMS` to show `ctrl+t` (not `ctrl+tab`) for preset cycling — now matches actual `app.BINDINGS` - Removed stale `(\"tab\", \"Cycle to next persona\")` entry with no corresponding binding - Added 2 new BDD scenarios verifying keybinding accuracy (positive + negative assertions) - Added `should not contain` step definition for negative-assertion scenarios **Pre-merge actions taken:** - Assigned milestone v3.7.0 to PR (was missing, flagged by code review) - Verified all core CI checks passing: lint ✅, typecheck ✅, quality ✅, security ✅, build ✅, helm ✅, unit_tests ✅, e2e_tests ✅, integration_tests ✅ - Confirmed PR mergeable with no blocking branch protection rules --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3471 has been merged successfully! 🎉

Summary of work performed:

  • Added full PR description (the PR body was empty — added summary, motivation, approach, changes table, testing details, and related issue links)
  • Assigned milestone v3.7.0 to the PR (required by CONTRIBUTING.md to match the linked issue's milestone)
  • All CI checks were passing; PR was mergeable with no conflicts
  • Merged via squash merge

Fix delivered:

  • HelpPanelOverlay now displays ctrl+t (not ctrl+tab) for preset cycling, matching the actual app.BINDINGS
  • Stale tab → "Cycle to next persona" entry removed from Main Screen context (no such binding exists)
  • BDD regression tests added to prevent future drift

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

PR #3471 has been merged successfully! 🎉 **Summary of work performed:** - Added full PR description (the PR body was empty — added summary, motivation, approach, changes table, testing details, and related issue links) - Assigned milestone v3.7.0 to the PR (required by CONTRIBUTING.md to match the linked issue's milestone) - All CI checks were passing; PR was mergeable with no conflicts - Merged via squash merge **Fix delivered:** - `HelpPanelOverlay` now displays `ctrl+t` (not `ctrl+tab`) for preset cycling, matching the actual `app.BINDINGS` - Stale `tab` → "Cycle to next persona" entry removed from Main Screen context (no such binding exists) - BDD regression tests added to prevent future drift --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
cleveragents/cleveragents-core#3444
No description provided.