Repository navigation
fix: wait for rendering before reading margin scroll geometry - #4829
Merged
Merged
Conversation
The source-tracking test measured inside its second animation-frame callback, before placement had settled. At 40x CPU slowdown the failing read put the card bottom at 1122.64px; the next sampled frame correctly clamped it at 892px. Use the shared rendered wait after each scroll, retaining every geometry assertion. Closes #4233
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 margin source-tracking test can sample the reverse scroll before placement has finished. On current main, the original upward-clamping assertion fails on Linux at 20× CPU slowdown. A frame trace at 40× captures the same failure: card and source both stand at 516.84px, with the card bottom at 1122.64px; the next sampled frame has the card correctly clamped at 892px, and subsequent frames keep that position.
Read each scroll through the existing
rendered()helper before measuring geometry. This waits for rendering to settle instead of assuming two animation frames suffice. All source-following, panel-clearance and bottom-clamping assertions remain intact, and product placement behavior is unchanged.Validation: the targeted test passes at normal speed and at 40× CPU slowdown after the change. The reproduction and frame trace were collected on Linux; macOS was not run locally.
Closes #4233 — automated triage