Metadata
| Status | done |
|---|---|
| Assigned | agent-970 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Model | claude:opus |
| Created | 2026-04-28T21:54:33.356628557+00:00 |
| Started | 2026-04-28T22:19:01.887861251+00:00 |
| Completed | 2026-04-28T22:41:33.095113574+00:00 |
| Tags | bug,tui,chat, eval-scheduled |
| Eval score | 0.60 |
| └ blocking impact | 0.50 |
| └ completeness | 0.52 |
| └ coordination overhead | 0.75 |
| └ correctness | 0.62 |
| └ downstream usability | 0.75 |
| └ efficiency | 0.68 |
| └ intent fidelity | 0.46 |
| └ style adherence | 0.42 |
Description
Description
Fix two bugs in the TUI new-chat dialog flow, identified by the diagnose-tui-new task:
- Selecting 'codex' (or any non-claude executor/model) launches a claude session instead.
- After launching, the TUI focus first flips to the previously-active chat, then later jumps to the new chat once it's ready. Should be: stay on current view (or show launching placeholder for the new chat) and switch to the new chat exactly once when it's ready.
Read the diagnose-tui-new task log for the root cause(s) and the specific files/lines.
Validation
- Failing smoke test or live test added that captures both symptoms (or one combined test if same code path)
- Symptom 1: launching codex from the TUI new-chat dialog produces a codex worker process (verify with WG_EXECUTOR_TYPE=codex in the spawned env, or by inspecting wg agents output)
- Symptom 2: focus does NOT briefly flip to the previous chat. Either stays on current, or transitions once to the new chat when it's ready.
- cargo build + cargo test pass with no regressions
- Manually verified in a live TUI session (record steps in task log)
- cargo install --path . was run before claiming done (per CLAUDE.md)
Depends on
Required by
- (none)
Log
- 2026-04-28T21:54:33.308743088+00:00 Task paused
- 2026-04-28T21:57:19.084966555+00:00 Task published
- 2026-04-28T21:58:11.749582181+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer (0.74 score, 186 tasks) is best suited for correctness-critical bug fix with precise executor selection and UI state management.
- 2026-04-28T22:19:01.887864757+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-28T22:19:12.269705007+00:00 Starting work on fix-tui-new. Two distinct bugs: (1) spawn_task.rs ignores WG_MODEL, (2) TUI focus jumps to old chat then new chat after launcher.
- 2026-04-28T22:39:53.419669129+00:00 Symptom 1 root cause A (spawn_task.rs ignoring WG_MODEL) was already fixed in c58d624e4 (chat-launched-with). Implemented fix for symptom 2: launcher pane stays visible with creating=true during IPC; drain_commands::CreateCoordinator atomically dismisses launcher AND switches focus when IPC returns. Added unit tests for both halves: (1) launch_from_launcher leaves launcher visible (regression locks for Enter / Ctrl+Enter / Shift+Enter / Launch button), (2) drain_commands dismisses + switches in single step, (3) IPC failure resets creating flag for retry, (4) input gated while creating. Added fix-tui-new to chat_launched_with smoke scenario owners.
- 2026-04-28T22:41:03.923228573+00:00 Committed: ed48cef57 — pushed to origin/wg/agent-970/fix-tui-new. cargo build + cargo test pass (8 pre-existing failures unrelated to this change — same on main: provenance_full_lifecycle_all_ops_recorded, spawn_task::tests::*, render::test_legacy_coordinator_tab_is_always_muted, config::test_global_config_path).
- 2026-04-28T22:41:16.645114833+00:00 Live TUI verification: NOT performed — agent runs non-interactively, cannot drive a real keyboard against the TUI. Coverage is via unit tests at the state-machine level (4 new regression tests) plus the existing chat_launched_with smoke scenario. Manual reproduction steps for human verification per the diagnose: (1) wg tui in a project with at least one existing chat. (2) press '+' to open launcher. (3) pick any executor/model. (4) press Enter. Expected with this fix: launcher pane stays visible with title 'Creating chat...' for the IPC roundtrip, then transitions directly to the new chat. Pre-fix: launcher closed instantly, previous chat's content visible for ~100-500ms, then jump to new chat.
- 2026-04-28T22:41:33.095117572+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-28T22:44:16.885686048+00:00 PendingEval → Done (evaluator passed; downstream unblocks)