UAT: TUI BINDINGS missing ctrl+n and ctrl+w session management keys #10390

Open
opened 2026-04-18 09:25:19 +00:00 by HAL9000 · 0 comments
Owner

Metadata

Field Value
Branch fix/tui-bindings-session-management
Commit Message fix(tui): add ctrl+n and ctrl+w session management key bindings
Milestone v3.7.0
Parent Epic #5308

Background and Context

The TUI specification requires that app.py BINDINGS includes ALL of the following keys: ctrl+n, ctrl+w, ctrl+s, ctrl+r, shift+tab, f2/ctrl+,, tab (persona), ctrl+tab (preset), ctrl+[, ctrl+], alt+up, alt+down, escape. The current implementation is missing ctrl+n (new session) and ctrl+w (close session).

Expected Behavior (from spec)

The BINDINGS class variable in app.py must include:

  • ctrl+n → Create a new session tab
  • ctrl+w → Close the current session tab

These are session management bindings required by the spec's multi-session tab system.

Actual Behavior

src/cleveragents/tui/app.py BINDINGS (lines 88–92):

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

ctrl+n and ctrl+w are completely absent from the BINDINGS list. Users cannot create new sessions or close sessions via keyboard shortcuts.

Steps to Reproduce (Code Analysis)

  1. Open src/cleveragents/tui/app.py
  2. Find BINDINGS class variable (line ~88)
  3. Observe: only ctrl+q, f1, ctrl+t are defined
  4. ctrl+n (new session) and ctrl+w (close session) are absent
  5. Compare with spec requirement: "app.py BINDINGS includes ALL: ctrl+n, ctrl+w, ..."

Code Location

  • src/cleveragents/tui/app.pyBINDINGS class variable (lines 88–92)

Subtasks

  • Add ("ctrl+n", "new_session", "New Session") to BINDINGS
  • Add ("ctrl+w", "close_session", "Close Session") to BINDINGS
  • Implement action_new_session() method
  • Implement action_close_session() method
  • Add Behave scenarios verifying ctrl+n creates a new session
  • Add Behave scenarios verifying ctrl+w closes the current session
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97%

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • ctrl+n and ctrl+w are present in BINDINGS and functional
  • 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.
  • 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.
  • The TDD testing issue is resolved.

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata | Field | Value | |---|---| | **Branch** | `fix/tui-bindings-session-management` | | **Commit Message** | `fix(tui): add ctrl+n and ctrl+w session management key bindings` | | **Milestone** | v3.7.0 | | **Parent Epic** | #5308 | --- ## Background and Context The TUI specification requires that `app.py BINDINGS` includes ALL of the following keys: `ctrl+n`, `ctrl+w`, `ctrl+s`, `ctrl+r`, `shift+tab`, `f2/ctrl+,`, `tab` (persona), `ctrl+tab` (preset), `ctrl+[`, `ctrl+]`, `alt+up`, `alt+down`, `escape`. The current implementation is missing `ctrl+n` (new session) and `ctrl+w` (close session). ## Expected Behavior (from spec) The `BINDINGS` class variable in `app.py` must include: - `ctrl+n` → Create a new session tab - `ctrl+w` → Close the current session tab These are session management bindings required by the spec's multi-session tab system. ## Actual Behavior `src/cleveragents/tui/app.py` `BINDINGS` (lines 88–92): ```python BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), ] ``` `ctrl+n` and `ctrl+w` are completely absent from the BINDINGS list. Users cannot create new sessions or close sessions via keyboard shortcuts. ## Steps to Reproduce (Code Analysis) 1. Open `src/cleveragents/tui/app.py` 2. Find `BINDINGS` class variable (line ~88) 3. Observe: only `ctrl+q`, `f1`, `ctrl+t` are defined 4. `ctrl+n` (new session) and `ctrl+w` (close session) are absent 5. Compare with spec requirement: "app.py BINDINGS includes ALL: ctrl+n, ctrl+w, ..." ## Code Location - `src/cleveragents/tui/app.py` — `BINDINGS` class variable (lines 88–92) ## Subtasks - [ ] Add `("ctrl+n", "new_session", "New Session")` to `BINDINGS` - [ ] Add `("ctrl+w", "close_session", "Close Session")` to `BINDINGS` - [ ] Implement `action_new_session()` method - [ ] Implement `action_close_session()` method - [ ] Add Behave scenarios verifying ctrl+n creates a new session - [ ] Add Behave scenarios verifying ctrl+w closes the current session - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - `ctrl+n` and `ctrl+w` are present in `BINDINGS` and functional - 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. - 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. - The TDD testing issue is resolved. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
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#10390
No description provided.