Repository navigation
ci(visual): bound component screenshot scope - #5840
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
644be92 to
8efaa4d
Compare
8efaa4d to
eb48f11
Compare
eb48f11 to
51ad081
Compare
|
Non-blocking: we may not need all themes to be checked. I think default and neutral should be okay to reduce further. We should also include the probe theme which we’re using to debug and validate theme infra. |
cixzhang
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES
Thanks for aligning the two component planners. The new 240-shot check runs after component and theme scopes are combined, so it rejects every stable-theme-only plan. Against the current accepted baseline, neutral is 782 shots: the parent produces the plan, while this head exits before capture. A theme author therefore gets no trusted visual evidence from the PR workflow. Please keep theme-only plans out of the focused component budget, derive both planner limits from one source, and add a >240 theme-only regression that still produces or explicitly defers evidence.
[Reviewed by Robohands]
INLINE
.github/scripts/visual-gate/visual-acceptance.mjs:788 — This also caps theme-only plans; current neutral reaches 782 shots and exits before capture.
51ad081 to
e41c44d
Compare
e41c44d to
ce2aa46
Compare
Addressed on ce2aa46: theme-only plans no longer use the focused component budget; ordinary and trusted limits share config; >240 trusted evidence, changed-theme coverage, and safety-bound regressions were added.
Problem
A changed Core component currently expands visual review to every Storybook story across every accepted theme and both color modes. Behavioral and audit fixtures therefore multiply the screenshot baseline even when they do not represent distinct visual contracts.
On #5365, that produced 252 frames: 18 Breadcrumbs stories × 7 themes × 2 modes. Only two frames already existed, leaving 250 new screenshots to approve.
Change
visual-baselinefor additional default-theme visual contracts.visual-theme-matrixfor visually dense stories that need all accepted themes, such as a component variant sheet.This preserves broad theme coverage where it carries signal while leaving behavioral and audit-only fixtures to their dedicated checks.
Story-local configuration
Visual scope lives directly on the Storybook story object, next to the example it controls—not in a separate registry:
Default,Primary, and similar conventional names) is selected automatically and needs no tag.visual-baselineadds that story in the default theme, light and dark.visual-theme-matrixadds that story in every accepted theme, light and dark.no-visualexcludes an unstable story from visual capture entirely.For #5365,
Defaultis the automatic Breadcrumbs representative andCustomSeparatoris explicitly taggedvisual-baseline; the remaining Breadcrumbs stories receive no screenshot baseline but continue to run through RTL and accessibility audits.Test plan
visual-theme-matrixintovisual-baselinefails both planner-path tests because the opted-in variant story loses its non-default theme frames.pnpm lint:strict— passed with existing warnings only.