fix(next): settle sidebar geometry before releasing pane content
When a sidebar toggle finishes with its final Auto Layout pass still pending, releasing the pane-content hold first fits content to the previous card width and then resizes it again. Resolve the final card bounds before releasing the hold, and publish sidebar settlement only after the final layout is flushed.
Leo, as relayed on 2026-10-31:
also the toggle of opening and closing the left sidebar it's just too wonky it snaps and jitters after it overshoots and needs to correct itself
This builds on #24342's existing single width constraint and content hold. The hold stays enabled by default, preserving the optimization that avoids per-frame terminal and browser re-layout. The existing ease-out curve remains unchanged. No workspace placement default changes. #27786 stays held. #21965 adds CLI sidebar controls and #18840 addresses the classic sidebar; neither fixes this NEXT settlement ordering. Design reference: design/sidebar.md in the private design spec.
The earlier Astra BLOCK at 27992af55ed7861ee9f4765ec3d32974dd9e9bcf identified a performance regression from switching off the hold. Head bd99a5d458037a3e79c7b3ddb53bd6090f319458 restores that default and narrows the fix to settlement ordering. Risk: completion ordering and final terminal geometry; no new production timer, observer or animation loop.
Validation:
SidebarSlideHoldsContentTests.pendingFinalLayoutReleasesContentOnlyAtItsFinalWidthrecords every resize during settlement and checks the terminal receives only the final width, with no correction on the next layout pass.SidebarToggleSettlementTestsprovides opt-in display-frame coverage for open, close and both reversals, endpoint bounds and stable post-settlement frames. Its sampler stops after two seconds and deactivates on teardown. Display tests are advisory, not a landing gate.- Independent Astra high review: SHIP at the revised head. App compile passed at the revised head (job
ba356f47a27663e60ea7ab4a, reported 102 seconds). The non-display settlement test step25c5f3aa8c962dc35932b6c8is still running; no test pass is claimed yet. - Capture fixture:
scripts/cmux-next/media/states/sidebar-toggle-motion.json(schema checked). Screenshots are follow-up evidence, not a landing gate. No runtime visual result is claimed yet.
Performance
No perf numbers: this revision fixes settlement ordering, retaining the existing content-hold optimization and animation duration. It claims no throughput or frame-time improvement; the regression test checks intermediate resize counts rather than a timing benchmark.
Agent session: agent session