Repository navigation
cmux NEXT: a chat shown again from another tab no longer jumps - #23743
Conversation
A chat shares the pane's tab row and fills the pane; a terminal sits under the strip. The parked chat followed the content host, so switching away shrank its page by the strip's height and switching back grew it again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-a80b-79c0-ab31-500e58883d27&host=cosmic-gray
The content host is the whole pane while a chat shows (its tools share the tab row) and the area under the strip while a terminal or browser shows. A parked chat was autoresized with the host, so every switch away shrank its page by the strip's height and the switch back grew it again: the page laid out at a size it never shows at and the transcript moved as it came back. Parked row-sharing pages now keep the frame they show at (layoutParked), and install keeps that frame so the next layout only moves the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-a80b-79c0-ab31-500e58883d27&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)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by Tour of Path-selected interactions
Agent pane (before): PASS — 3 ok
Screenshots (15)1. Launch
Screenshots (15)1. Launch Tours are data in |
|
Owned by glass-regressions on cosmic-gray · session |
|
Bead |
|
Review (subagent, correctness first): CHANGES at 1767fa9 The native fix reads correct to me. Parked row-sharing pages stay at the frame they show at ( What is missing before this ships:
CI at this head: the Swift code hasn't compiled yet. |
…gh retire's branch The test's chat is now an InternalPageView (the kind retire keeps sized with the pane, as an AgentPaneView), so reverting retire's parkedFrame check fails it, and it watches the chat for 500 ms on the run loop after the switch. AgentPageRedraw.awaits compares the page's own frame, which the pane keeps at the size it shows at, so a switch back to a chat at that size holds nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16027-a80b-79c0-ab31-500e58883d27&host=cosmic-gray
|
Found 1 test failure on Blacksmith runners: Failure
|
|
Review (subagent, correctness first): SHIP at d3ac814 The fix is correct. A hidden page now stays at the frame it will show at ( The earlier CHANGES at 1767fa9:
Regressions and races: I found none. Hidden pages still move no view on a switch (PaneParkScalingTests and InternalPageParkingTests pass). Parked non-chat internal pages are now kept under the strip while a chat shows, where before they grew with the host, so the same class of bug is fixed for them too. Between Verified on the fleet:
Not blocking:
|
…integration PaneContentView keeps this branch's layout of resized content and the base's parked-chat autoresizing and layoutParked (#23743); the settings source stamp was recomputed with defaults_guard.py source-stamp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
base-red-watch: |
|
Shipped in:
|








































![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo: "THIS WHOLE THING CAUSES A LAYOUT SHIFT WHEN I SIMPLY SWITCH TO IT FROM ANOTHER TAB."
This PR fixes the native resize behind the shift. A check of the webview's scrollTop and first visible message on show is a follow-up (see below).
Cause
A chat's header tools share the pane's tab row (
chrome.tabs.rowTools, added in #20933 and turned on by default in #22655). So while a chat shows,PaneContentView.layout()makes the content host the whole pane. While a terminal or browser shows, the host is only the area under the strip. A parked chat kept[.width, .height]autoresizing (retire: "stays sized with the pane"). As a result:installsized it to the still-short host, and the next layout grew it to the full pane.The page laid out at a height it never shows at, and the transcript re-placed itself as the chat came back (the follow/anchor pass in
VirtualTranscriptruns on every height change).AgentPageRedraw.awaitssaw the size come back to the drawn size and ended the paint hold without waiting for a frame, so the move was on screen.On the red commit, the test records exactly this: the chat's sizes go
[(900, 472), (900, 500)], shrinking by the 28 pt strip and then growing back.Fix
PaneContentView.parkedFrame(of:)gives the frame a parked row-sharing page (a chat) shows at: the whole pane when its tools fit the row, otherwise the area under the strip.layoutParked(), called fromlayout(), keeps hidden chats at that frame. A window resize still reaches them; a tab switch no longer does.retiredrops autoresizing for those pages.installleaves a chat that is already at its frame alone, andlayout()restores autoresizing once it is the shown content.AgentPageRedraw.awaitscompares the page's own frame rather than the host's, so a switch back to a chat already at its size starts no paint hold.Test
ParkedChatKeepsSizeTests(CmuxNextAppTests) shows a chat, then a terminal-like view, then the chat again. The chat is a realInternalPageView(the branchretirechecks) wrapping a row-sharing view, and every frame change is recorded throughframeDidChange. The test asserts:the chat never changes size while parked or on the way back;
for 500 ms after the switch (16 ms run-loop ticks, a layout pass each tick), its window rect and size never change;
a parked chat still follows a pane resize.
Red: test commit f112bb3, fleet step
9af3d9782b0e85860818e4cb, failed as expected (above).Green: head d3ac814, fleet step
36d1d4f821a14a6b174bbe9d. Passed: ParkedChatKeepsSizeTests, TabRowToolsStayClickableTests, TabSwitchNoBlankFrameTests, InternalPageParkingTests, PaneParkScalingTests, WorkspaceSwitchRedrawHoldTests.Mutant:
retire'sparkedFrameclause reverted (c20b228, scratch only), fleet step660d5b8f7fb3a8bcc8d1bd9d. Fails, sizes[(900, 472), (900, 500)], so the test covers that branch.App compile:
cmux-ci compile-check --appjobc3201f15ae593ebdd8f81f80at d3ac814, passed (62 s).Observed / Not run
shared/pageReveal.tsstops entrances and glides while hidden or on the first frame back;VirtualTranscriptignores zero-height measurements). This PR removes the resize that drove the transcript's re-placement.No capture: this removes a resize that happened only during a tab switch; at rest nothing looks different.
Changelog
Agent session: cosmic-gray
🤖 Generated with Claude Code