Repository navigation
Sidebar: let go, the edge is where it was released, not easing the last pixels - #2119
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 04:10
davidmckayv
force-pushed
the
fix/sidebar-zoom-drag-flake
branch
2 times, most recently
from
November 24, 2026 04:49
6ab9e8a to
cc83c51
Compare
…st pixels When the release reached the page before the last move had been drawn (a busy window, or a browser handing over a held-back move just ahead of the release), the last width was drawn together with the sidebar's 200ms ease coming back, so the sidebar eased the last few pixels after the pointer. That is the "width 288 -> 291" the WebKit job hit now and then in sidebar-zoom-drag. On release the rail now draws the released width at once (flushSync), lays the panel out at it while easing is still off, and only then turns easing back on, so there is nothing left to ease. A new case dispatches the last move and the release together, which failed every run before (308 drawn for 288) and passes now, in both engines.
davidmckayv
force-pushed
the
fix/sidebar-zoom-drag-flake
branch
from
November 24, 2026 05:06
cc83c51 to
36ab82d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The WebKit job's
sidebar-zoom-dragcase "a width dragged wide at 100% is held to two-fifths zoomed in" failed now and then withwidth: 288 → 291, on PRs that never touched the sidebar.Cause: the product, not the test
When the release reached the page before React had drawn the last move, the last width was drawn in the same style change that turned the sidebar's 200ms width ease back on. So the sidebar eased its last few pixels after the pointer instead of being where it was let go. A probe caught it in the act in WebKit:
{ width: 291, stored: "288", animations: ["width:running"], resizing: false }. 291 is the drag's second-to-last step.That happens whenever the move and the release arrive close together: a busy window, or a browser handing over a held-back move just before the release. Playwright's back-to-back
mouse.move/mouse.uphit it about 1 run in 9 under WebKit.Fix
On release,
SidebarRailnow:flushSync)The 288 expectation is unchanged.
Tests
291for288. After the fix it passed 100 runs in a row. These runs used headless Playwright WebKit 2336, the same revision as CI's image.sidebar-zoom-dragfile (14 cases) andsidebar-window-buttonspass in both engines. Typecheck and Biome are clean.