Repository navigation
test(visual): the disabled SelectableCard story is shot in the probe theme too - #14046
Conversation
…theme too The Disabled story moves from visual-baseline to visual-theme-matrix, so the visual gate also shoots it in the probe theme. The neutral theme styles nothing on a disabled card's data-disabled state, so only the probe theme shows that a theme reaches it (#14017). The neutral shots stay.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 205afb2 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: the heavy CI suites have not run on this head yet.
Moving the SelectableCard Disabled story to visual-theme-matrix keeps its two neutral shots and adds probe-theme light and dark shots, so a theme's disabled-card styling gets a pixel comparison once a follow-up baseline pull request accepts them. Nothing to change here.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Title, the Disabled story is also shot in the probe theme: verified, the head's planner plans probe light and dark shots for it (planner run on base and head).
- The disabled state is a theming state a theme can style: verified in the component doc and source.
- The story already sits in the baseline with neutral shots only: verified in the baseline manifest.
- The neutral theme styles nothing on a disabled SelectableCard: verified, it has no SelectableCard override.
- The probe theme paints the disabled state's background, text, border and outline: verified in the probe theme source.
- The probe tier covers each theming target once, not each state: verified in the planner.
- No current pixel comparison shows a theme's disabled-card styling: verified by listing every story that renders SelectableCard and every baseline shot of it.
visual-baselineadds a default-theme contract andvisual-theme-matrixopts into every accepted theme, probe included: verified in the visual-gate README, config and planner.- Only the tag changes, and the story's content and id stay the same: verified in the diff.
- The neutral shots stay: verified, the surface tier plans either tag in the default theme and shot keys carry no tag.
- No component, theme, spec, test, public API or product behavior change: verified, one story line changes.
- The new shots join the baseline through a main capture and a follow-up accept: consistent with the documented baseline maintenance flow.
- No internal context in public text: verified.
pnpm preflight --quick: reported.- #14044 leaves this story's tag alone: verified in its diff.
- Files:
apps/storybook/stories/SelectableCard.stories.tsx: clear.
There was a problem hiding this comment.
Changes requested: one side effect of the retag needs fixing before this lands.
- Retagging the Disabled story makes the visual gate's probe cover count its
cardandselectable-cardtargets as covered, so the CardThemeAddedVariantstory, which renders only those two targets, drops out of the plan and itscore-card--theme-added-variantprobe shots, the theme-added card check the Card spec's verification map names, stop being captured; keep it planned, for example by taggingThemeAddedVariantwithvisual-theme-matrixas well.
The Disabled story's own retag works as described: it keeps its two neutral shots and gains probe light and dark shots once a follow-up baseline pull request accepts them.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Title, the Disabled story is also shot in the probe theme: verified, the head's planner plans probe light and dark shots for it (planner run on base and head).
- The disabled state is a theming state a theme can style: verified in the component doc and source.
- The story already sits in the baseline with neutral shots only: verified in the baseline manifest.
- The neutral theme styles nothing on a disabled SelectableCard: verified, it has no SelectableCard override.
- The probe theme paints the disabled state's background, text, border and outline: verified in the probe theme source.
- The probe tier covers each theming target once, not each state: verified in the planner.
- No current pixel comparison shows a theme's disabled-card styling: verified by listing every story that renders SelectableCard and every baseline shot of it.
visual-baselineadds a default-theme contract andvisual-theme-matrixopts into every accepted theme, probe included: verified in the visual-gate README, config and planner.- Only the tag changes, and the story's content and id stay the same: verified in the diff.
- The neutral shots stay: verified, the surface tier plans either tag in the default theme and shot keys carry no tag.
- No component, theme, spec, test, public API or product behavior change: verified, one story line changes.
- The new shots join the baseline through a main capture and a follow-up accept: consistent with the documented baseline maintenance flow.
- No internal context in public text: verified.
pnpm preflight --quick: reported.- #14044 leaves this story's tag alone: verified in its diff.
- Files:
apps/storybook/stories/SelectableCard.stories.tsx: one blocking finding, above.
With the disabled SelectableCard story opted into the probe theme, the probe cover counts its card and selectable-card targets as covered, so it dropped Card's ThemeAddedVariant story, whose probe shots the Card record names as verification. ThemeAddedVariant now opts in too, so it is always planned.
|
/approve-spec 425657d |
There was a problem hiding this comment.
Approved pending CI: the heavy CI suites have not run on this head yet; they run once this review passes and must pass before merge.
Tagging Card's ThemeAddedVariant story visual-theme-matrix keeps its probe-theme baseline planned, which resolves the earlier request, and the Disabled story now gets probe-theme light and dark shots where a theme's data-disabled paint shows. After merge, the four new shots (the two probe shots of Disabled and the two neutral shots of ThemeAddedVariant) still need a capture on main and an accept.
Claims and files checked
Review mode: incremental; reason: none
- Title, the disabled SelectableCard story is also shot in the probe theme: verified in the visual-gate planner.
- #14017 lets a theme style a disabled SelectableCard through
data-disabled: verified. - #14031 added the Disabled story to the visual baseline, and #14042 accepted its neutral shots: verified.
- The baseline shoots the story only in the neutral theme, which styles nothing on
data-disabled: verified. - The probe theme paints the disabled state with its own background, text, border and outline: verified.
- The probe tier covers each target once, not each state, so no pixel comparison reaches a disabled card today: verified.
- Story tags decide coverage:
visual-baselineadds a default-theme contract andvisual-theme-matrixopts into every accepted theme and plans probe shots: verified. - Only the Disabled story's tag changes; its content and id stay: verified.
- Card's
ThemeAddedVariantgainsvisual-theme-matrix: verified. - An opted-in story's targets count as covered in the probe cover, and the Disabled story renders the same
cardandselectable-cardtargets: verified. - Without the Card tag the cover drops
ThemeAddedVariant, whose probe shots the Card record names as verification: verified. - The neutral shots stay, since the surface tier plans a
visual-theme-matrixstory in the default theme: verified. - Shot keys are story id, theme and mode, so accepted keys keep their names: verified.
- No component, theme, spec or test change, and no product or public API change: verified.
- Plan counts from the author's run (probe 162 to 164, surface 366 to 368, nothing removed): reported; consistent with the planner's code.
- The new shots enter the baseline through a capture and accept after merge: verified as the documented route.
- Public text holds no internal context: verified.
pnpm preflight --quick: reported.- #14044 adds stories after the Disabled story and leaves its tag alone: verified.
apps/storybook/stories/SelectableCard.stories.tsx: clear.apps/storybook/stories/Card.stories.tsx: clear.
…ht from one capture Lane 0's #14044 merged after capture run 46320468653, adding four SelectableCard keys (Long text, Narrow width). All eight keys are now accepted from main capture run 46325077823 (7955ed8), which holds both #14046 and #14044: the manifest is reset to main's and gate.mjs accept runs once per group.
added (#14050) * test(visual): accept the probe Disabled SelectableCard and Neutral ThemeAddedVariant Card shots gate.mjs accept from main capture run 46320468653 (dea3ad6e) for the four keys #14046 added: core-selectablecard--disabled__probe-light/-dark and core-card--theme-added-variant__neutral-light/-dark. * test(visual): also accept #14044's SelectableCard shots; take all eight from one capture Lane 0's #14044 merged after capture run 46320468653, adding four SelectableCard keys (Long text, Narrow width). All eight keys are now accepted from main capture run 46325077823 (7955ed8), which holds both #14046 and #14044: the manifest is reset to main's and gate.mjs accept runs once per group. * test(visual): the #14044 accept record says what its frames show CodeBunny on 8a8e0ac: in Narrow width only the descriptions wrap, and the Long text title ends in an unbroken word. gate.mjs accept is re-run from main's manifest and the same capture with that reason. Frames unchanged.
Maintainer impact
#14017 lets a theme style a disabled SelectableCard through its
data-disabledstate, and #14031 put the Disabled story in the visual baseline. But the baseline shoots that story only in the neutral theme, which styles nothing ondata-disabled: its shots show only the card's own disabled dimming. The probe theme does style the state (packages/themes/probe/src/probeTheme.ts,selectable-card→disabled: its own background, text, border and outline colours), but the probe coverage tier shoots each target once (selectable-card), not each state. So a change that breaks how a theme reaches a disabled card reaches no pixel comparison today.Intended invariant
The visual gate decides coverage by story tags (
.github/scripts/visual-gate/README.md; AST-030 FR12):visual-baselineadds a default-theme contract, andvisual-theme-matrixopts the story into every accepted theme (neutral and probe), which also plans its probe shots (probe:opt-inin.github/scripts/visual-gate/lib/plan.mjs).Change
apps/storybook/stories/SelectableCard.stories.tsx: theDisabledstory's tag changes fromvisual-baselinetovisual-theme-matrix. The story's content and id do not change.apps/storybook/stories/Card.stories.tsx: Card'sThemeAddedVariantstory getsvisual-theme-matrixtoo. An opted-in story's targets count as covered in the probe cover, and the Disabled story renders the samecardandselectable-cardtargets, so without this tag the cover dropsThemeAddedVariant, whose probe shots the Card record names as verification (core-card--theme-added-variant, FR1, FR2, FR5).visual-theme-matrixstory in the default theme, as it plans avisual-baselineone.Evidence
core-selectablecard--disabled__neutral-lightand__neutral-darkonly, and the neutral theme writes no rule for SelectableCard'sdata-disabled.gate.mjs plan --jsonon this branch and on main with the same scout observations (a recent CI scout): the probe tier addscore-selectablecard--disabled__probe-lightand__probe-darkand removes nothing (164 shots against 162); the surface tier addscore-card--theme-added-variant__neutral-lightand__neutral-darkand removes nothing (368 against 366). Without the Card tag, the probe tier droppedcore-card--theme-added-variant__probe-lightand__probe-dark. Shot keys are story id, theme and mode (shotKey), so the accepted keys keep their names. The four added shots enter the baseline from a main capture and accept after this merges.Scope
Components: SelectableCard (story only)
Testing
pnpm preflight --quick.Overlap checked: #14044 (adds new SelectableCard stories after the Disabled story; does not touch its tag)