Skip to content

Keep a visual review's capture usable in a laptop-height window - #3703

Merged
max-sixty merged 1 commit into
mainfrom
agent-a7175a0bf3da2f85e
Oct 23, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a7175a0bf3da2f85e

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

On developer/visual-review-gallery, the phone-screenshot lf-shot now keeps a usable height in a laptop-height window. Before, at 800×720 it got about 5px and its toolbar was clipped out of reach. This is a follow-up to #3696, whose laptop-height reading exposed the problem.

Cause. The cause is the visual-review widget's own layout, not the gallery page. lf-visual-review fills the workspace and gives the capture row minmax(0, 1fr), so the shot gets whatever the other regions leave. At 800×720 those are the case strip, caption, decision row, evidence header, claim, discussion and the pane's end room for Leaf's panel, and they leave about 5px. The capture row now has a 12rem floor (minmax(12rem, 1fr)). The shot keeps its toolbar and a readable frame, and the evidence pane scrolls when the window is shorter. The shot measures 192px in Chromium and in Firefox at 800×720, and 192px (from 169px) at 1280×720.

The crop. The render check also refused this shot at every height, 18px at 1200×900 and 4px at 1280×720. lf-shot crops to the case's focus rectangle, so its image plane runs past .lf-shotimage, which hides the rest on purpose. .lf-shotimage now declares --lf-drawing: 1, the declaration the column reading accepts for an HTML drawing that zooms image pixels through its viewport.

The held window. In compare mode, each capture's window (.lf-shotviewport) keeps the height the fit gave it and scrolls the capture at actual size, but it declared no held height. That was the shared cause the brief asked about. The corpus's held-scroller reading named it on the gallery, and the widget quality check grows-with-content named it on lf-shot's own worked example in test_bundled_widgets_meet_the_widget_quality_checks. It now declares --lf-holds-height: 1.

Checks.

  • The render check on the gallery went from 18 refusals to none.
  • test_bundled_widgets_meet_the_widget_quality_checks lost its lf-shot findings. Its lf-code finding remains: keeps-first-box first paints 8px shorter than it presents. That is a different cause, the initial renderer's height, so this PR leaves it.
  • test_page_fixture_renders[visual-review-gallery] lost its render-check and held-scroller failures. It still fails its two resize journeys: after a resize round trip, the case strip's buttons come back 86px tall where a fresh load at the same width draws them 78px. That failure was in the 2026-10-22 nightly run before this change, and it has a separate cause.
  • The visual-review journey and projection tests and test_render_commands.py -k shot pass: 36 passed. The one error is a teardown watcher on the floating panel (unchanged write: children of div.lf-fp-answers), which errors the same way without this change.

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

In a workspace about 720px tall and 720-920px wide, lf-visual-review gave
its capture's lf-shot only what its other regions left, about 5px. The shot's
toolbar was clipped out of reach, and the render gate refused the gallery. The
capture row now has a 12rem floor (`minmax(12rem, 1fr)`): the shot keeps its
toolbar and a frame worth reading, and the evidence pane scrolls instead.

The gate also refused the shot's crop to its focus rectangle at every height:
the image plane runs past `.lf-shotimage`, which hides the rest on purpose.
`.lf-shotimage` now declares `--lf-drawing: 1`, so its pixel coordinates are
the drawing's own, as the column reading allows for an HTML drawing's
viewport.

In compare mode, each capture's window (`.lf-shotviewport`) keeps the
height the fit gave it and scrolls at actual size, but declared no held
height. The corpus's held-scroller reading and the widget quality check
`grows-with-content` both named it, on the gallery and on lf-shot's own
worked example. It now declares `--lf-holds-height: 1`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit bc172d0 into main Oct 23, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a7175a0bf3da2f85e branch October 23, 2026 06:38
max-sixty added a commit that referenced this pull request Oct 23, 2026
…ot (#3711)

In a bounded root workspace, only a pane that can reach the window's
foot now reserves room for Leaf's floating panel at the end of its
reader. Before, every pane at any depth padded its end with the panel's
72px row (`--lf-foot-room`). A pane that a body widget places deeper
already stands inside that body's own end room, so it reserved the room
twice, even at the top of the window. This follows #3703, where the
visual-review gallery's case strip gave 68px of an 800×720 window to a
panel it never reaches.

**The rule.** `browser/layouts.css` now pads the reader of the body when
it is a pane, and of each pane of the body's own grid. Deeper panes keep
their 12px inset. The change is plain CSS with no measurement. One gap
remains: CSS cannot tell a grid's last row from the others, so every
pane of a page's own grid still keeps the reserve, as before.

**Before and after.** I probed every pane at 800×720 and 1280×720.
"Bottom" is where the pane ends in the window, and "pad" is its reader's
end padding.

| Page | Pane | 800×720 bottom, pad | 1280×720 bottom, pad |
| --- | --- | --- | --- |
| visual-review-gallery | case strip (`lf-vr-queue`) | 219→151, 84→16 |
648, 84→0 |
| visual-review-gallery | evidence | 550→622, 84→12 | 550→622, 84→12 |
| visual-review-gallery | discussion | 648, 84→12 | 648, 84→12 |
| data-explorer | playground controls | 305→373, 84→16 | 378→446, 84→16
|
| data-explorer | preview and instruction | 648, 84→0/16 | 648, 84→0/16
|
| rust-sort, wt-merge | each pane | 719, 84 (unchanged) | 719, 84
(unchanged) |

At 800×720, the gallery's evidence pane gains 72px, and data-explorer's
controls region drops its empty band, so its instruction region shows
the whole instruction.

**Nothing under the panel.** I scrolled each pane's reader to its end
and compared its last content with the top of the panel's row (y = 662).
In visual-review-gallery, data-explorer and rust-sort, no pane's last
content reaches the panel, at either size in Chromium, and at 800×720 in
Firefox for the gallery and rust-sort. alert-review and code-comparison
have no panes. The deeper panes end at y = 648, inside their body's own
end room. The one pane whose content runs past y = 662 is wt-merge's
film pane at 800×720. Its content overflows the pane itself, which
doesn't scroll. That pane reaches the foot and keeps the same 84px
reserve as before, so this change doesn't touch it.

**Test.** `test_a_pane_inside_a_plain_section_of_a_workspace_flows` now
also checks the reserve. The pane inside a section reserves nothing
beyond its inset, and a pane that is the body reserves the panel's room.
Without this change, the first assertion fails with 72 == 0. The other
workspace layout tests pass, except
`test_workspace_root_scrollbar_appears_only_when_page_overflows`, which
fails the same way without this change.

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

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
A shot standing where the page gives it a definite height, as a visual
review's capture does, holds that height and scrolls its drawing in
`.lf-shotstage`. The shot declared `--lf-holds-height: 1`, but the
property doesn't inherit and the stage is the box that scrolls, so the
corpus's held-scroller reading named each visual-review-gallery stage
as a widget box holding its height without saying so. The stage now
declares it whenever its shot does. It appeared between the
2026-10-22 and 2026-10-23 nightlies, with the screenshot rework there
(#3703, #3704).

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