Skip to content

chore(docs): first screenshot baselines, generated on linux - #76

Merged
rodriabregu merged 3 commits into
mainfrom
chore/visual-baselines
Aug 28, 2026
Merged

rodriabregu merged 3 commits into
mainfrom
chore/visual-baselines

Conversation

@rodriabregu

Copy link
Copy Markdown
Owner

The first Linux baselines for the visual regression suite. 274 images, 2.1 MB, largest 32 KB — 60 component pages, both themes, ~2.3 previews per page.

Nothing is being accepted as a visual change here. This establishes the starting point.

Generated the sanctioned way, and it earned its design

visual-baselines.yml on ubuntu, manual dispatch. Both safety properties fired for real:

The first attempt refused to commit anything. It found /components/radio-group failing — 59 of 60 pages green, one hard failure — and skipped the commit step. That failure was a live production bug: the page threw props_invalid_value on hydration and rendered zero previews. Fixed and shipped in 0.13.1 (#74) before these baselines were generated.

This run's reproduce pass: 60 passed. After writing the baselines, the workflow re-ran the comparison against what it had just written, on the same runner. Byte-identical. That is the determinism evidence I could not get locally — with updateSnapshots: 'none' and no baseline, the suite fails before capturing anything, so there was nothing to compare. CI running the visual step on this PR is the second, independent confirmation.

What is in the images

Spot-checked, including the two pages with a history: radio-group renders its three options correctly — the exact page that was blank in production — and the date pickers show their panels with a background, which is what the 0.6.1 regression broke.

One property of every baseline, chased down rather than left as a mystery

Every capture has a 1px sliver of colour at the top-left. It is not an overlay: capturing with the sticky header neutralised produced a byte-identical image. It is .preview__tab.is-active::after, the active-tab underline, which is height: 2px at bottom: -1px, so one pixel falls inside the canvas box. Deterministic and identical on every page.

Worth knowing: that underline uses var(--sve-color-primary) — the library's token, not a --doc-* one. So changing the primary colour will diff all 274 baselines at once. It also quietly contradicts the rule that docs chrome uses --doc-* hex values precisely so it does not move when the showcased theme changes. Recorded in ROADMAP.md, not changed here.

How to accept a visual change from now on

gh workflow run visual-baselines.yml --ref <branch> -f reason="<what changed and why>"

It pushes to your branch, so the new PNGs arrive as a reviewable diff. Never write baselines locally — the suite refuses off Linux, because they are byte-compared and macOS font rasterisation does not match this runner.

github-actions Bot and others added 2 commits August 28, 2026 16:44
First baseline generation, after the props_invalid_value fix that the previous attempt uncovered. Establishes the initial images for all 60 component pages in both themes; nothing is being accepted as a change.

274 baselines. Generated by the visual-baselines workflow, which is
the only sanctioned path: they are byte-compared and macOS font
rasterisation does not match this runner.
The 1px sliver in every capture is the active-tab underline (height 2px at
bottom -1px), not an overlay — verified by capturing with the sticky header
neutralised and getting a byte-identical image. It is painted with
var(--sve-color-primary), so changing the primary colour diffs all 274 baselines
at once.
@vercel

vercel Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sve-ui Ready Ready Preview Aug 28, 2026 4:52pm

The generation workflow's re-comparison pass returned 60 passed on its runner,
and CI on the baselines PR returned 60 passed on a different one. Also records
that my first local attempt at this proof was a false pass: a shell loop hashed
two empty directories and reported byte-identical.
@rodriabregu
rodriabregu merged commit 84a5650 into main Aug 28, 2026
3 checks passed
@rodriabregu
rodriabregu deleted the chore/visual-baselines branch August 28, 2026 16:57

This branch was successfully deployed

1 active deployment
Preview — 7545bbe3 Deployed Aug 28, 2026 by vercel[bot]
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.

1 participant