implement-tui-command

Implement: TUI command-mode keybindings (n/w/0-9)

Metadata

Statusdone
Assignedagent-765
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:sonnet
Created2026-04-27T15:59:41.795619113+00:00
Started2026-04-27T17:02:05.411433621+00:00
Completed2026-04-27T17:32:55.353660980+00:00
Tagstui,chat-redesign, eval-scheduled

Description

Description

Wire up command-mode single-key bindings, which only fire when the TUI is out of PTY focus (see impl-tui-modal).

Bindings:

  • 'n' — new chat (replaces top-level Ctrl+N)
  • 'w' — close current tab (remove from active list, NON-destructive — see impl-tui-tabs-as-view for semantics)
  • '0'..'9' — jump to tab N
  • Left/Right arrow — cycle tabs prev/next
  • '?' — show keybinding help overlay

Do NOT bind keys that conflict with existing command-mode features the user uses (e.g. if 'i' currently changes inspector width, leave it alone — note in research-tui-chat report).

Status bar should show available bindings briefly when entering command mode, or render a small hint line.

Validation

  • Failing test first: pressing 'n' in command mode dispatches new-chat action
  • 'w' triggers close-tab (verify via close action emitted, not actual archive)
  • Number keys switch tabs
  • '?' opens help overlay listing all command-mode bindings
  • In PTY mode, none of these keys trigger TUI actions (covered by impl-tui-modal tests, but re-verify)
  • cargo build + cargo test pass
  • Live-smoke: launch TUI, Ctrl+T, press 'n', verify new chat tab appears

Depends on

Required by

Log