Skip to content

cmux NEXT Needs you: a jump opens the waiting chat in its own tab, never replacing the chat on screen - #23849

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
cmux/needs-you-own-tab
Oct 22, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
cmux/needs-you-own-tab

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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 request chat.asks.open {sessionId}. None of them calls chat.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, as chat.offer.open does). 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.tsx in webviews/.
    • Red at 014fc9f (test only): web / react-apps-check (1) failed only test/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 called chat.select:other.
    • The fix commit makes them call chat.asks.open:other and never chat.select.
  • Swift: AgentPaneAskOpenTests in 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 Autofix with [code]smith
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.open and never chat.select.
  • It also covers a host refusal: no tab opens and the chat on screen stays unchanged.

Written for commit c3a7c78. Summary will update on new commits.

View guided diff Turn on auto-fix

…n place (red)

Leo hit it live: a Needs you jump switched the coordinator's pane to another
chat with chat.select, replacing the coordinator's chat in its own tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review c3a7c78: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23849 -f ref=cmux/needs-you-own-tab -f platform=macos -f backend_mode=local

Passes: CI passes on c3a7c786e6.

CI passes on c3a7c786e6 (run 39698194004 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

web and size checks: green

Gallery before/after for c3a7c78: 16 states rendered, 3 images differ, 100 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39698193710 -R manaflow-ai/cmux -n gallery-advisory-23849-c3a7c786e620fdeca43759ec5e0561099ece3e61 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.chat-width/standard Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.chat-width/wide Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/new-chat Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/new-chat Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/after-turn Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/after-turn Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/working Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/working Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/typing-in-dock Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/typing-in-dock Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/long-title Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.docked-chat/long-title Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/local-queue Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/local-queue Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/huge-blue Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/huge-blue Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/cloud-fair-share Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.orchestration-lab/cloud-fair-share Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-follow-motion/stream Apple System Colors Light unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-follow-motion/stream Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-text/claude Apple System Colors Light changed 4.29% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-text/claude Apple System Colors changed 4.12% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-text/codex Apple System Colors Light changed 0.0017% imports useNeedsYou.ts (1 hops)
agent-pane.streaming-text/codex Apple System Colors unchanged 0% imports useNeedsYou.ts (1 hops)

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@github-actions github-actions Bot added risk:low Risk tier (docs/ci/risk-tiers.md) and removed risk:normal Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-xlma2 created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by summary-panel on cosmic-gray · session

…he chat on screen

A Needs you jump, answer or side question for another chat switched this
pane to that chat in place (chat.select), so Leo's coordinator chat left
its own tab while the sidebar still named it. They now ask the app to
show that chat's tab, or open one after this tab (chat.asks.open,
AgentPaneAskOpen), scoped to chats on the pane's own acpmux on this Mac,
which the page could already show in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at c3a7c78

First pass blocked on two exhaustive switches missing the new case (AgentPaneModel.swift header routing, AgentPaneRequest+SafeDescription.swift); both fixed in this head. Second pass: registration, scope check (local acpmux only, never the chat itself, no peer/remote/New Tab), webview timing, held items, this chat's asks and the pill all correct. Known non-blocking gaps: the opened tab does not scroll to the ask; an ask on another machine's chat now does nothing (it used to replace the chat in place).

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 22, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next crash-class rules / cmux-next crash-class rules is red on 10 of 10 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

This branch was previously deployed

1 inactive deployment
ci-routing-agent — c3a7c786 Deployed Oct 22, 2026 by teamleaderleo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant