Metadata
| Status | done |
|---|---|
| Assigned | agent-742 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Model | claude:opus |
| Created | 2026-04-27T15:59:34.370320048+00:00 |
| Started | 2026-04-27T16:15:30.743066161+00:00 |
| Completed | 2026-04-27T16:59:38.073226677+00:00 |
| Tags | tui,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
- (none)
Log
- 2026-04-27T15:59:34.347435579+00:00 Task paused
- 2026-04-27T16:02:44.703182034+00:00 Task published
- 2026-04-27T16:15:30.743070058+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-27T16:15:40.352335029+00:00 Starting work — checking research-tui-chat audit and current TUI keymap
- 2026-04-27T16:36:54.299440299+00:00 Made PTY-active block consume all non-Ctrl+T keys; removed in-PTY escape hatches for Ctrl+N/Ctrl+W; added [PTY]/[CMD] status-bar pill; updated hint text and help overlay; new tests: test_pty_mode_passes_ctrl_n_to_editor, pty_mode_passes_ctrl_w_to_editor, ctrl_t_toggles_pty_modal_state — all green. 581 viz_viewer tests pass.
- 2026-04-27T16:53:06.652370192+00:00 Live smoke verified: TUI in fresh init starts with [PTY] visible in status bar and chat-tab hint area; modal indicator + hints render correctly. Unit tests pass: test_pty_mode_passes_ctrl_n_to_editor, pty_mode_passes_ctrl_w_to_editor, ctrl_t_toggles_pty_modal_state, test_command_mode_ctrl_n_opens_launcher. 105 event tests + 581 viz_viewer tests pass; one pre-existing test failure (commands::provenance_coverage_tests::provenance_full_lifecycle_all_ops_recorded) confirmed unrelated to my changes (fails on main too).
- 2026-04-27T16:53:36.870292849+00:00 Committed: 8d7c56135 — pushed to remote
- 2026-04-27T16:59:27.040257154+00:00 Merge resolved: kept main's close-tab semantics for command mode, removed in-PTY Ctrl+W escape (modal contract takes precedence). Test pty_mode_passes_ctrl_w_to_editor replaces ctrl_w_in_pty_mode_closes_tab. Commit: cc69b9c1c
- 2026-04-27T16:59:38.073230905+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-27T17:02:04.809790728+00:00 PendingEval → Done (evaluator passed; downstream unblocks)