cmux NEXT Chromium: resize sync drag mode, the page waits for its frame up to half a display frame (fork API 27)
Adds the Debug Settings browserResize.dragResize = resizeSync mode for #26037. On fork API 27 or newer, pages lay out live during divider and edge drags while each affected page window waits for Chromium’s frame at its new size. The 16 ms tunable is capped at half the shortest display frame; live window resize takes precedence.
Each tab container holds a share of its pane’s drag until release lands or the container leaves its window. Docked DevTools joins when opened or shown mid-drag and releases its share when hidden or removed. Repeated layouts do not acquire extra shares.
The default remains live. The current cmux.28 pin exposes API 24, so this mode behaves as Live until a separate pin update enables API 27. This PR does not change the CEF pin.
Performance
No perf numbers: the current API 24 pin cannot activate resize synchronization. This PR adds a Debug mode and verifies its lifecycle bookkeeping; API 27 runtime measurements are required before enabling it or changing the default.
Validation
Merged origin/feat-cmux-next at 5b10a8ae2f6987c4eb0558d79027618962020822 without conflicts. All five changed Swift files pass syntax parsing, and the pre-push gate reports no new violations.
Focused fleet verification used the same command at the regression commit and final head:
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref 0ec558acffd72763e4bf1d72330ff74459254a8f --arg suite --arg Packages/macOS/CmuxNext --arg CEFLayerHostingTests,CEFLayerHostingLiveResizeTests,CEFLayerHostingPaneDragTests,CEFDeferredTabShowTests --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.app
- Before fix,
730e304873ba888b4b6df59df99f782abb06f4fa, fleet step8842ec03eab096821aa76989: the two new DevTools joining cases failed because drag participation and a positive deadline were missing. The other three selected suites passed. - Final head,
0ec558acffd72763e4bf1d72330ff74459254a8f, step13e6f4eacd717aa8f279a23d: all four selected suites passed (47 tests), including both regression cases.
Independent exact-head SHIP review. Tagged fleet build b14761dc21a450f6be687706 succeeded: open issue-26037-resize-sync-review.
Observed / Not run
- Display run at the current head e806da420f6a (added by the ready-queue unblocker): compile-check
fc27490a0fd344ded9303332(CmuxNext with test targets, app, cmux-tui: passed), then fleet step1e249b6237ef5951564062d6on a gui-session-v1 worker (cmux10s-Mac-mini) in cmux's console session,CMUX_TEST_REQUIRE_GUI=1(a skip fails the step): CEFLayerHostingTests, CEFLayerHostingLiveResizeTests, CEFLayerHostingPaneDragTests and CEFDeferredTabShowTests: all 4 suites passed, 47 tests, exit 0. - Observed: syntax parsing, the static pre-push gate, the focused red/green regression, and a successful tagged build on the merged head.
- Not run: a performance comparison with API 27 enabled. The pinned runtime cannot exercise resize synchronization; the default stays Live.
No capture: this Debug-only mode behaves as Live on the current API 24 pin, so a capture cannot demonstrate API 27 synchronization.
Changelog
none (Debug Settings only)
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds a fourth browserResize.dragResize mode, resizeSync (fork API 27): during a divider or edge drag the page lays out live, and every page window over the dragged pane waits for its frame at the new size up to browserResize.dragResizeDeadline (16 ms, capped at half the shortest display frame) from the drag's first move until its release lands.
- A docked DevTools joins the wait when it opens or becomes visible mid-drag and releases its share when hidden or removed; repeated layouts do not acquire extra shares.
- Each tab container counts in the drag, so a container leaving its window mid-drag (tab closed or moved) and a closed page window hand their shares back.
- Live window resize takes precedence, and below fork API 27 the mode behaves exactly like
live; the default stayslive.
Remaining work
- Pin to
cmux.33(API 27) to enable the mode; the current pin is API 24, soresizeSyncbehaves aslive. - Measure
resizeSyncagainstlive,hold, andsyncedwithsplit_resize.pybefore changing the default.