Metadata
| Status | done |
|---|---|
| Assigned | agent-1333 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Model | claude:sonnet |
| Created | 2026-05-01T14:39:15.358111426+00:00 |
| Started | 2026-05-01T14:40:43.145803389+00:00 |
| Completed | 2026-05-01T15:25:46.256970498+00:00 |
| Tags | priority-high,bug,tui,ux,chat,dialog, eval-scheduled |
| Eval score | 0.75 |
| └ blocking impact | 0.86 |
| └ completeness | 0.72 |
| └ coordination overhead | 0.82 |
| └ correctness | 0.76 |
| └ downstream usability | 0.76 |
| └ efficiency | 0.80 |
| └ intent fidelity | 0.88 |
| └ style adherence | 0.68 |
Description
Description
When the user clicks Launch on the new-chat dialog, the TUI should focus the newly-created chat tab (showing a 'booting' / loading state with the new chat's name visible). Instead, it flips focus back to whichever chat tab was active BEFORE the new-chat dialog opened.
User report 2026-05-01: 'when we launch the task, say, hey, go, it flips us back to the last chat we were talking to before we tried to open a new one. And instead of focusing on the one that's there, the experience should basically be that you click go, and then you're focusing on a blank screen. At the top, it says the new name of the chat. and then it's going to boot up and we're going to see it directly.'
Spec
On Launch button activation:
- Close the new-chat dialog
- Add the new
.chat-Ntab to the chat tab bar (already happens probably) - Focus that NEW tab (not the previously-active one)
- The new tab's content area initially shows:
Chat: <name or model spec>\n\nBooting <executor>... (this can take a few seconds)placeholder - As the chat agent boots and emits its first output, the placeholder is replaced with live PTY content
This should compose with redesign-new-chat (the minimal-defaults redesign that's also in flight) — both want the same end-state: clean dialog, click Launch, immediately see the new chat. The redesign agent may already be implementing this; verify.
Validation
- Failing test or repro: open new-chat dialog from chat-A's view; click Launch with handler=claude (or whichever); pre-fix: focus returns to chat-A. Post-fix: focus moves to the new chat tab.
- The new tab's content shows a 'booting ' placeholder until the PTY emits its first output
- If chat fails to boot (per fix-chat-tab's death-state UX), the placeholder is replaced with the death panel — not silently reverted to anywhere
- Esc / cancel on the dialog DOES return focus to the previous chat (this fix is for Launch only, not cancel)
- cargo build + cargo test pass
- Permanent smoke scenario added covering the focus-on-Launch transition
- cargo install --path . was run before claiming done
Coordinate with redesign-new-chat
The redesign-new-chat task is in flight. If it implements this focus behavior as part of its redesign, this task becomes a no-op verification. If not, this task ships the focus fix on top of the redesigned dialog. Check status before starting.
Depends on
Required by
- (none)
Log
- 2026-05-01T14:39:15.343467120+00:00 Task paused
- 2026-05-01T14:40:03.678280493+00:00 Task published
- 2026-05-01T14:40:40.568424779+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer matches TUI bug fix requiring precise state management of focus transitions; Careful tradeoff aligns with correctness-critical dialog UX behavior.
- 2026-05-01T14:40:43.145807437+00:00 Spawned by coordinator --executor claude --model opus
- 2026-05-01T14:41:00.471119446+00:00 Starting investigation: redesign-new-chat is done, so working on top of redesigned dialog
- 2026-05-01T14:41:54.071489451+00:00 Found launcher dismissal flow at state.rs:10485. force_refresh runs after switch_coordinator — checking if it overwrites active_coordinator_id
- 2026-05-01T14:43:21.852980400+00:00 Identified probable bug: sync_active_tabs_from_graph at state.rs:14470 auto-switches coordinator when active_coordinator_id isn't in active_tabs. After CreateCoordinator success, active_coordinator_id is set to new cid, but if graph file isn't flushed yet (or race with poll_graph), sync_active_tabs falls back to active_tabs[0] = old chat. Test setup_workgraph_with_coordinators(&[0,1]) pre-creates the coord so the test misses this race.
- 2026-05-01T14:54:13.841398456+00:00 Building unit test for the bug. Approach: simulate user flow where graph initially has only the old chat (cid=0); IPC handler creates .chat-1 in graph; drain_commands processes success. Verify active_coordinator_id ends up as 1.
- 2026-05-01T15:17:36.845279340+00:00 Validated: cargo build + cargo test --bin wg pass (3305 tests, 0 failures). 2 unrelated lib test failures pre-exist (test_global_config_path env-dependent, debounces_burst_writes timing-flaky).
- 2026-05-01T15:17:37.122686965+00:00 cargo install --path . completed; binary updated.
- 2026-05-01T15:17:37.310450316+00:00 Smoke scenario tests/smoke/scenarios/launcher_focus_new_chat_on_launch.sh added with owners=[fix-new-chat-4]; gate runs 4 unit tests covering focus-on-success, graph-lag race tolerance, IPC-failure negative control, and booting placeholder render.
- 2026-05-01T15:18:29.666261681+00:00 Committed: a2d2f1a65 — pushed to remote
- 2026-05-01T15:25:46.256986823+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-05-01T15:28:52.809797545+00:00 PendingEval → Done (evaluator passed; downstream unblocks)