Skip to content

Report a box that cuts off its own content where no scroll reaches it - #3837

Merged
max-sixty merged 3 commits into
mainfrom
render-clipped-content
Oct 25, 2026
Merged

max-sixty merged 3 commits into
mainfrom
render-clipped-content

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

page check --render holds that nothing a user needs is clipped out of reach, but it read only boxes a container lost. A <pre> given just a max-height computes overflow: auto hidden under the theme, so its lines past the cap were hidden and the gate said nothing. page-authoring.md carried a prose warning to cover that gap.

misplacedBoxes (src/leaf/render-checks/layout.js) now also reads each box's own scroll extent on every axis it clips without a scroller, and reports clipped-content with the remedies in its words: let it grow, move the rest into a <details>, give it data-bound, or, across, let it wrap or scroll sideways. Boxes that cut on purpose stay quiet: a bounded block scrolls, a closed disclosure, a line clamp or text-overflow, a box under 2px, a cut under half a line, a text box, and a drawing viewport (--lf-drawing, which lf-shot's image frame now declares). The axis reading (sealedAxes) is shared with clippedControls.

The max-height warning leaves page-authoring.md, since the finding now says it where the author is.

On the shipped corpus the finding fired on two pages, both real cuts, fixed here:

  • examples/wt-merge.html: the film stage's overflow: hidden let its grid row squeeze it, hiding 335px of the phone view's terminal at 720–880px. It now uses overflow: clip.
  • packages/visual-review: at 720–920px wide and 720px tall each shot got 5px. The shot track now has a 10rem floor and the desk's tracks take their content's minimum.

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

max-sixty and others added 3 commits October 23, 2026 00:38
`page check --render` held that nothing a user needs is clipped out of reach,
but read only boxes a container lost, and only across the page. A <pre> given
just a max-height computes `overflow: auto hidden` under the theme, so its
lines past the cap were hidden and the gate said nothing: lines have no box
of their own, and the pass took any cut below a box to be on purpose.

`misplacedBoxes` now also reads each box's own scroll extent on every axis it
clips without a scroller (`sealedAxes`, now shared with `clippedControls`),
and reports `clipped-content` with the remedies: let it grow, move the rest
into a <details>, give it data-bound, or, across, let it wrap or scroll it.
This reverses the recorded rule that a box cut off below is cut on purpose;
what cuts on purpose says so and stays quiet: a bounded block scrolls, a
closed disclosure draws nothing, a line clamp or text-overflow marks the cut
on its axis, a box under 2px either way (a hidden tab, words clipped for a
screen reader) shows nothing, a cut under half a line is a tight line box's
overhang, a text box scrolls to its caret, and a drawing viewport
(`--lf-drawing`) owns its coordinates. Across, a container a lost box
already names is not named again.

lf-shot's image frame now declares `--lf-drawing`, since it is a viewport
onto a cropped or scaled source, which the new reading otherwise read as cut
content.

The prose warning about max-height in page-authoring.md goes, since the
finding now says it, with the remedies, where the author is.

On the 40 shipped examples, developer pages and page fixtures, the full gate
now reports it on two, both real cuts seen in screenshots: wt-merge's film
stage, shrunk by its grid row, hides 335px of the phone view's terminal at
720–880px and the foot of its worktree cards at 1760–1920px; and three
visual-review-gallery shots collapse to 5px at 720–920px, so their
screenshots don't show. Neither page is changed here. On 57 agent-authored
eval pages at the page-defects eval's three windows it fires on none.

Behavior changes: a card of fixed height that hides a decision's controls
now gets a `clipped-content` finding beside its `clipped-control` one, at
the same widths, and the sideways-sweep test expects both.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The clipped-content finding fired on two shipped pages, each a real cut.

wt-merge: the film's stage clipped for its rounded corners with
`overflow: hidden`, which makes it a scroll container, so its automatic
minimum height is zero and the film's grid, the workspace pane's body,
squeezed its row to what the pane left instead of letting the body scroll.
At 720–880px the phone view's terminal lost 335px; at 1760–1920px the
worktree cards lost their foot. The page's CSS was at fault, not the
Layout, so the stage now uses `overflow: clip`, which the scroll reference
already prescribes for a box that only clips: the stage keeps its content's
height and the pane scrolls the rest. The catalog's 1120×700 first screen
is unchanged.

Visual review: the desk filled the workspace and handed its capture
whatever the stacked case list, caption, decision and note left, through
`minmax(0, 1fr)` tracks, so at 720–920px wide and 720px tall each shot got
5px and no screenshot showed. In a full-height desk the capture's shot
track now has a 10rem floor, every track from the dashboard down takes its
content's minimum (`minmax(min-content, 1fr)`), and the shot is
size-contained so that minimum is the floor rather than the screenshots'
natural height. A window too short for the floor grows the desk past the
workspace body, which scrolls (83px at 800×720); at 1280×720 the shot is
169px with nothing to scroll, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	packages/default/styles/shot.css
#	skills/leaf/references/page-authoring.md
@max-sixty
max-sixty merged commit 73222dc into main Oct 25, 2026
4 checks passed
@max-sixty
max-sixty deleted the render-clipped-content branch October 25, 2026 02:24
max-sixty added a commit that referenced this pull request Oct 25, 2026
A choose group pads every child as a cell, at zero specificity so a
cell's own padding outranks it. The quiet word (`.lf-quiet`) set no
padding of its own, so inside an `lf-options` it took the cell padding
and became a 49x16 box clipping its words instead of a 1px one. Since
#3837 the render gate reads what a box cuts off of its own content and
exempts only boxes under 2px, so every choose group carrying "my change"
(a user's pick replayed over the page) reported `clipped-content`, and
`page check --render` failed a valid page.

`.lf-quiet` now sets `padding: 0`, so it stays the 1px box it declares
wherever its holder pads its children. Nothing visible changes: the
clip path hid the word either way.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
#3939)

Adds a nightly macOS run of every test tier, and fixes every test that
failed in its first run or in the Linux nightly beside it: 89 tests in
[run
40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557),
60 of them only on macOS.

## The macOS nightly

`ci.yaml` gains a `test-macos` job: every tier on `macos-15`, `-n 2` on
its three cores, in the daily schedule and a dispatch. It belongs to
`ci`, so a failure turns that run red and reaches tend through the
existing `workflow_run` trigger, with no tend configuration change.
GitHub doesn't bill hosted runners for public repositories; the job
holds one of the account's macOS slots for about three hours. The test
step names `shell: bash`, without which a step runs without `pipefail`
and piping pytest through `tee` reported the first run's failures as a
green job. The setup action's Ubuntu mirror step now runs only on Linux.

`tests/AGENTS.md` counts `test-macos` among what tend repairs and leaves
only failures no CI run shows to local sessions. It drops the
instruction to confirm a macOS-only failure at normal priority because
`taskpolicy -b` slows headless Chrome: a test that fails on a slower
host depends on timing, and the fix is to the test. `running-tend` tells
the session fixing a red run, which has only a Linux runner, to verify a
macOS-only fix by dispatching `ci` on its branch.

## The fixes, by cause

Product fixes:

- A drafted margin card rose against the window's foot and never came
back as the draft shrank (#3524). It now holds the top it opened at and
drops back.
- A tapped pin reseated 11px lower as it unfolded, because the
hold-to-read toggle was pressed before the browser focused it (#3341).
- A page's first thread card could cover its passage, because the
placement that makes room was dropped while Floating UI loaded (since
#1526).
- A heading's "Copy link to section" stayed at the heading's far end
after the window narrowed and widened, since every engine keeps its last
`position-try` fallback (#3836). It now picks its place from the current
width.
- Putting the response bar away moved focus off the button the press had
just focused, so the next `e` found nothing (#3756).
- A trace's image-tools status shared a class with the image's loading
notice, whose rules hid it (#3707).
- WebKit scrolled the outer page 1,386px when a sample editor took focus
(#3634).
- In draw mode a press left the previous press's release timer pending,
so a fast second click reached the page.
- Hint refreshes read the geometry of every target inside a closed
disclosure, forcing layout of skipped content.
- A sidebar page's sticky track clipped focus rings (#3918). A stuck
track body now keeps the ring's room inside its edges, so its blocks
stand 5px in from each side.
- Tab revealed a block's Copy flush with its scroller, cutting its ring
(#3916).
- The hidden "my change" word inside a choose group took a cell's
padding and read as clipped content (exposed by #3837's check).
- Visual review case buttons kept their wide padding after the first
breakpoint crossing, a Chromium restyle bug avoided by making the case
list a plain container.
- A held shot's scrolling stage didn't declare that it holds its height
(#3703/#3704).
- When the log refused a reply, the floating panel's head moved down
69px and the restored draft pushed its controls up 21px (#3400). Through
a refusal the panel now holds its head and the field its height, on the
holds a press already takes; the refused turn's room goes at the user's
next turn.
- A reply box's ↑ (edit your last message) appeared only after an
unrelated repaint once its last message became editable (#3855). Every
message draw, by any thread reader, now recomputes that row's keys.
- A trace's images took the page's scroll anchor, so a lane change in
the timeline scrolled the page 62px under an arrow key; they no longer
anchor scroll. The trace overview wrote its window's new start before
reading its size, so for one layout the window ran past its strip and
Chromium scrolled the page up to 838px; it now reads before it writes.
The image tools' status keeps its line when its text clears.
- Web Awesome's radio group moves focus on an arrow with a bare
`focus()`, which Leaf's ring scroll margin turned into a page scroll.
The vendored bundle is patched (`build/vendor.mjs`) so both calls pass
`preventScroll`.
- A Leaf page inside an iframe took focus from the page around it when
it finished arriving. Its arrival recovery now runs only at top level or
in a frame that holds focus.
- The margin rail's one Tab stop stayed on whichever row last held it,
so a resize could leave it below a row the user sees first. It is now
the highest row in view; a focused row keeps it.
- A resize that moved a sidebar page's track into the page, with neither
place made by the reader, took the track's place over the page's:
live-progress jumped 1861px (#3918). On a tie the page's own place wins.
- The whole-page rule read a shut disclosure whose children are all
generated as showing what it holds (#3908); it now skips only `.lf-ui`
apparatus.
- The gallery revealed its stamped frame at the centre, carrying the
pressed button 45px; it now scrolls only as far as needed.

Test fixes:

- The Codex fixture copies the running interpreter as `codex`; on a
framework Python, as on the runner, the copy fails its code signature
and macOS kills it at launch. That broke 39 tests. The copy is now
re-signed ad hoc, and the fixture no longer leaks `PYTHONHOME` into the
command it runs.
- The plain-HTTP copy test missed Chromium's lower-cased host; the
event-door refusal test read its answer after the server's reset; the
stale-keys sweep raced the browser entering fullscreen; the words watch
didn't credit a blur from a press elsewhere.
- Several tests read state before it settled (a shown gesture's arm, a
side list's smooth scroll, a sample's focus returning, a held reply's
menu), and now wait for it. Assertions predating #3830, #3916, #3670,
#3673 and #3217 now read the current behavior.
- Three waits fixed their own deadline instead of the suite's, among
them the async-probe test's 500ms.
- The command hub's record now sticks in view, so the Atlas journey
opens its news before reading each row; the region-capture journey drags
over the unreadable image it means to fail on (#3861 draws only the
element that alone paints the crop).
- The touch-capture removal test, which fails intermittently on main,
now reads the shelf right after the tap and names the elements the tap
reached, so its next failure says whether the tap missed or the image
came back.
- The feature-gallery scroll pass allows a third of its steps to write
the contents' `aria-current`, as gestures already do, since the count
depends on where sections fall under the platform's fonts.

The branch also merges the four open `grind/f-main-tests-*` pull
requests, whose fixes cover five more of the run's tests: #3871, #3882,
#3887 and #3906. This pull request lands them.

Each fix was reproduced failing and then passing by node id, on this Mac
or, for a Linux- or runner-only failure, against a run's log, except
where its commit says otherwise. Dispatched full runs on this branch
([40156291557](https://github.com/max-sixty/leaf/actions/runs/40156291557),
[40186545420](https://github.com/max-sixty/leaf/actions/runs/40186545420),
[40196342887](https://github.com/max-sixty/leaf/actions/runs/40196342887))
check both platforms; the second took the macOS job from 86 failures to
38, most of the rest fixed since. A few macOS-only failures pass on
every local attempt (two reading-place tests, a scroll repaint, Back
from a thread, opening a line under the last, the Android composer's
Return, margin-entry order, a card paging on, a turn arriving out of
view) and have no fix here; once this lands, the macOS nightly reports
them to tend.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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