Repository navigation
cmux NEXT: new tabs from an agent chat open on the right, after that pane's selected tab (fixes #23105 regression) - #23882
teamleaderleo wants to merge 6 commits into
Conversation
Leo 2026-10-21 on nightly: "THIS ADDING TABS: IT SWITCHES AROUND AND DOESN'T REALLY GET ADDED". Since #23105 chats dock, and ChatColumnPlacement sent a docked chat's Cmd-T and + to the strip column on its right, and moved a lone chat into a new left dock, so the new tab never showed where it was added. A pane whose strip takes new tabs now keeps its new tab (right after the selected one, selected); only Home's pinned dock, which takes none, still opens the page beside it. 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 status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 44fc3d3 to compare; do not merge until green; see lane-rules |
|
Found 11 test failures on Blacksmith runners: Failures
...and 1 more test failures. View all on Blacksmith
|
|
|
|
Bead |
newTabOfPaneKind computes once whether a person's new tab stays in the pane it was asked from (ChatColumnPlacement.newTabStays) and passes it to newTerminal and newBrowser as staysInPane, so New <Kind> Tab (Option-click on the +), and the terminal fallback in a build without the New Tab page, no longer route terminal and browser tabs to the strip column beside a chat dock. Other callers of ChatColumnPlacement.route are unchanged. Adds a test for Option-click + on a browser tab in the dock, and skips both tests in a build without the New Tab page. 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
|
|
|
Review (independent subagent): SHIP at 174c55f
The one seam for the coming "Open new tabs and links" setting (#23886) is |
…e's slot
Leo 2026-10-21: "DEFAULT ON THE RIGHT". Cmd-T, + and Option-+ in an agent
chat's pane follow layout.linkPlacement through one seam,
ChatColumnPlacement.newTabStays(in:services:): split-right and new-column
(the default) open the tab on the right, same-pane keeps it in the chat's
pane. Every other pane keeps its new tab.
What Leo hit ("IT SWITCHES AROUND AND DOESN'T REALLY GET ADDED"): a tab
routed from the chat dock to the strip pane kept the chat pane's slot, so
it was held in the chat's pane and then landed at the strip's end. It now
takes the strip pane's slot (NewTabSlot.rebased): right after that pane's
selected tab, selected and focused. A lone chat's New Tab page opens in a
new split on its right; the chat stays.
Tests: Cmd-T and Option-+ from a docked chat land after the strip's
selected tab with focus there and the dock unchanged; with same-pane they
stay in the dock; Cmd-T in a terminal pane stays in it.
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
The on-the-right tests focus the dock before the press, so the strip's focus afterwards proves the new tab moved it. The terminal-pane test opens a terminal tab (the app's first tab here is a conversation) and checks the new tab lands right after it, before a page. 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
|
Review (independent subagent): SHIP at 0c121c8
This supersedes the earlier receipt at 174c55f (the spec changed to "on the right by default"). |
…tab-in-pane # Conflicts: # Packages/macOS/CmuxNext/Sources/CmuxNextApp/Handlers/TabLifecycle.swift
|
Orphaned: no activity for 16 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
|
|
Owned by nx-chat on big-red · took over from session 01a15d2d |
|
Stale (13d, conflicts); rebuild fresh from feat-cmux-next if still wanted |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo on nightly 3a63d6d (2026-10-21): "THIS ADDING TABS: IT SWITCHES AROUND AND DOESN'T REALLY GET ADDED". Lucas: tabs "disappear inside of chats". Then Leo: "DEFAULT ON THE RIGHT ... EVERYBODY IS SAYING OPEN DEFAULT ON THE RIGHT".
Regressing PR: #23105 (2a7eec5, main pane layout). Since then chat docks are common. Cmd-T and + in a docked chat's pane went to the strip pane on its right, but
NewTabSlotstill anchored the tab's slot on the chat pane's selected tab. So the placement was held in the chat's pane, never found the tab there, and the tab landed at the end of the strip pane, out of view.Rules:
newTab.ofKind) in an agent chat's pane followlayout.linkPlacement(read throughservices.linkOpener.placement()):split-right/new-column(the default): the tab opens on the right, in the strip paneChatColumnPlacement.routepicks (the most recent one). It lands right after that pane's selected tab, selected and focused, and no other tab moves in either pane. From a lone chat, a terminal or browser tab still docks the chat as on base. A New Tab page opens in a new split on the right and the chat stays where it is.same-pane: the tab stays in the chat's pane, right after its selected tab, selected.ChatColumnPlacement.routecallers (newSurface, openBrowser, link opens), are unchanged.Change:
ChatColumnPlacement.newTabStays(in:services:)is the one seam: it decides whether a person's new tab stays in its pane.TabLifecycle.newTabOfPaneKindcomputes it once and passes it tonewTerminalandnewBrowserasstaysInPane, and uses it for pages too.NewTabSlot.rebased).Tests:
NewTabStaysInItsPaneTests(daemon-backed, 5 tests) builds an agent chat dock left of a strip pane, with focus in the dock.same-pane, both add the tab to the dock right after its selected tab, and the strip is unchanged.Fleet: the app compile check and the suite (5/5) passed at the head.
Known gap, not a regression: after a lone chat's first New Tab page splits right, the chat is not docked. A later Cmd-T in the chat then stays in its pane, as on base.
No capture: the before/after recordings from the fleet repro show a private host; the tests pin the behaviour.
Leo-ask: ask-504ac4c80e
Agent session: cosmic-gray
🤖 Generated with Claude Code