Repository navigation
feat: report passive page layout shifts during render checks - #4708
Merged
Merged
Conversation
Observe native layout-shift entries for three seconds before the render viewport sweep. Report moved content nodes and their painted boxes as advice, keeping ordinary page checks fast and leaving later timers and gesture paths explicit. The timer regression returns no findings on 0e433e7 and reports the moved paragraph with this change; a fixed-height control remains quiet. Closes #4704
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.
page check --rendernow observes native layout shifts for three seconds on the presented desktop page, before resizing it or opening threads. A page script that grows a block on a 1.5-second timer now produces advice naming the paragraph it moved, with before/after painted boxes. Ordinary page checks keep their startup-only scope.This uses Chrome's
layout-shiftentries rather than bringing the suite's gesture-attribution machinery into the product. The findings are advice: moved nodes identify effects rather than causes, and the finite observation does not cover later timers, gestures, offscreen content or embedded documents. The cost is three seconds per render attempt, once rather than at every viewport and scheme.Validation: the full render regression fails on base
0e433e794with no findings and passes with this change; the browser tests cover the delayed timer and a fixed-height control. Six existing render-gate model tests andpnpm run checkpass. Three-second observations of the shipped motion-playground, live-progress and code-comparison pages each returned no advice. This small sample establishes no broad precision or recall rate; the browser's viewport and finite interval still bound recall.Closes #4704 — automated triage