Repository navigation
Report a control clipped anywhere in the width sweep - #3285
Merged
Merged
Conversation
The render gate read clipped controls only at its two fixed viewports, so a control cut off only between 360 and 440px (a fixed-height card whose prose wraps longer on a phone and pushes a decision under its clip) went out with the handover. The sweep already resizes the loaded page through every width from 360 to 1920px and reads its geometry in one probe call per width, so that call now reads clipped controls too, and the gate reports each run of widths where one stands, as it reports sideways overflow and scrollbar collisions there: an error, since a control out of reach at 400px is as unusable as one at 540px. No page load or pass is added. On the corpus page the sweep's 41 readings took 6.0-6.3s with and without the change across paired runs, so the cost is below the noise; on triage-board both arms read 0.11-0.15s. A swept run is left to the gate's own render when it takes in a width the gate renders. That was the two fixed widths; it now includes the margin widths the gate renders after the sweep, so a fault at a margin width (overflow included) is reported once rather than by both the sweep and that render. `restsOverPage` moves to reachability.js so layout.js can import `clippedControls` without an import cycle. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # TODO.md
leaf-agent
reviewed
Oct 20, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The 540px fixed render does not cover the sweep's 540px reading: sweep() uses the desktop height of 900px, while the fixed phone render is 540×720. Here fixed includes 540, so swept_faults() discards an entire clipped-control run that spans it. A card that clips its control only at widths around 540px and heights above 800px is missed by the phone render and then discarded from the sweep, so the new gate can still pass an unreachable control. Suppress a swept run only when a render at the same viewport geometry covers that finding; the 540px phone render cannot stand in for the 540×900 sweep sample.
The sweep reads every width at the desktop height, 900px, while the phone viewport renders 540px at 720px. Dropping a swept run because it took in 540px assumed that render had reported it, so a control clipped below a card only at the taller height went unreported (leaf-agent's review on #3285). A swept run is now dropped only where a render at a width inside its span, fixed or margin, read the same fault on the same element, matched by code and place. This also covers the margin widths, which the width rule needed listing separately. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
…#3300) The render gate read sideways overflow, misplaced boxes, scrollbar clearance, clipped controls and covered words at every render (1200x900 and 540x720 in both schemes, and each margin width) and reported each there, and the width sweep read all but covered words again at every width from 360 to 1920px. To report each fault once, a rule dropped a swept run wherever a render inside its span read the same fault on the same element (#3285). That rule is gone. The geometry is now one reading, `swept_faults`: every render adds samples to it, and each fault is one finding per unbroken run of widths where any sample at those widths reads it, with no scheme. - Every render reads the geometry once at the size it loaded at, before it opens a thread, as it did before. A page's own rules can lay it out differently in the dark scheme, and a widget can lay itself out by the window it first met, which resizing a loaded page never shows. - The light desktop render then sweeps every width from 1920 to 360px at 900px tall, as before. - The light phone render then sweeps from 540 down to 360px at its 720px height. The sweep read every width at 900px, so the 540x720 render was the only reader at 720px. Leaf's widgets size by the window's height (a file editor clips its body at 60vh, a trace stage fills the window), so a short window can clip what a tall one shows, and #3285's review raised the reverse, a control clipped only at 540x900. Both heights are now read at every phone width. Covered words on the resized page first reported the stacked workspace pages' sticky header standing over their words: a resize that reflows a page scrolls it, by 169px on alert-review at 360px and over 1000px on rust-sort at 680px, where a fresh load stands at its top. `settle_at` now returns the page to its top, instantly, once the resize settles. `page check --render` on every `examples/*.html`, before and after, finds the same faults. The one difference is on the four workspace pages (alert-review, data-explorer, rust-sort, wt-merge), which fail on main because their header stands 12px past the column on a phone: the 540x720 render reported it in each scheme, and the dedup rule dropped the sweep's run, so it now reads as one finding at 360-680px. Cost, in-process over alternating runs on this host: triage-board's render_version took 4.35-4.59s before and 4.48-4.51s after; the corpus's took 148.4-149.4s before and 147.6-148.0s after, of which 120s in both arms is a wait for a thread that never opens. The added samples cost about what the renders' own geometry readings did. These runs predate the desktop render's as-loaded sample, one reading more. Tests: a page that scrolls sideways only on a phone is one finding at 360-600px rather than two at 540x720, one per scheme; a control clipped on every load is one finding at 360-1920px rather than one per scheme; `page check` reports a page 150vw wide as one finding at 360-1920px. The fixture of mid-width faults gains a card clipped only in a 720px-tall window, at 360-540px, and one clipped only in the dark scheme, at 1200px and at 540px. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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 render gate read clipped controls only at its two fixed viewports, so a control cut off only between 360 and 440px (a fixed-height card whose prose wraps longer on a phone and pushes a decision under its clip) went out with the handover. The sweep already resizes the loaded page through every width from 360 to 1920px and reads its geometry in one probe call per width, so that call now reads clipped controls too. The gate reports each run of widths where one stands as it reports sideways overflow and scrollbar collisions there: an error, since a control out of reach at 400px is as unusable as one at 540px. No page load or pass is added.
Cost, measured in-process over paired runs of
page check --render: on the corpus page the sweep's 41 geometry readings took 6.0–6.3s in both arms, so the added reading is below the noise; on triage-board both arms read 0.11–0.15s. The shipped examples, and the corpus page with its developer pages and regression fixtures, show no clipped control at any swept width.A swept run is left to the gate's own render only where a render at a width inside its span, fixed or margin, read the same fault on the same element (matched by code and place). The gate used to drop any run that took in a fixed width, but the sweep reads every width at the desktop height (900px) while the phone viewport renders 540px at 720px, so a fault only the taller sample shows, such as a control clipped below a card, was dropped unreported. Matching by fault also stops a fault at a margin width (overflow included) being reported by both the sweep and that render.
restsOverPagemoves toreachability.jssolayout.jscan importclippedControlswithout an import cycle. The test fixture intests/browser/test_render_gate.pyfails before this change and passes after.