Metadata
| Status | done |
|---|---|
| Assigned | agent-1179 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-29T20:48:01.751901782+00:00 |
| Started | 2026-04-29T20:49:11.995853967+00:00 |
| Completed | 2026-04-29T21:23:07.310334089+00:00 |
| Tags | priority-high,fix,tui,ux,chat, eval-scheduled |
| Eval score | 0.63 |
| └ blocking impact | 0.70 |
| └ completeness | 0.55 |
| └ constraint fidelity | 0.55 |
| └ coordination overhead | 0.70 |
| └ correctness | 0.60 |
| └ downstream usability | 0.60 |
| └ efficiency | 0.70 |
| └ intent fidelity | 0.70 |
| └ style adherence | 0.75 |
Description
Description
Two related gaps in the TUI's new-chat flow:
Gap 1: No preview tab during chat provisioning
When the user creates a new chat, they don't see a tab appear until the chat is fully spawned. This makes the flow feel laggy and uncertain — did the click register? Is something happening?
User suggestion: name the in-flight tab .chat-* (matching the existing meta-task convention for not-yet-final entities) so the user can SEE the chat being provisioned. Once spawned, it transitions to the regular chat tab name.
Gap 2: No way to specify handler/model/endpoint at creation
The current new-chat flow doesn't expose handler choice (claude/codex/nex) or model/endpoint selection. User specifically wants to spawn:
User quote: 'i don't see how to add e.g. wg nex -m qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000'
That CLI form should be expressible in the TUI new-chat dialog: pick nex, pick model, specify endpoint URL.
Spec
Preview tab
- On new-chat creation, IMMEDIATELY add a tab named
.chat-<next-id>to the chat tab bar. Render it with a 'provisioning' indicator (spinner or '◌' character) - The tab is selectable but the chat content area shows 'Provisioning chat… (cancellable with Esc)' until the underlying process is up
- Once the PTY child is ready, transition the tab name to the regular
chat-<id>(drop the leading.) and replace the placeholder content with the live PTY view - If provisioning fails (vendor CLI not installed, endpoint unreachable, etc.), tab transitions to an error state with the actual failure shown — NOT silently disappear
Handler/model/endpoint dialog
The new-chat flow opens a dialog with:
New chat
Profile: [active profile dropdown] (default = currently active)
Handler: [claude] [codex] [nex] (default = active profile's handler)
Model: [combobox/text input] (default = active profile's model)
Endpoint: [text input or 'auto'] (visible only when handler=nex; auto for others)
[Create] [Cancel]
If the active profile's defaults are good, Enter creates immediately. If the user wants to override, tab through fields. The Profile dropdown lets quick-pick from existing profiles (claude/codex/nex/etc.).
Equivalence to CLI
wg nex -m qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000 — should be expressible:
- Handler: nex
- Model: qwen3-coder (or nex:qwen3-coder once fix-model-prefix is fully ripple)
- Endpoint: https://lambda01.tail334fe6.ts.net:30000
Same dialog. Same outcome.
Per-chat config persistence
The (handler, model, endpoint) chosen at creation should be remembered for that chat — so if the chat persists across TUI restart (per implement-tmux-wrapped), the same handler/model/endpoint is used on reattach. Stored where chat metadata already lives.
Forks for the implementer
- Where exactly does the dialog render? (Modal overlay? Side panel? Existing 'new coordinator' dialog enhanced?)
- Recent work in commit b07601fcd (tui-detail-view) and the existing 'new coordinator dialog' work (commits 9817f36dd, e72b77d18) may already have a relevant component to extend.
- The launcher-history memory note (
feedback_launcher_history_in_config_ui.md) — surface priorwg nex -m X -e Yinvocations as quick-pick options in the dialog.
Validation
- Failing tests written first
-
Live smoke: click new-chat in TUI. Tab
.chat-Nappears immediately with provisioning indicator. Once PTY is up, tab transitions tochat-Nand shows live content. - Live smoke: cancel mid-provisioning with Esc. Tab disappears cleanly.
- Live smoke: create a new chat with handler=nex, model=qwen3-coder, endpoint=https://lambda01.tail334fe6.ts.net:30000. Confirm spawned worker uses those values.
- Live smoke: create chat using the active profile's defaults. Confirm those defaults are pre-filled and Enter creates without further input.
- Active profile dropdown quick-pick switches the dialog defaults to that profile's values.
-
Launcher history entries from prior
wg nex -m/wg config -minvocations show up as suggestions in the dialog (per the launcher_history memory note). - Per-chat config (handler/model/endpoint) persists across TUI restart (verify with implement-tmux-wrapped behavior — chat reattaches with original config)
- Failed provisioning (e.g., bogus endpoint URL) renders an error state in the tab, not silent drop
- cargo build + cargo test pass
- cargo install --path . was run before claiming done
Depends on
Required by
- (none)
Log
- 2026-04-29T20:48:01.739738021+00:00 Task paused
- 2026-04-29T20:48:48.467542337+00:00 Task published
- 2026-04-29T20:49:10.114704400+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Programmer role with Careful tradeoff matches TUI feature implementation requiring precise state transitions, error handling, and config persistence across restarts.
- 2026-04-29T20:49:11.995857023+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T20:49:22.278065900+00:00 Starting investigation: examining current chat tab/dialog implementation
- 2026-04-29T20:50:03.734016186+00:00 Found existing LauncherState in state.rs:1107 with executor/model/endpoint pickers — already has the structure I need; will extend rather than rewrite.
- 2026-04-29T20:50:08.453541645+00:00 Reading launcher rendering and submission logic
- 2026-04-29T20:50:15.157979431+00:00 Examining create-coordinator IPC and chat tab provisioning flow
- 2026-04-29T20:54:11.962210459+00:00 Plan: 1) plumb endpoint through TUI launcher → CLI args → IPC → CoordinatorState; 2) surface 'nex' alias for 'native' executor in launcher; 3) failed provisioning shows error in tab via persistent error toast not silent; 4) write tests first; preview tab is more invasive — will leave for a follow-up subtask if time-pressed
- 2026-04-29T21:22:29.925023404+00:00 Validated: cargo test --bin wg passes (3252/3252). Validated: new smoke chat_create_endpoint_persists.sh passes against installed binary. Validated: 4 new tests for endpoint persistence pass.
- 2026-04-29T21:22:57.471493036+00:00 Committed: b7a0471e7 — pushed to remote
- 2026-04-29T21:23:07.310336373+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-29T21:24:52.625612870+00:00 PendingEval → Done (evaluator passed; downstream unblocks)