fix-new-chat-4

Fix: new-chat dialog Launch flips focus back to previous chat instead of new one

Metadata

Statusdone
Assignedagent-1333
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Modelclaude:sonnet
Created2026-05-01T14:39:15.358111426+00:00
Started2026-05-01T14:40:43.145803389+00:00
Completed2026-05-01T15:25:46.256970498+00:00
Tagspriority-high,bug,tui,ux,chat,dialog, eval-scheduled
Eval score0.75
└ blocking impact0.86
└ completeness0.72
└ coordination overhead0.82
└ correctness0.76
└ downstream usability0.76
└ efficiency0.80
└ intent fidelity0.88
└ style adherence0.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:

  1. Close the new-chat dialog
  2. Add the new .chat-N tab to the chat tab bar (already happens probably)
  3. Focus that NEW tab (not the previously-active one)
  4. The new tab's content area initially shows: Chat: <name or model spec>\n\nBooting <executor>... (this can take a few seconds) placeholder
  5. 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

Log