Skip to content

feat: report passive page layout shifts during render checks - #4708

Merged
leaf-agent merged 1 commit into
mainfrom
feat/issue-4704
Oct 29, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
feat/issue-4704

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

page check --render now 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-shift entries 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 0e433e794 with 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 and pnpm run check pass. 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

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
@leaf-agent
leaf-agent merged commit fa4a30a into main Oct 29, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the feat/issue-4704 branch October 29, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

page check doesn't catch a page script that resizes a block after load

1 participant