Metadata
| Status | done |
|---|---|
| Assigned | agent-1334 |
| Agent identity | 3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3 |
| Model | claude:sonnet |
| Created | 2026-05-01T14:39:02.607467309+00:00 |
| Started | 2026-05-01T14:41:01.517091331+00:00 |
| Completed | 2026-05-01T15:29:19.363380543+00:00 |
| Tags | priority-high,bug,tui,ux,chat, eval-scheduled |
| Eval score | 0.73 |
| └ blocking impact | 0.75 |
| └ completeness | 0.75 |
| └ coordination overhead | 0.80 |
| └ correctness | 0.70 |
| └ downstream usability | 0.70 |
| └ efficiency | 0.80 |
| └ intent fidelity | 0.75 |
| └ style adherence | 0.75 |
Description
Description
The user has accumulated many chat tasks (.chat-N) that are mostly empty / unused. Closing a tab in the TUI hides it from the chat tab bar but doesn't remove the underlying task from the graph. Next time the TUI opens, the tabs reappear because the chat tasks are still in the graph.
User report 2026-05-01: 'we're not able to clean up tasks in the graph itself. So we have all these chat tasks now that are kind of floating, many of which are just empty. I know I can remove it from the command line, but in the TUI, I wish there were an easy way for me to remove it. ... So I have all these chat things that I remove from my view, but then they reappear every time I open the TUI.'
Two distinct concerns
A: Closing X on a chat tab should TRULY remove the chat
Currently: clicking ✕ on a chat tab removes it from the tab bar visually but leaves the chat task in the graph.
Better: clicking ✕ prompts 'Close this chat? [a]bandon (kill the agent + remove from graph) / [h]ide (just remove tab; task stays) / [esc] cancel'. Default = abandon, since 'I clicked X' usually means 'I'm done with this'.
OR even simpler: ✕ always abandons the chat task. If the user wants to hide-but-keep, that's a separate menu / action. Defaults match user mental model of 'X = gone for good'.
B: Existing accumulated chat tasks need a way to bulk-clean
Many empty chats already in the graph. The TUI should expose a list-view + multi-select + abandon action. Possibly a 'chat manager' pane that lists all .chat-* tasks with their status, last-message timestamp, message count, and bulk ops (abandon-all-empty, abandon-all-older-than-7d, etc.).
Validation
- Failing test: clicking X on a chat tab abandons the underlying task (default behavior). Pre-fix: task remains in graph. Post-fix: task is abandoned.
-
Live smoke: open TUI, click X on a chat tab, verify
wg show .chat-Nshows status=abandoned. Reopen TUI, confirm tab does NOT reappear. - Bulk cleanup interface (chat manager pane / dialog): exists, lists all chat tasks, supports multi-select abandon
- Filter/sort: by age, by message-count, by status (filter to empty chats specifically)
- No regression: chats currently in-progress (with active agent) are NOT accidentally abandoned just because the user clicks X — confirm the abandon path kills the agent cleanly first
- cargo build + cargo test pass
- cargo install --path . was run before claiming done
Depends on
Required by
- (none)
Log
- 2026-05-01T14:39:02.588175730+00:00 Task paused
- 2026-05-01T14:39:32.664967081+00:00 Task published
- 2026-05-01T14:41:01.517096080+00:00 Spawned by coordinator --executor claude --model opus
- 2026-05-01T14:41:28.318732520+00:00 Starting investigation: exploring TUI chat tab handling and close-tab logic
- 2026-05-01T14:43:28.664656438+00:00 Found close_tab vs delete_coordinator architecture. open_retire_dialog_for_coordinator already exists with Archive/Stop/Abandon. Plan: route X click to retire dialog (no new dialog), add chat manager pane for bulk cleanup.
- 2026-05-01T15:28:08.543720425+00:00 Implemented: (A) mouse X click now routes through delete_coordinator (abandon + close_tab) so the underlying chat task is marked Abandoned; (B) chat manager pane (uppercase M) lists all chat tasks with multi-select + bulk abandon + filter (all/non-empty/empty/alive); (C) handle_delete_coordinator IPC now kills the running agent before marking abandoned (mirrors handle_stop_coordinator). Tests: 4 chat manager + 1 click_close_button + 2 IPC = 7 new tests, all passing. cargo build + cargo test --bin wg both pass (3315 tests total). cargo install --path . done.
- 2026-05-01T15:28:41.696388094+00:00 Committed: 25c340462 — pushed to remote
- 2026-05-01T15:29:19.363388788+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-05-01T15:31:55.103017681+00:00 PendingEval → Done (evaluator passed; downstream unblocks)