implement-tui-modal

Implement: TUI modal input — Ctrl+T toggles PTY focus

Metadata

Statusdone
Assignedagent-742
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:opus
Created2026-04-27T15:59:34.370320048+00:00
Started2026-04-27T16:15:30.743066161+00:00
Completed2026-04-27T16:59:38.073226677+00:00
Tagstui,chat-redesign, eval-scheduled

Description

Description

Make TUI chat input modal: Ctrl+T toggles between PTY-focus (typing into chat input) and command mode (single keys do TUI actions). Click on PTY area also focuses it.

Behavior:

  • Default state on TUI start: PTY-focused (chat input receives keys)
  • Ctrl+T: toggle out of PTY → command mode (status bar shows mode indicator)
  • Ctrl+T again, OR click in PTY area: back into PTY focus
  • In command mode, single unmodified keys are interpreted as TUI commands; in PTY mode they go to the chat input
  • All existing top-level keybindings that intercepted before the PTY (e.g. Ctrl+N for new chat) move into command-mode single-key bindings ('n' for new) — see sibling tasks
  • Mouse actions (click +, click tab, click graph node) work regardless of mode

Refer to research-tui-chat for current keybinding inventory. Update the keymap so the editor PTY only ever sees Ctrl+T as an intercept; everything else passes through.

Validation

  • Failing test written first: TUI in PTY mode passes Ctrl+N straight to the editor (does not create new chat)
  • Ctrl+T from PTY mode → command mode (visible mode indicator in status bar)
  • Ctrl+T from command mode → PTY mode
  • Click on PTY area → PTY mode
  • In command mode, no keys are forwarded to chat input
  • cargo build + cargo test pass with no regressions
  • Live-smoke: launch TUI, type into chat (text appears), Ctrl+T, hit some letter (does NOT appear in chat input), Ctrl+T, type more (text resumes appearing)

Depends on

Required by

Log