Repository navigation
Unify screenshot inspection in a stable comparison header - #3635
Merged
Merged
Conversation
Fit uses both dimensions of a bounded comparison and chooses the orientation with the largest images. At actual size, scroll each image within its share of the box and synchronize the pair; labels and both panes stay visible. Replace the two rows of radio buttons and checkboxes with native view and scale selects and an options popover. Update the scrolling tests to protect simultaneous comparison rather than scrolling between captures. Verified 21 focused browser cases, 522 runtime tests, desktop and phone touch review, and Firefox Fit geometry.
Restore source tints, keep view and scale controls outside image geometry, and expose originals through the scale popover. Labels are passive and pixel inspection no longer switches views on image clicks. Refit Slider when its lazy comparison mounts and print both complete sources. Let runtime modals preserve authored source popovers, carrying their existing chrome style scope across shadow boundaries. Browser checks cover stable controls, long labels, source viewing, print and native focus return.
Retain the approved stable comparison header through the source-directory move. Plain image clicks in Slider alternate complete frames through the existing comparison change handler; Pair and Pixels remain passive. Keep native drag and keyboard routes and verify mouse/touch endpoints.
Measure the selected mode after its classic scrollbar gutter is established, so a mode change reaches its final layout synchronously. Exercise mouse and touch with a real gutter and compare immediate geometry with later frames. Match the focus-ring specimen by its carrier rather than the obsolete focus-state spelling.
leaf-agent
approved these changes
Oct 22, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 30, 2026
Since #3635, Fit scales a pair down to its box but never up: `fitShotGeometry` caps the scale at 1. A probe of a 560x520 pair inside `layout-column` draws its frames at 560px in the 720px element. The `lf-shot` header said only that Fit keeps both frames in the box, which reads as filling it, and `browser/AGENTS.md` gives every widget a duty to fill the box it gets. An agent reconciling the two could stretch small captures across the box again, as `lf-shot` did before #3635, when a small crop on a page with no Layout drew across a 1728px window and blurred. The header now records the decision and its reason: stretching a capture blurs it, so a capture narrower than its box sits at its own size, and how large to capture is the author's call. Comment only; behavior is unchanged. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
…hrough aspect-ratio (#6129) `package-themes.md` told package authors that a theme can shape a frame from `data-lf-media-width` and `data-lf-media-height`, "as `lf-shot` does with `aspect-ratio`". The CSS rule that did so went in #3635; `lf-shot`'s view now reads the two attributes only as its source size before its images decode (`shot-view.js`, `fit`). The sentence now says that. A corrected fact, so no instruction score. Found during a survey of places Leaf could let authors write HTML instead of its own vocabulary, which Max asked for. Not otherwise reviewed; no tests cover reference prose. > _This was written by Claude Code on behalf of max-sixty_
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.
Screenshot inspection had two owners: the visual-review dashboard controlled layout and scale while
lf-shotcontrolled the images. Comparisons could require scrolling between Before and After, and changing modes moved controls under the pointer.This gives
lf-shotownership of inspection, with one stable header containing visible Pair / Slider / Pixels choices, tinted source labels, scale and Outline. Both captures fit the allocated space; actual-size scrolling stays synchronized. Plain image clicks in Slider alternate complete frames, while dragging and keyboard controls retain partial comparison. Pixels remains selected when its image is clicked.The dashboard supplies capture metadata and keeps approval, feedback and navigation. Capture updates retain the controls, focus and inspection choices; replacement images and their difference reading arrive together, and corrected captures recover from load errors. Mode changes establish classic scrollbar gutters before fitting, avoiding a later resize correction. Original images use the shared viewer; native modal seating now preserves authored source popovers and their focus return across shadow roots. The initial renderer shares the widget’s drawing and geometry, and printing includes both complete sources.
Validation: focused browser tests cover desktop/touch clicks, drag, keyboard, stable geometry, long labels, original images, print and visual-review integration, including capture failure/correction in Chromium and Firefox. The authenticated review journey,
pnpm run check(132 browser/build, 518 runtime, 84 Worker tests), and pre-commit checks pass. An eight-pair startup comparison shows no layout shifts and about 7 KB (0.2%) additional code before state presentation. The rendered-readability eval passes on base and candidate (one run each); independent visual and code review includes Opus simplicity/quality review.GitHub review approved the final head. CI reports 1,988 passing tests and one failing focus-ring survey: “On this page” and “Saved elements” rings are clipped by 5 px. Focused keyboard journeys reproduce both faults with identical geometry on main
9d76e373and this branch; these pre-existing failures are permitted by the repository’s landing policy and recorded separately.