Skip to content

Read a version on one light desktop page and its width sweep, without the 3 s shift watch - #6136

Merged
max-sixty merged 6 commits into
mainfrom
render-one-load
Nov 16, 2026
Merged

max-sixty merged 6 commits into
mainfrom
render-one-load

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

A render reading is now one fresh page load, light at the desktop viewport, plus the existing width sweep from 360 to 1920 px. It no longer loads the page again in the dark scheme and at a 540×720 phone window, and it no longer watches the presented page for 3 s of layout shifts. Neither part has caught anything on a real page. On this machine:

  • the 3 s watch (passive-layout-shift) fired 0 times, across 86 kept readings and 373 page logs (10–15 Nov);
  • of 102 distinct findings, none appeared only in dark or only at the phone size: the light desktop load and its sweep found every one;
  • a search of about 5,900 commits found no dark-only or phone-only finding from the render check that ever led to a fix. The real dark-theme defects in history were caught by stills or dedicated tests, which stay.

Measured with paired runs on 8 pages (4 real page copies, 4 examples), in shuffled order: a reading falls from about 8.3 s to about 5 s (−37% wall, −47% CPU). The finding sets (code, element, widths) are identical on all 13 pages tried.

Two commits:

What to weigh:

  • A fault that shows only in dark CSS, or only when a page first loads 540 px wide, is no longer reported.
  • The render suite no longer runs the check over the shipped examples in dark. Leaf's dark theme keeps its own tests, including code contrast in both schemes over every example.
  • Finding text drops its [light]/[dark] and (at 540x720) marks.
  • The phone screenshots page check --render saves are unchanged.

This builds on #6127, which deleted startup-layout-shift.

Max asked to review keeping these, adding "we generally want to simplify and remove where possible". Codex reviewed it and found no dangling consumers of the removed fields, with every remaining check and the saved screens still working.

Tests: 35 focused tests (render gate model, handover, and single render-gate journey and browser tests); pnpm run check:browser. The deleted tests covered constructed cases only: the #4704 timer page, a card clipped only by a dark rule or a 720 px height, and lf-dusk, whose words change only in dark.

This was written by Claude Code on behalf of max-sixty

The render check, in `page check --render` and in each page server's
background reading of a handed-over version, no longer gives the
`startup-layout-shift` advice. From 10 to 15 Nov it made 64 of the 109
findings those readings told agents on the pages in the state home, and
it came and went between readings of the same page: fork-roadmap's 41
readings found it 6 times and told it 5.

It reported every layout-shift entry Chrome recorded between navigation
and the settled page, with no threshold. A box that changes size while
the page loads moves painted content only where a frame was painted
first, so whether a load reports it is a race. Ten runs of the reading's
check per page copy:

- An `<img>` without width and height decodes about 30 ms after
  navigation, around the first frame: thread-option-focus-ring reported
  it in 4 of 10 runs, diagram-fits-column on 6 to 8 of 10 per render page.
- `lf-shot` has no box until its module draws, then 720 px at about
  260 ms: thread-message-times, menu-hovers and error-dot-surface 10 of
  10. The author can't reserve it.
- `lf-toc`'s map rows rescale once the page settles (CLS at most 0.001):
  fable-problems 1 of 10.
- The release-notes, pr-walkthrough and security-boundary examples: 0
  of 10.

About half the real findings came from Leaf's own widgets, whose one
resize as they draw #4724 accepted. A widget that states a height gets
`drawn-height` advice, read from its boxes rather than paint timing,
which #5571 added because shift evidence couldn't carry the height. The
rest were unsized images racing the first frame on a local server; no
check reports those now.

The passive watch after presentation, the only shift reading left, owns
its PerformanceObserver in its probe, since the driver's shared
observer existed for the startup window.
The render check (`page check --render`, a page server's reading of what
an agent hands over, and the render suite) no longer leaves the light
desktop page alone for 3 s and reports `passive-layout-shift` advice for
content a page's own timer moves. The dark and phone pages it loaded
during that watch now load after the light page, one at a time, as they
did before #6114.

The watch came from #4704, a constructed page that resized a block on a
1.5 s timer. In 86 kept readings and every `render` event in 373 page
logs on the maintainer's machine (10-15 Nov) it never fired. A page
whose script moves content on a timer now passes without that advice;
`page-behavior.md` already tells the author that code run by a timer
isn't reached and to operate those paths before handover. With startup
shifts already gone, the check reads no layout shifts at all.

Deleted with it: the `passiveLayoutShifts` probe and its module,
`observe_probe` (its only caller), the layout-shift entry type, the
finding's words and its paragraph in `page-behavior.md`.

Tests: the three tests of the watch go (a timer page through
`render_version`, the advice read with and without reserved space, and
what one observation window attributes), with the model test of
`observe_probe`'s cleanup.
The render check (`page check --render`, a page server's reading of what
an agent hands over, and the render suite over the shipped examples) now
loads a page once, in the light scheme at the desktop window, and resizes
that page from 1920px to 360px as before. It no longer loads the page in
the dark scheme at the desktop window, or in either scheme at a 540x720
phone window, and the sweep no longer steps through 540px or sweeps the
narrow widths a second time at 720px tall.

What a page no longer has checked:
- anything that goes wrong only in the dark scheme: a widget that throws,
  draws into a box too small, leaves an SVG paint token unresolved or
  replaces its words only under `prefers-color-scheme: dark`, or a dark
  rule that clips a control;
- anything that goes wrong only when the page first loads in a 540px
  window, such as a widget that lays itself out once by the window it
  started in, or a startup error at that width;
- a box sized by the window's height that clips at 720px tall, where the
  user's window is taller (the fixed 1280x720 desktop sweep still reads
  720px).
None of these was ever seen on a real page. In the 86 kept readings and
every `render` event in 373 page logs on the maintainer's machine (10-15
Nov), no finding came only from the dark or the phone pages, and no
commit records a dark-only or phone-only render finding that led to a
fix. Leaf's own dark theme keeps its dedicated suite checks, such as code
contrast in both schemes over every shipped example.

Findings lose `scheme` and `viewports`, which only said which of the
four pages read them, so their words lose the `[light]`/`[dark]` and
`(at 540x720)` marks, and a console finding its `console:` prefix. Each
finding is now reported once rather than once per scheme.

`_render_scheme` is `_render_page` and takes no scheme. The suite's
syntax-contrast journey keeps the scheme beside each of its findings
itself.

Tests: the constructed dark-only cases go (a card a dark rule clips, and
`lf-dusk`, whose words change only in dark), as does the card that clips
only at 720px tall under a 900px desktop. The test that the gate renders
four pages now says it renders one, and the counts that doubled per
scheme are halved.
leaf-agent
leaf-agent previously approved these changes Nov 16, 2026
Base automatically changed from startup-shift-advice to main November 16, 2026 08:44
@max-sixty
max-sixty dismissed leaf-agent’s stale review November 16, 2026 08:44

The base branch was changed.

# Conflicts:
#	browser/types/render-checks.d.ts
#	src/leaf/render-checks/shifts.js
#	src/leaf/render_gate/readings.py
#	tests/browser/test_page_layout_shifts.py
@max-sixty
max-sixty merged commit e6802be into main Nov 16, 2026
5 checks passed
@max-sixty
max-sixty deleted the render-one-load branch November 16, 2026 09:12
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.

2 participants