Adds a status line indicating which mode the user is in. Adds a "normal" mode with keyboard shortcuts (including a chorded shortcut 'gg'). Adds a command mode with several basic commands that can be entered into an overlay. Chores: - Cleans up design/claude/plan.md to avoid confusing claude. - Adds some TODOs based on claude feedback.` Reviewed-on: #2 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
910 B
910 B
Cleanups
- Move keyboard/event reads in the TUI to a separate thread or async/io loop
- Keep UI and orchestrator in sync (i.e. messages display out of order if you queue up many.)
update_scrollauto-follows in Insert mode, yanking viewport to bottom on mode switch. Only auto-follow when new content arrives (indrain_ui_events), not every frame.Gsets scroll tou16::MAXand relies onupdate_scrollclamping. Compute actual max_scroll inline, or document the contract thatupdate_scrollmust always run before render.:clearclears TUI state immediately but sendsClearHistoryto orchestrator async. A mid-stream response can ghost back in after clear. Need synchronization (e.g. clear onTurnComplete, or have orchestrator ack the clear).- Command overlay width:
(out.width / 2).max(80)makes overlay full-bleed on 80-col terminals. Consider.max(40)or a different minimum.