cmux NEXT Needs you: a jump opens the waiting chat in its own tab, never replacing the chat on screen
Summary
Leo hit this live, and it froze his coordinator. A Needs you jump (the list, the Needs your input pill, or a row's answer or side question) for another chat switched the pane to that chat in place with chat.select. huge-blue/directional-motion opened inside the coordinator's pane and replaced that chat, while the sidebar row still said "GUI push · coordinator (this chat)".
The rule now: a jump opens the waiting chat in its own tab, or focuses the tab that already shows it. It never replaces the chat on screen.
- Webview (
needsYou/useNeedsYou.ts): for another chat's ask, the jump, the answer and the side question call the new host requestchat.asks.open {sessionId}. None of them callschat.select. An answer or side question for another chat is not sent from this pane, because the relay only answers the chat the pane shows. The row stays in the list, and the person answers in the tab that opens. - Host (
AgentPaneAskOpen): if a tab already shows that chat, it is shown and focused (showSession, aschat.offer.opendoes). Otherwise the chat opens in a new tab after this one and gets focus (openTab(.tab)). - Scope: only a chat on this pane's own acpmux on this Mac (a bare or
local/id). The page's own client can already show any of those in place, so a tab of one grants nothing more. The request refuses the chat itself, a peer's chat, a pane on another machine, and a New Tab page. A refusal opens nothing and leaves the chat on screen as it is.
The sidebar row not following an in-place switch is a separate cause and gets its own PR.
Testing
- Webview:
bun test test/agent-pane-needs-you.test.tsxinwebviews/.- Red at 014fc9f8d0e9 (test only):
web / react-apps-check (1)failed onlytest/agent-pane-needs-you.test.tsx > another chat's ask opens in that chat's own tab; the chat on screen is never replaced(job 119547801106); the jump, answer and side question for another chat calledchat.select:other. - The fix commit makes them call
chat.asks.open:otherand neverchat.select.
- Red at 014fc9f8d0e9 (test only):
- Swift:
AgentPaneAskOpenTestsin CmuxNextAgentPaneTests. It checks:- The waiting chat opens in a new tab.
- A second jump focuses that tab and opens no second one.
- The chat on screen stays.
- The chat itself, a peer's chat, a remote pane and a pane with no chat are all refused.
Observed / Not run
- Observed: these tests on CI (no local builds or tests on this host).
- Not run: a live jump in the app.
No capture: the visible change is that a click opens or focuses a tab instead of swapping the chat in place, and the behavior tests above cover it.
Changelog
- Fixed: Needs you opens a waiting chat in its own tab, or focuses its tab, and never replaces the chat you are in.
🤖 Generated with Claude Code
Agent session: cosmic-gray
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the Needs you jump so a jump to another chat opens it in its own tab (or focuses the tab already showing it) instead of swapping the chat in place with chat.select, which had replaced the coordinator's chat on screen. An answer or side question for another chat is no longer sent from this pane; the row stays and the person answers in the tab that opens.
Testing
- The updated test asserts the jump, answer, and side question for another chat call
chat.asks.openand neverchat.select. - It also covers a host refusal: no tab opens and the chat on screen stays unchanged.