Skip to content

cmux-next: chat clicks open beside the chat, one right pane - #20553

Closed
teamleaderleo wants to merge 20 commits into
feat-cmux-nextfrom
leo/open-beside
Closed

teamleaderleo wants to merge 20 commits into
feat-cmux-nextfrom
leo/open-beside

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Bead: cx-1ndnn

In a chat, links, file refs and the Changes diff chip now open in the pane to the right of the chat. The first click makes that pane: a chat alone in its workspace docks left and the page opens right of it, so the chat stays in view. Later clicks add tabs to the same pane, never another split. Clicking something already open there selects its tab. Cmd-click keeps the old behavior: the default browser for links, the chat's own pane for files.

ChatBeside is the one routing entry point. It finds the pane right of the chat, selects a tab there that already shows the entity, or opens the entity there through the existing beside-caller placement (openBrowser, ViewerService.openFile(…, beside:)). Keyboard focus stays in the chat. Anything it can't place (a remote or reconnecting daemon, a file kind the browser previews) falls back to the old open.

Call sites wired:

  • AgentTabContent openURL: transcript links, PR chips and links, Open Link. A link click's own modifiers decide Cmd (AgentPaneLinkClick, set around the open in decidePolicyFor).
  • AgentTabContent onOpenFile (tab target): path chips, changed-file rows, project files and instructions.
  • AgentChatSplitToggles: the Changes diff chip targets the beside pane when one exists.

Not wired yet (follow-ups on cx-1ndnn): subagent transcripts, terminals, Cmd for file refs (the page's open-file message needs the click's metaKey), and re-clicking the Changes chip selecting its tab. The opt-in Tile subagents layout builds on this.

No new animation: the dock and the tab use the existing placement.

Testing

check before after
open-beside-realchat-e2e.py: a real chat (acpmux fake harness) FAIL 0/5 on the test build: links go to the default browser, the file covers the chat PASS 5/5 (incl. "the chat docks left and the opened pane is in view")
open-beside-e2e.py: a New Tab page seeded with the links reply FAIL 1/4 on the test build PASS 4/4 on the exact fix head
same, row "a file already open in the chat's pane still opens beside" (review finding) FAIL 3/4 on the first fix PASS 4/4
open-beside-realchat-e2e.py after the base merge (24f8b66: #20659's attach fix, #20635), Mac DEV build PASS 5/5

DEV builds on cua-3/cua-4. The Linux pool shipped a stale web bundle, so those builds were made on Macs (cx-s3k17). Two Opus reviews: the second found nothing blocking; its reconnect finding is fixed (a reconnecting daemon takes the old path).

The real-chat script finds the build's acpmux home under ~/.acpmux/builds/<key> since base's per-build isolation (cx-is1kf.3); before #20659 every chat attach was refused on base (cx-b08ei), so the script could not bind a chat.

Pre-push: crash ratchet, concurrency, god files (nothing grew), system-blue, conventions lint, webviews bun run check.

Proof

The recording below is from window snapshots of real DEV builds at 1500x900, with the composer's machine name blanked. I watched it. Before: nothing opens in the app; at the end the file page fills the chat's pane. After: the chat docks left, /pr/1, /pr/2 and notes.md open as tabs in one pane right of it, and the chat stays in view.

Changelog

  • Changed: In cmux NEXT, links and file refs clicked in a chat open in one pane to the right of the chat; Cmd-click keeps the old behavior.

🤖 Generated with Claude Code

Showcase

open beside before after

Full quality: open-beside-before-after.mp4

Open the live gallery

teamleaderleo and others added 5 commits October 14, 2026 02:02
open-beside-e2e.py seeds a reply with two loopback links and a file path
(debug.agent_pane seed_rows fixture: "links", webviews linksTurn.ts) and
native-clicks them: the first link opens a pane right of the chat, the second
adds a tab to that pane, a re-click adds none, and the file ref's page lands
in that pane too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leo 2026-10-14: a link (a PR's among them) or a file ref clicked in a chat
opens in the pane right of the chat, the in-app way. ChatBeside is the one
router: the first click with no pane there makes one (a new column, as an
agent's own browser does through AgentBesidePlacement); each later click adds
a tab to that pane, never another split; a click on what a tab there already
shows selects that tab. Keyboard focus stays in the chat. Command-click keeps
the old place: the default browser for a link, a tab in the chat's pane for a
file. A turn's diff chip with no header split beside the chat joins that pane.

Wired: AgentTabContent (AgentPaneView.openURL: transcript links, PR chips and
links, the link menu's Open Link; onOpenFile: path chips, changed-file rows)
and AgentChatSplitToggles (the Changes diff). File pages take a beside hook
(FilePageService, FilePageOpener, ViewerService).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 20939f08-a0ce-4337-af9b-54d449cf60c4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Gallery

Review in feed

21 states changed: agent-pane.transcript/long-code, agent-pane.thread-minimap/long-chat, agent-pane.transcript/github-references, agent-pane.transcript/permission, agent-pane.transcript/working-tools, ... · 1 play check failed

Diff page and renders (the run's gallery-pr artifact)

State Before · after
agent-pane.transcript/long-code (Apple System Colors, webkit)
agent-pane.thread-minimap/long-chat (Apple System Colors, webkit)
agent-pane.transcript/github-references (Apple System Colors Light, webkit)
agent-pane.transcript/permission (Apple System Colors Light, webkit)
agent-pane.transcript/working-tools (Apple System Colors, webkit)
agent-pane.replay/playing (Apple System Colors Light, webkit)

15 more on the diff page.

Live preview (follows this branch; start it with scripts/gallery-live.sh up <branch> from an hq checkout):

  • agent-pane.transcript/long-code: /wt/leo-open-beside/?entry=agent-pane.transcript#/agent-pane.transcript/long-code
  • agent-pane.thread-minimap/long-chat: /wt/leo-open-beside/?entry=agent-pane.thread-minimap#/agent-pane.thread-minimap/long-chat
  • agent-pane.transcript/github-references: /wt/leo-open-beside/?entry=agent-pane.transcript#/agent-pane.transcript/github-references
  • agent-pane.transcript/permission: /wt/leo-open-beside/?entry=agent-pane.transcript#/agent-pane.transcript/permission
  • agent-pane.transcript/working-tools: /wt/leo-open-beside/?entry=agent-pane.transcript#/agent-pane.transcript/working-tools
  • agent-pane.replay/playing: /wt/leo-open-beside/?entry=agent-pane.replay#/agent-pane.replay/playing
  • 9 more on the diff page

Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):

  • agent-pane.thread-minimap/long-chat (Apple System Colors Light, webkit): play: waitFor did not hold within 5000 ms

75 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes.

416 unchanged · base 9e21a5f · head c5309e7

@blacksmith-sh

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

red: web / Web status; do not merge until green; see lane-rules
red: web / react-apps-check; do not merge until green; see lane-rules

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

cmux-next tour of 86825faf48827f9c3e94f8ae56040292c410c926 (run)

Path-selected interactions

Interaction Changed paths
agent-pane Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneNavigation\+Links.swift
Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneNavigation.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/Control/DebugAgentPane.swift
webviews/src/agent\-session/acpmux/debug.ts
webviews/src/agent\-session/acpmux/linksTurn.ts
core Packages/macOS/CmuxNext/Sources/CmuxNextApp/AgentChatSplitToggles.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/AgentTabContent.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/ChatBeside.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/Pages/Files/FilePageOpener.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/Pages/Files/FilePageService\+Beside.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/Pages/Files/FilePageService.swift
Packages/macOS/CmuxNext/Sources/CmuxNextApp/Viewers/ViewerService.swift

Agent pane (before): 3 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 Open agent chat ok cmux agent new-chat
3 Queue a second chat ok cmux agent new-chat
Screenshots (3)

1. Launch
Launch

2. Open agent chat
Open agent chat

3. Queue a second chat
Queue a second chat

### Agent pane \(after\): 3 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 Open agent chat ok cmux agent new-chat
3 Queue a second chat ok cmux agent new-chat
Screenshots (3)

1. Launch
Launch

2. Open agent chat
Open agent chat

3. Queue a second chat
Queue a second chat

### Core UI \(before\): 12 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 Split right ok cmux action run splitRight
5 Split down ok cmux action run splitDown
6 New terminal tab ok cmux action run newSurface
7 Browser tab ok cmux tab new-browser --url https://example.com
8 Hide the sidebar ok cmux action run toggleSidebar
9 Show the sidebar ok cmux action run toggleSidebar
10 Notification ok cmux notify --title Tour --body "Hello from CI"
11 Notifications panel ok cmux action run showNotifications
12 Agent chat ok cmux agent new-chat
Screenshots (11)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. Split right
Split right

5. Split down
Split down

6. New terminal tab
New terminal tab

7. Browser tab
Browser tab

8. Hide the sidebar
Hide the sidebar

10. Notification
Notification

11. Notifications panel
Notifications panel

12. Agent chat
Agent chat

### Core UI \(after\): 12 ok

tour

Video (mp4)

# Step Result Command
1 Launch ok
2 New workspace ok cmux workspace new --name Tour
3 Type in the terminal ok cmux workspace name:Tour screen current pane current tab current terminal current write --text "echo hello from the cmux-next tour\r"
4 Split right ok cmux action run splitRight
5 Split down ok cmux action run splitDown
6 New terminal tab ok cmux action run newSurface
7 Browser tab ok cmux tab new-browser --url https://example.com
8 Hide the sidebar ok cmux action run toggleSidebar
9 Show the sidebar ok cmux action run toggleSidebar
10 Notification ok cmux notify --title Tour --body "Hello from CI"
11 Notifications panel ok cmux action run showNotifications
12 Agent chat ok cmux agent new-chat
Screenshots (11)

1. Launch
Launch

2. New workspace
New workspace

3. Type in the terminal
Type in the terminal

4. Split right
Split right

5. Split down
Split down

6. New terminal tab
New terminal tab

7. Browser tab
Browser tab

8. Hide the sidebar
Hide the sidebar

10. Notification
Notification

11. Notifications panel
Notifications panel

12. Agent chat
Agent chat

Tours are data in scripts/cmux-next/media/tours: add a step or a tour file to show your feature.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Unclear: web / react-apps-check failed: no known signature; failed step: Test webviews.

CI failed on c5309e7413 (run 38623562935 attempt 1): 1 unknown.
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped.

Job Verdict Why
web / react-apps-check unknown no known signature; failed step: Test webviews

Not re-run automatically: web / react-apps-check is not a machine failure.

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.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

CI fast guards failed on c5309e7413 (https://github.com/manaflow-ai/cmux/actions/runs/38623562935). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally. This comment is updated in place on each push.

teamleaderleo and others added 3 commits October 14, 2026 03:25
…ows still opens beside

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tches anchors

A file a pane other than the one beside the chat shows (the chat's own, after a
Command-click) no longer turns the click into a silent no-op: the beside open
always makes its tab, looking only in the pane beside the chat for one to select,
and only where a store tab can move there; else the old place. The placement is
made only when the tab opens, so no tracked run waits out its bound. A link click
carries its own modifiers (AgentPaneLinkClick); a link to another anchor opens its
own tab; the unused diff entity is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 14, 2026 10:32 — with GitHub Actions Inactive
teamleaderleo and others added 9 commits October 14, 2026 04:20
… the old path

Review of #20553: a file click while the daemon reconnects made no store
tab, yet reported success and left the placement waiting 30 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions lint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- vp fmt webviews/test/ime-composition-keys.test.ts
- vp fmt webviews/test/new-tab-omnibar-pointer.test.ts

Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/38568956332
…and stays in view

A New Tab page with seeded rows is no chat, so it never docks; this check
binds a session on acpmux's fake harness and adds a fifth row: after the
first click the chat is in a shown left dock and the opened pane is in
view. Red 0/5 on the test build (links go to the default browser), green
5/5 on the fix (besidefix4, cua-4). Runs without --showcase (showcase
mocks acpmux).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base's per-build isolation (cx-is1kf.3, 677f1e1) moved a build's acpmux home from
~/.acpmux/tags/<slug> to ~/.acpmux/builds/<key>; the script looked only in tags/
and stopped at "no acpmux daemon came up". It matches its own build by the tag
as a whole word, so tilesub3 never takes tilesubred3's daemon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 14, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 14, 2026 16:14 — with GitHub Actions Inactive
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
github-actions Bot added a commit that referenced this pull request Oct 14, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 14, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test/pane-english.test.ts/pane-english.test View Logs
test/subtle-elevation.test.ts/subtle-elevation.test 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

Visual preview of c5309e7: in the maintainers' private review feed.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 118 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneNavigation+Links.swift, Packages/macOS/CmuxNext/Sources/CmuxNextAgentPane/AgentPaneNavigation.swift, Packages/macOS/CmuxNext/Sources/CmuxNextApp/Pages/Files/FilePageOpener.swift, Packages/macOS/CmuxNext/Sources/CmuxNextApp/Pages/Files/FilePageService.swift. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded on feat-cmux-next; not adopting this one.

If one pane beside the chat is still wanted (for example behind the pagesFollowPlacement toggle), the clean way is a new PR on top of LinkOpener, not a merge of this branch. I'm leaving this open for its owner or Leo to close.

— cg-lane-adopt (agent; Leo's GUI push)

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by orphan-sweep on cosmic-gray · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by chief-pet-message-no-persist on cosmic-gray · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #22822 (7997e21, Leo 2026-10-20). On base, what a page opens is a tab in its own pane, routed through LinkOpener; Cmd-click follows layout.linkPlacement. Opening beside the chat already exists as the Debug tunable links.pagesFollowPlacement (off by default). This PR does the opposite (plain click opens beside, Cmd-click inverted) and adds a second routing path, so shipping it would take back the 10-20 decision.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Adopted by orphan-sweep: this PR had no owner for 15+ minutes (orphan-sweep watch). The work so far is theirs; orphan-sweep lands it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant