Skip to content

cmux-next: a link from a lone chat opens its split without re-animating the chat - #22949

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
fix/chat-dock-link-split
Oct 21, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
fix/chat-dock-link-split

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Leo's bug (screenshots): in a workspace with one agent chat and no splits, clicking a link in the chat first plays an opening animation on the chat itself, which shrinks or re-animates, and only then does the link's tab show in a right split.

Cause. With a lone chat, AgentBesidePlacement keeps the new tab in the chat's own pane and moves the chat into a new left dock column (TabMoves.toNewDockColumn). The layout only sees panes, so it played the change as a split: the new dock (now holding the chat) grew in from the left edge while the old pane (now holding the link) shrank to the right.

Fix. Before docking, the placement names the chat's pane with LayoutModel.handOffContent(of:), a one-shot hint that expires after 3 s. The next structural change that adds a pane beside it plays as a hand-off (PaneArrival.handoff):

  • The added pane (the chat) shows at its final frame from the first frame. It doesn't grow in and doesn't fade.
  • The old pane (the link) goes to its final size at once and slides in from the screen edge across from the chat, which is the right edge here. Its content lays out once, not on every frame.
  • With pane animations off or Reduce Motion on, both snap, as before. All of this stays under the panes motion category (ui.paneAnimations).

Test

ChatDockLinkSplitMotionTests.theChatStaysAndOnlyTheLinksPaneSlidesInFromTheRight steps 120 frames at 120 Hz. It checks that:

  • the chat's host frame takes one value, its final one, and its alpha stays 1 the whole time
  • the link's pane keeps its final width in every frame, starts past the right edge, never moves back right, and rests right of the chat

Red commit: 4ca0ec2 (test, plus the hint stored but unread). Fix: 394a826, then 9bf6812 (review follow-ups: the slide side compares both panes where they show, the hint is spent only on the giver's screen and dropped when the dock fails, and a hand-off's new dividers start in place).

Changelog

  • Fixed: Clicking a link in a lone agent chat no longer re-animates the chat; only the link's new pane slides in from the right.

Observed / Not run

  • Observed, red on 4ca0ec2 (fleet step 97e2312a, cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext --ref 4ca0ec2f71c --red): ChatDockLinkSplitMotionTests fails 4 expectations. The chat's frame width goes 0, 9, 33, 67, 106 ... 597 (the dock grows in from the left), the link's pane starts at minX 0 instead of past the right edge (1200), and its width changes while it comes in. That step ran the whole package; its 26 other failed suites (e.g. ActionSurfaceParityTests, ClassicUpgradeHugeSimulationTests, SettingsSchemaExportTests) are on the base commit and untouched here.
  • Observed: prepush-gate.py reports no new violations on every commit.
  • Observed on fc03897 (base merge of e9d7630): the fleet app compile and link (cmux-ci compile-check --app) passes. ChatDockLinkSplitMotionTests (1) and SplitSpringMotionTests (12) pass on the fleet (step a.k.a. docksplit-s2) at fc03897 plus the base's compile fix f5bbdfe (fix(next): the CmuxNext package compiles again — three one-line breaks on base #23281): the head alone does not compile its tests, because of the base's PageEnginePolicyTests and ChiefAppAcpmuxTests breaks. CI reds are base or infrastructure: cmux-next checks (Tier routing; "Pushed commits add no violations"), generated drift (files this PR did not cause), action export areas and merge freeze (API rate limit, reran). Capture: media-tour.
  • Not run: CI's own Release compile and cmux-next swift test were still queued at merge (fleet backlog); its swift test would build against the base before fix(next): the CmuxNext package compiles again — three one-line breaks on base #23281.
  • Green on the head: from this PR's CI CmuxNextAppTests and Swift compile (see below once in).
  • Base red, not this PR: cmux-next guards / defaults-snapshot lists mobile.allowIPhoneConnections, sessions.allowFullAccess, sidebar.priorityView.* and ui.calm, none of which this PR touches.
  • Not run: the agent-pane webview remounting its content on the move (the "content never replays its entrance" half). The layout test covers the native host (one frame, opaque); I have not checked whether the webview's own entrance replays when the chat's view moves to the new host.

Agent session: huge-blue

🤖 Generated with Claude Code


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


Summary by cubic

Fixes an animation bug where clicking a link in a lone agent chat replayed the chat's opening animation before the link's panel appeared. The chat now stays in place and only the link's panel slides in from the right edge, using a one-shot hand-off hint that lapses after a few seconds and is dropped if the dock move fails. The hint only fires for a structural change on the giver's screen, so later or unrelated splits still play as splits. With pane animations off or Reduce Motion enabled, both panes snap as before. Adds a frame-stepping test covering the motion.

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

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 04:44
…e link's pane slides in

Failing per-frame test (120 Hz): the chat's new left dock must show its final
frame from the change on, opaque, and the pane keeping the link's tab must come
in at its final width from the right edge. The LayoutModel hand-off hint it
calls only records the pane here; the layout does not read it yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cc2-04ea-7352-837a-21905d44c199&host=huge-blue
…ng the chat

A link clicked in a lone agent chat docks the chat left in a new column and
keeps the link's tab in the chat's old pane (AgentBesidePlacement). The layout
saw a split and grew the new dock in from the left edge while the old pane
shrank right: the chat seemed to open again before the link appeared. The
placement now names the chat's pane (LayoutModel.handOffContent): the dock shows
at its place from the first frame and the old pane, showing the link, slides in
at its final size from the right edge (PaneArrival.handoff). Pane animations
off or Reduce Motion: both snap, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cc2-04ea-7352-837a-21905d44c199&host=huge-blue
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

owner: 01a15cc2-04ea-7352-837a-21905d44c199

@cursor

cursor Bot commented Oct 21, 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.

@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 fe4d221: 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=pr22949 -f ref=fix/chat-dock-link-split -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on fc03897dc0; ci-status is green without them.

CI passes on fc03897dc0 (run 39591982082 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

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.

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base e9d7630; does not block

…t scoped to its screen and dropped on a failed dock

Review of #22949: compare the giver and the added pane where they show
(dock in view points, strip in strip points), clear the hint only on a
change on the giver's screen and when the chat move fails, and seed a
hand-off's new dividers in place instead of riding the sliding pane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cc2-04ea-7352-837a-21905d44c199&host=huge-blue
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 25 of 27 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next crash-class rules / cmux-next crash-class rules is red on 12 of 12 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.

…-dock-link-split

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextLayout/Views/ScreenContentView.swift
@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026

Copy link
Copy Markdown

Found 4 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp1woiccu5/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpovgcnppb/summary-fail.json (live):/summary-fail.json (live): View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_every_source_and_test_directory_is_a_target (main.GraphCoversThePackage.test_e
very_source_and_test_directory_is_a_target) (directory='CmuxNextHomeEngineTests')/
test_every_source_and_test_directory_is_a_target (main.GraphCoversThePackage.test_e
very_source_and_test_directory_is_a_target) (directory='CmuxNextHomeEngineTests')
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

PR capture check / pr-capture-check is red on 24 of 30 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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

codex-review: SHIP at fc03897

  • Reviewed the current diff, its focused tests, and the affected call paths; no correctness bug found.

@teamleaderleo teamleaderleo added the media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push label Oct 21, 2026
@teamleaderleo
teamleaderleo merged commit e572af1 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the fix/chat-dock-link-split branch October 21, 2026 11:40
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…only the new column slides in

MainPaneLayout.dockChat hands the chat's content to the dock (LayoutModel.handOffContent, #22949), as AgentBesidePlacement does, and cancels the hint when the dock fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
… on its right (#23105)

* cmux-next: main pane layout, an agent chat's opens land in one column on its right

`layout.mainPane` ("agent-chats" by default, "off"), with a Debug Settings override
(`panes.mainPane`: follow the setting, on, off). An agent chat that is its screen's main pane
(the chat dock, or a chat alone on its screen) never holds what it opens:

- links, files and folders it opens (LinkOpener) are a tab in the strip pane right of the chat
  dock, or, from a lone chat, open unselected in its pane while the chat docks left, so that pane
  becomes the column on its right;
- subagent and side chat panes (AgentTabStore.openBeside) are tabs there too instead of splits
  stacked beside the chat.

The placement is ChatColumnPlacement's, the rule a person's new tab from the chat already
follows. A person's click focuses the new tab; an agent's open keeps focus in the chat. Closing
the column's last tab folds the dock back into a plain pane, so the chat gets its full width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* cmux-next media: main pane tour (lone chat docks for a link, tabs join the right column, close gives full width)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* release notes: main pane highlight gets a New Agent Chat try-it action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* cmux-next: escape the quotes in the main pane Debug help string

The unescaped "Follow the setting" ended the string literal, so CmuxNextLayout did not compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* cmux-next: main pane keeps focus on agent opens, finishes after the dock, keeps chats in the dock

- An agent's open in the right column selects its tab without moving keyboard focus (selectWhenReportedKeepingFocus), as AgentBesidePlacement does.
- A lone chat's open reports finished only once the chat is listed in its dock, so a queued second open lands as a tab in the same column instead of a split.
- A past chat picked on a New Tab page in the chat dock replaces the page in the dock again; main pane routing applies to terminals, browsers and links only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* chore(next): PR autofix (regenerated settings exports from run 39569875874)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* chore(next): PR autofix (regenerated settings exports from run 39588693869)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* cmux-next: a lone chat docking for a main pane open keeps its place; only the new column slides in

MainPaneLayout.dockChat hands the chat's content to the dock (LayoutModel.handOffContent, #22949), as AgentBesidePlacement does, and cancels the hint when the dock fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

* Keep base's test registry (the merge hook registered a base test; that belongs to base)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15d2d-622e-7433-aed6-f3c248542f5d&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

media-tour Run the cmux-next UI tour (cmux-next-media.yml) on every push risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant