UAT: TUI persona cycling (tab key) not bound — tab cycles presets instead of personas, ctrl+tab cycles presets #5343

Open
opened 2026-04-09 05:55:23 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: TUI — Persona System / Key Bindings (v3.7.0)
Severity: High — persona cycling key binding is wrong
Discovered by: UAT Testing (uat-pool-1, worker: tui-implementation)


What Was Tested

Code analysis of src/cleveragents/tui/app.py BINDINGS against the TUI specification (§29260-29269, §29077).

Expected Behavior (from spec §29260-29269, §29077)

The spec defines two distinct cycling operations:

tab:       persona_1 → persona_2 → persona_3 → persona_1 → ...
ctrl+tab:  default → think: high → think: max → quick → default → ...
  • tab cycles through personas in the configured cycle list
  • ctrl+tab cycles through the current persona's argument presets

The footer shows: tab Persona │ ctrl+tab Preset

Actual Behavior

The BINDINGS in app.py has:

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

Issues:

  1. tab is NOT bound to persona cycling — pressing tab in the TUI will use Textual's default focus cycling behavior (moving focus between widgets), not cycling personas
  2. ctrl+tab is NOT bound — the preset cycling is bound to ctrl+t instead of ctrl+tab
  3. The PersonaState.cycle_preset() method exists and works correctly, but the binding is wrong
  4. There is no action_cycle_persona() method — persona cycling is not implemented at all

The spec (§29077) shows the footer: F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+tab Preset │ ctrl+s Sessions │ ctrl+q Quit

Steps to Reproduce

  1. Open app.py:92-96BINDINGS has ctrl+t for preset, no tab for persona
  2. Search: grep -r "action_cycle_persona\|cycle_persona" src/cleveragents/tui/ → no results
  3. Note: PersonaState.cycle_preset() exists but PersonaState.cycle_persona() does not

Impact

  • Users cannot cycle through personas with tab (Textual's default tab behavior takes over)
  • Users must use ctrl+t instead of ctrl+tab for preset cycling (non-spec behavior)
  • The footer hotkey reference is incorrect

Code Location

  • src/cleveragents/tui/app.py:92-96 — wrong binding for preset, missing binding for persona
  • src/cleveragents/tui/persona/state.py — missing cycle_persona() method

Definition of Done

  • tab binding added for persona cycling (action: cycle_persona)
  • ctrl+tab binding added for preset cycling (replacing ctrl+t)
  • action_cycle_persona() method implemented in _TextualCleverAgentsTuiApp
  • PersonaState.cycle_persona() method implemented
  • Footer shows correct hotkeys: tab Persona │ ctrl+tab Preset

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

## Bug Report **Feature Area:** TUI — Persona System / Key Bindings (v3.7.0) **Severity:** High — persona cycling key binding is wrong **Discovered by:** UAT Testing (uat-pool-1, worker: tui-implementation) --- ## What Was Tested Code analysis of `src/cleveragents/tui/app.py` BINDINGS against the TUI specification (§29260-29269, §29077). ## Expected Behavior (from spec §29260-29269, §29077) The spec defines two distinct cycling operations: ``` tab: persona_1 → persona_2 → persona_3 → persona_1 → ... ctrl+tab: default → think: high → think: max → quick → default → ... ``` - **`tab`** cycles through personas in the configured cycle list - **`ctrl+tab`** cycles through the current persona's argument presets The footer shows: `tab Persona │ ctrl+tab Preset` ## Actual Behavior The `BINDINGS` in `app.py` has: ```python BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), # ← ctrl+t, not ctrl+tab ] ``` Issues: 1. **`tab` is NOT bound** to persona cycling — pressing `tab` in the TUI will use Textual's default focus cycling behavior (moving focus between widgets), not cycling personas 2. **`ctrl+tab` is NOT bound** — the preset cycling is bound to `ctrl+t` instead of `ctrl+tab` 3. The `PersonaState.cycle_preset()` method exists and works correctly, but the binding is wrong 4. There is no `action_cycle_persona()` method — persona cycling is not implemented at all The spec (§29077) shows the footer: `F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+tab Preset │ ctrl+s Sessions │ ctrl+q Quit` ## Steps to Reproduce 1. Open `app.py:92-96` — `BINDINGS` has `ctrl+t` for preset, no `tab` for persona 2. Search: `grep -r "action_cycle_persona\|cycle_persona" src/cleveragents/tui/` → no results 3. Note: `PersonaState.cycle_preset()` exists but `PersonaState.cycle_persona()` does not ## Impact - Users cannot cycle through personas with `tab` (Textual's default tab behavior takes over) - Users must use `ctrl+t` instead of `ctrl+tab` for preset cycling (non-spec behavior) - The footer hotkey reference is incorrect ## Code Location - `src/cleveragents/tui/app.py:92-96` — wrong binding for preset, missing binding for persona - `src/cleveragents/tui/persona/state.py` — missing `cycle_persona()` method ## Definition of Done - [ ] `tab` binding added for persona cycling (action: `cycle_persona`) - [ ] `ctrl+tab` binding added for preset cycling (replacing `ctrl+t`) - [ ] `action_cycle_persona()` method implemented in `_TextualCleverAgentsTuiApp` - [ ] `PersonaState.cycle_persona()` method implemented - [ ] Footer shows correct hotkeys: `tab Persona │ ctrl+tab Preset` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 06:01:06 +00:00
Author
Owner

Label compliance fix applied:

  • Assigned milestone based on issue scope
  • Reason: Issue was missing a milestone assignment per CONTRIBUTING.md requirements.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Assigned milestone based on issue scope - Reason: Issue was missing a milestone assignment per CONTRIBUTING.md requirements. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Hierarchical Compliance Fix: Linked to Epic #5304 (TUI Persona System) — persona cycling is part of the persona system.


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

**Hierarchical Compliance Fix**: Linked to Epic #5304 (TUI Persona System) — persona cycling is part of the persona system. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
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.

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