Skip to content

Let a screenshot pair written in markup open on its change, and catalog the page of parts - #6772

Merged
max-sixty merged 10 commits into
mainfrom
agent-a7ad17dee2714760c
Nov 23, 2026
Merged

max-sixty merged 10 commits into
mainfrom
agent-a7ad17dee2714760c

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

A screenshot pair written in markup can now open on its change: lf-shot takes focus-x, focus-y, focus-width and focus-height, a region in the captures' CSS pixels, and density, their pixel ratio. The crop, scale and Full frame toggle already lived in lf-shot but only lf-visual-review reached them, through inspect(); the widget now writes its cases' focus and scale onto its shots' attributes, and inspect() goes, with labels, which nothing passed, and captureWidth. The page of parts joins the catalog, each case opening on its change at true scale with its options in a 1440×900 window.

To weigh: four attributes rather than one focus="x y w h", so shot.css can hold the cropped frame's room before upgrade (typed attr() reads one number per attribute); with one list, the parts page's first shot would hold 772 px and shrink to 402 px as it draws. That hold models Slider only, so a stacked Pair still grows as its module draws (279 px measured at phone width); the example pairs open in Slider.

Tests: hold, focus and visual-review browser tests, check:browser; scored on Claude Code, visual-change-uses-captures 0/1 → 2/2, shot-frames-read-at-size 1/1 → 2/2.

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

…og the page of parts

`lf-shot` takes `focus-x`, `focus-y`, `focus-width` and `focus-height`, a
region in the captures' CSS pixels that every view opens cropped to, and
`density`, the captures' device pixel ratio, so the region is read in CSS
pixels and 100% shows a 2x capture at its size in the browser. The crop,
the scale and the Full frame toggle already lived in `lf-shot`, but only
`lf-visual-review` could reach them, through `inspect()`. The widget now
writes each case's `focus` and `deviceScaleFactor` onto its shot's
attributes like any author, and `inspect()` is gone with the `labels` and
`captureWidth` it carried, which nothing passed; the test step that set
long custom labels at phone width goes with them.

The author states the region rather than `lf-shot` deriving it from the
comparison: the comparison runs after presentation, so a derived crop
would resize a shot the reader already sees, and its bounds take in
everything that moved, such as every row under one that grew. Four
attributes rather than one list let shot.css hold the cropped frame's
room before the module draws, since typed `attr()` reads one number per
attribute; the hold also divides by `density`.

The page of parts (examples/review-parts) joins the catalog: six cases
of a console change, one part each, every capture opening on its change
at true scale with its question's options in a 1440x900 window. The
feature gallery shows a focused pair in Pair.

Tests: a new browser test holds a focused and a 2x shot's drawn heights
before upgrade (it fails on the old stylesheet); the cropped-inspection
test now drives the attributes, restates and removes the focus; the
visual-review focus tests pass unchanged, and the widget's six cases
measure the same frames on main and this branch in Firefox.
The run list, its dark scheme and the run page each put their change in
the frame's left half, where Slider's divider shows only Before on
arrival. They open in Pair, the run lists on a focus narrowed to Run,
Status and Trigger so both captures stand side by side at true scale.

> _This was written by Claude Code on behalf of max-sixty_
> _This was written by Claude Code on behalf of max-sixty_
…ept densities below 1

The comparison reads whole images, so a new focus or density reuses the
reading already shown and draws before the next frame instead of waiting
for another comparison of the same pair. The number patterns accept any
positive value, as the module does. The evidence reference sends a small
change's pair to its subject rather than to cropped files, and the
author text says the focus lies inside both captures. The hold test
takes the focused and 2x shots as two more cases rather than a copy of
its setup.

> _This was written by Claude Code on behalf of max-sixty_
Before its module draws, a shot holds the room Slider's frame takes, and
Pair's stacked layout draws taller: on the page of parts, a reload on
the dark run list at a 390 px phone moved the options down 279 px as
the module drew, and on the run page at 1440 x 900 by 252 px, in
Firefox and Chromium alike. Each focused pair on the page of parts and
in the feature gallery now opens in Slider, on a focus whose divider
falls where the change begins, so the After half shows it on arrival.
Held and drawn heights now agree for every part at 1440 x 900 and
390 x 844 in both engines.

> _This was written by Claude Code on behalf of max-sixty_
> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty marked this pull request as ready for review November 23, 2026 04:03
@max-sixty
max-sixty merged commit d86bcf7 into main Nov 23, 2026
7 checks passed
@max-sixty
max-sixty deleted the agent-a7ad17dee2714760c branch November 23, 2026 04:17
max-sixty added a commit that referenced this pull request Nov 23, 2026
Removes the bundled `visual-review` package: the `lf-visual-review`
widget, its `visual-run` contract, gallery, package card, the two eval
variants that asked for it, and every reference. Nothing in Leaf writes
a `visual-run`, and since #6772 a visible change goes to the user as
before/after `lf-shot` pairs with a question beside each, as
`examples/review-parts.html` shows.

A user loses the one-case-at-a-time queue with its progress count and
keys (n, Shift+n, a, i, c); the Capture details popover with capture
conditions, revisions and links to the before and after pages; a typed
run an agent refreshes with `leaf data set` while approvals and threads
stay on stable case ids; and a two-key reopen of an answer, which takes
nine on the page of parts.

Not visible in the diff: tests that proved core guarantees through the
widget are ported, not deleted, to plain `lf-shot`s, `lf-diff`,
`lf-trace`, test widgets and the page of parts. Per-record obligations
(`awaits.records`) now have no bundled user; they stay, covered by a
fixture package, as a separate removal candidate.

Tests: the ported and touched tests pass locally, as does `pnpm run
check`; CI runs the broad suite.

> _This was written by Claude Code on behalf of max-sixty_
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