Metadata
| Status | done |
|---|---|
| Assigned | agent-227 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-27T02:07:17.891563730+00:00 |
| Started | 2026-04-27T02:08:40.596144178+00:00 |
| Completed | 2026-04-27T02:32:38.048694319+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.82 |
| └ blocking impact | 0.90 |
| └ completeness | 0.75 |
| └ coordination overhead | 0.85 |
| └ correctness | 0.82 |
| └ downstream usability | 0.82 |
| └ efficiency | 0.85 |
| └ intent fidelity | 0.86 |
| └ style adherence | 0.88 |
Description
Description
Two related TUI chat-tab UX issues per user (verbatim):
'shows as active (yellow) and not blue (perpetual). and... the task for it is always yellow? which is right but a bit weird given we can resume the chats. before it was a nice blue color. we lost that tho. but active when responding is cool too. but maybe it should become blue when its not actively working?' 'we have no way to select them now.'
Issue A — color/state semantics
Chat tabs are perpetually rendered in 'active/yellow' state. Should distinguish:
- Blue (or whatever the prior 'persistent' color was): chat is idle / resumable — supervisor alive, no in-flight LLM call, waiting for user input
- Yellow (active): LLM is actively generating a response right now
- Gray / dim: supervisor not running (chat exists in graph but service is stopped or supervisor died)
- Red: chat in error state (handler crashed, hit retry cap)
Transitions:
- User sends message → yellow until response complete → back to blue
- Service stops → all tabs go gray
- Service starts + supervisor spawns → tabs go back to blue (or yellow if mid-turn on resume)
- 4xx/5xx loop or unrecoverable error → red
Restore the prior blue color for the idle case (per user 'we lost that tho').
Issue B — multi-tab navigation
Once multiple chats exist (.chat-1, .chat-2, etc), there's no visible way to switch between them in the TUI. Need:
- Number keys (1-9) jump to chat tab N
- Click on a tab in the tab bar switches to it
- Ctrl-Tab / Ctrl-Shift-Tab cycle through tabs
- Indicator on the active tab (underline, brighter color, etc)
This becomes urgent the moment the new-chat dialog (separate task) starts producing multiple chats.
Files likely to touch
- src/tui/viz_viewer/state.rs — tab state, active-tab tracking, key handlers for tab switching
- src/tui/viz_viewer/render.rs — color rendering for tab state, multi-tab tab-bar widget
- src/tui/mod.rs — top-level layout
- Probably a small helper module for chat-state inference (idle vs responding vs gray vs error)
Validation
-
Failing tests first:
- test_chat_tab_color_idle_is_blue — chat with supervisor alive, no in-flight call → tab color is blue
- test_chat_tab_color_active_is_yellow — chat mid-LLM-call → yellow
- test_chat_tab_color_supervisor_down_is_gray
- test_chat_tab_color_error_is_red
- test_number_key_switches_to_chat_n
- test_click_tab_switches_focus
- Implementation makes tests pass
- cargo build + cargo test pass with no regressions
-
Manual smoke (HARD GATE):
- Create 3 chats
- Tab bar shows 3 tabs, each with a name + color reflecting state
- Press '1', '2', '3' — focus jumps between them
- Click tab 2 — focus jumps to it
- Send a message in chat 2; observe its tab go yellow during response, back to blue when complete; chats 1 and 3 stay blue throughout
wg service stop; all 3 tabs go gray;wg service start; all 3 go back to blue
Depends on
Required by
- (none)
Log
- 2026-04-27T02:07:17.888725680+00:00 Task paused
- 2026-04-27T02:08:09.956826316+00:00 Task published
- 2026-04-27T02:08:40.310227144+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer best suited for TUI state management implementation with explicit test-driven validation and HARD GATE smoke requirements.
- 2026-04-27T02:08:40.596147664+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-27T02:08:48.870138702+00:00 Starting work on TUI chat tab states (blue=idle, yellow=active) and multi-tab navigation
- 2026-04-27T02:31:32.061261631+00:00 Implementation complete: chat_tab_state inference module + render.rs uses state colors (blue=idle, yellow=responding, gray=down, red=error) + Alt+1..9 number-key jumps + Ctrl+Tab/Ctrl+Shift+Tab cycling + [N] hotkey hints in tab bar. Tests: 7 inference + 11 navigation + 5 rendering passing. cargo build + cargo install clean. Single pre-existing unrelated test failure (provenance_full_lifecycle, noted in deps).
- 2026-04-27T02:32:28.952253137+00:00 Committed: 476a02b21 — pushed to remote
- 2026-04-27T02:32:38.048700190+00:00 Task marked as done