fix-chat-creation

Fix: chat creation UX — preview tab during provisioning + handler/model/endpoint selection

Metadata

Statusdone
Assignedagent-1179
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-29T20:48:01.751901782+00:00
Started2026-04-29T20:49:11.995853967+00:00
Completed2026-04-29T21:23:07.310334089+00:00
Tagspriority-high,fix,tui,ux,chat, eval-scheduled
Eval score0.63
└ blocking impact0.70
└ completeness0.55
└ constraint fidelity0.55
└ coordination overhead0.70
└ correctness0.60
└ downstream usability0.60
└ efficiency0.70
└ intent fidelity0.70
└ style adherence0.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 prior wg nex -m X -e Y invocations as quick-pick options in the dialog.

Validation

  • Failing tests written first
  • Live smoke: click new-chat in TUI. Tab .chat-N appears immediately with provisioning indicator. Once PTY is up, tab transitions to chat-N and 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 -m invocations 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

Log