UAT: TUI MainScreen missing tab-based persona cycling (tab key not bound to cycle_persona) #1336

Open
opened 2026-04-02 16:53:46 +00:00 by freemo · 0 comments
Owner

Bug Report: [tui] — tab key is not bound to persona cycling in MainScreen

Severity Assessment

  • Impact: High. The tab key is the primary way to switch between personas in the TUI. Without this binding, users cannot cycle through their configured personas.
  • Likelihood: 100% reproducible — tab is not registered as a binding.
  • Priority: High

Location

  • File: src/cleveragents/tui/app.pyBINDINGS class variable (lines 90–93)

Description

The specification (§MainScreen — Prompt Focused) states:

tab — Cycle to next persona

The spec footer mockup shows:

F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+tab Preset │ ctrl+s Sessions │ ctrl+q Quit

The spec also describes persona cycling:

"tab cycles through personas in the configured cycle list."

tab:       persona_1 → persona_2 → persona_3 → persona_1 → ...

Actual Behavior

The BINDINGS class variable does not include tab:

BINDINGS: ClassVar[list[tuple[str, str, str]]] = [
    ("ctrl+q", "quit", "Quit"),
    ("f1", "help", "Help"),
    ("ctrl+t", "cycle_preset", "Cycle Preset"),
]

There is no action_cycle_persona() method in app.py. The PersonaState class does have a cycle_persona() method (in src/cleveragents/tui/persona/state.py), but it is never called from the app.

Expected Behavior (from spec)

The app should register a tab binding that:

  1. Calls self._persona_state.cycle_persona(self._session.session_id)
  2. Refreshes the PersonaBar to show the new active persona
  3. Updates the session's actor binding for subsequent prompts

Steps to Reproduce

  1. Configure multiple personas in ~/.config/cleveragents/personas/
  2. Run the TUI
  3. Press tab — no persona cycling occurs (Textual may use tab for focus cycling instead)

Additional Note

Since tab is Textual's default focus-cycling key, implementing persona cycling on tab requires careful handling to prevent conflicts with widget focus navigation. The spec implies this should work when the prompt is focused (not when navigating within the sidebar).

  • #694 (feat(tui): Textual MainScreen with sidebar states and Dracula theme)
  • #1290 (UAT: TUI help panel key bindings are inconsistent with actual app bindings)
  • #1330 (UAT: TUI MainScreen missing keyboard bindings)

References

  • Spec §MainScreen — Prompt Focused keyboard table
  • Spec §Persona Cycling
  • Spec §PersonaBar
## Bug Report: [tui] — `tab` key is not bound to persona cycling in MainScreen ### Severity Assessment - **Impact**: High. The `tab` key is the primary way to switch between personas in the TUI. Without this binding, users cannot cycle through their configured personas. - **Likelihood**: 100% reproducible — `tab` is not registered as a binding. - **Priority**: High ### Location - **File**: `src/cleveragents/tui/app.py` — `BINDINGS` class variable (lines 90–93) ### Description The specification (§MainScreen — Prompt Focused) states: > `tab` — Cycle to next persona The spec footer mockup shows: ``` F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+tab Preset │ ctrl+s Sessions │ ctrl+q Quit ``` The spec also describes persona cycling: > "`tab` cycles through personas in the configured cycle list." ``` tab: persona_1 → persona_2 → persona_3 → persona_1 → ... ``` ### Actual Behavior The `BINDINGS` class variable does not include `tab`: ```python BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), ] ``` There is no `action_cycle_persona()` method in `app.py`. The `PersonaState` class does have a `cycle_persona()` method (in `src/cleveragents/tui/persona/state.py`), but it is never called from the app. ### Expected Behavior (from spec) The app should register a `tab` binding that: 1. Calls `self._persona_state.cycle_persona(self._session.session_id)` 2. Refreshes the PersonaBar to show the new active persona 3. Updates the session's actor binding for subsequent prompts ### Steps to Reproduce 1. Configure multiple personas in `~/.config/cleveragents/personas/` 2. Run the TUI 3. Press `tab` — no persona cycling occurs (Textual may use `tab` for focus cycling instead) ### Additional Note Since `tab` is Textual's default focus-cycling key, implementing persona cycling on `tab` requires careful handling to prevent conflicts with widget focus navigation. The spec implies this should work when the prompt is focused (not when navigating within the sidebar). ### Related Issues - #694 (feat(tui): Textual MainScreen with sidebar states and Dracula theme) - #1290 (UAT: TUI help panel key bindings are inconsistent with actual app bindings) - #1330 (UAT: TUI MainScreen missing keyboard bindings) ### References - Spec §MainScreen — Prompt Focused keyboard table - Spec §Persona Cycling - Spec §PersonaBar
freemo self-assigned this 2026-04-02 18:45:21 +00:00
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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1336
No description provided.