Metadata
| Status | done |
|---|---|
| Assigned | agent-740 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Model | claude:sonnet |
| Created | 2026-04-27T16:01:01.365124596+00:00 |
| Started | 2026-04-27T16:15:29.446163079+00:00 |
| Completed | 2026-04-27T16:39:22.518968722+00:00 |
| Tags | tui,chat-redesign, eval-scheduled |
Description
Description
Persist the TUI's active-tabs list so reopening the TUI restores the previous session's tabs.
Storage:
- Path: '.workgraph/service/tui_state.json' (research-tui-chat will confirm or suggest alternative)
- Format: '{ "open_tabs": [".chat-1", ".chat-3"], "active": ".chat-3" }'
- Update on: tab open, tab close, active-tab switch, TUI clean shutdown
- Best-effort write; failure to persist should log a warning but not block TUI operation
Restore on TUI start:
- Read tui_state.json; for each task id, verify it still exists in the graph.
- Skip missing tasks; show a single toast/log line: 'Skipped N missing tabs from previous session'.
- If file doesn't exist or is empty, start with empty tab list.
- Multi-TUI concurrency: last-write-wins is fine. Don't add locking.
Validation
- Failing test first: open 2 tabs, kill TUI, restart TUI — both tabs reappear with same active selection
- If a saved tab refers to a missing task, TUI starts cleanly and logs the skip
- tui_state.json written on tab open/close/switch (verify file mtime updates)
- Empty/missing state file → empty tab list, no error
- cargo build + cargo test pass
- Live-smoke: open chats, kill TUI process, relaunch — tabs restored
Depends on
Required by
- (none)
Log
- 2026-04-27T16:01:01.359703217+00:00 Task paused
- 2026-04-27T16:02:34.287212099+00:00 Task published
- 2026-04-27T16:15:29.446168189+00:00 Spawned by coordinator --executor claude --model sonnet
- 2026-04-27T16:15:39.728534665+00:00 Starting implementation: TUI tab list persistence
- 2026-04-27T16:20:42.779519550+00:00 Code audit complete - implementing PersistedTuiState extension with open_tabs field
- 2026-04-27T16:35:16.169712708+00:00 Build succeeded, tests pass (6/6 tui_state tests), installing binary
- 2026-04-27T16:38:35.199065927+00:00 Committed e66d328d1 and pushed to remote
- 2026-04-27T16:39:08.621158824+00:00 Validated: all 5 checklist items addressed
- 2026-04-27T16:39:08.902294563+00:00 Validated: cargo build passes, all 6 tui_state tests pass, pre-existing failure unchanged
- 2026-04-27T16:39:22.518985694+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-27T16:39:55.993300762+00:00 PendingEval → Done (evaluator passed; downstream unblocks)