Repository navigation
test(visual): the disabled SelectableCard story joins the visual baseline - #14031
Conversation
…line The Disabled story now has a visual-baseline tag, so the visual gate covers a disabled card, selected and unselected, including the data-disabled state a theme styles (#14017). Only the One Selected Card story had baseline shots.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 714cc48 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the two earlier description points are fixed and the story tag is correct, but one rewritten sentence in the Evidence section misstates how the visual gate plans a pull request, so please correct it.
- The Evidence section says a pull request's plan compares only accepted keys, but with the
ci:run-visuallabel a change underapps/storybook/counts as broad visual scope and runs the full plan, which shoots both Disabled shots and lists them as added (.github/workflows/ci.yml:6027-6029,.github/scripts/visual-gate/lib/plan.mjs:679-690,.github/scripts/visual-gate/lib/compare.mjs:273-278), so limit the sentence to the default check, for example "Withoutci:run-visual, a pull request's default check compares only accepted keys of the components it touches, so this PR's default check captures no Disabled shot; with the label, a Storybook change runs the full plan, which lists the two shots as added."
The tag follows the visual-gate convention and leaves baseline acceptance to a separate maintenance pull request, as the visual-regression spec requires.
Claims and files checked
Review mode: same-head; reason: none
- Live title, "test(visual): the disabled SelectableCard story joins the visual baseline": verified; the tag puts the story in the full plan, and its keys arrive through maintenance.
- Changed rules since the last review (0): none.
- The baseline shows SelectableCard in its own One Selected Card story (Neutral) and in Card's theme-added-variant story (Probe, enabled brand cards): verified by enumerating every story that renders SelectableCard and every baseline key.
- No baseline shot shows a disabled card: verified by the same enumeration.
- Themes can style a disabled card through its disabled state since #14017: verified in the component's theming target and the state it reflects.
- A change to the disabled look reaches no pixel comparison today: verified; the accessibility audit reads the disabled card's opacity from the DOM, not its pixels.
- The visual gate decides coverage by story tags, the representative story needs no tag, and the tag adds a default-theme contract: verified in the visual-gate README and plan.
- Adding a key is full-plan baseline maintenance, accepted from main's capture after merge: verified.
- Only the story's tags change; its content and id are unchanged: verified.
- No component, theme, spec or test change: verified (one file).
- On main the story declares no tags, and no baseline key captures a disabled card: verified.
- Storybook's index lists the story with the new tag beside the defaults: reported.
- A pull request's plan compares only accepted keys: false; a labelled pull request with a Storybook change runs the full plan.
- This pull request's visual report captures no Disabled shot: verified without the label, since a story-only change runs no visual capture.
- The two Neutral shots enter the baseline from a main capture after merge: verified.
- Product behavior is unchanged: verified against the diff.
- Scope is the SelectableCard story only, with no API, behavior or policy change: verified.
- Public text contains no internal context: verified.
- Checks run (storybook index, quick preflight): reported.
- Overlap: #14029 reads the story by id, and #13733 and #13734 change a different story file: verified.
- File
apps/storybook/stories/SelectableCard.stories.tsx: clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run its heavy suites on this head yet; they start once this review passes.
The rewritten Evidence section now matches how the visual gate plans this change: the default touched check compares only accepted keys, and a ci:run-visual run plans the two Disabled shots and lists them as added without failing. The story tag adds coverage through the existing visual owner and leaves baseline acceptance to a separate maintenance pull request, as the visual-regression spec requires.
Claims and files checked
Review mode: same-head; reason: none
- Live title, "test(visual): the disabled SelectableCard story joins the visual baseline": verified; the tag puts the story in the full plan, and its keys arrive through maintenance.
- Changed rules since the last review (0): none.
- The baseline shows SelectableCard in its own One Selected Card story (Neutral light and dark) and in Card's theme-added-variant story (Probe light and dark, brand cards selected and unselected): verified by enumerating every story that renders SelectableCard and every baseline key.
- No baseline shot shows a disabled card: verified by the same enumeration.
- Themes can style a disabled card through its disabled state since #14017: verified in the component's theming target and the state it reflects.
- A change to the disabled look, border or opacity reaches no pixel comparison today: verified; no accepted key renders a disabled card.
- The visual gate decides coverage by story tags, the representative story needs no tag, and the tag adds a default-theme contract: verified in the visual-gate README and plan.
- Adding a key is full-plan baseline maintenance, accepted from main's capture after merge: verified.
- Only the Disabled story's tags change; its content and id are unchanged: verified.
- No component, theme, spec or test change: verified (one file).
- On main the story declares no tags, and no baseline key captures a disabled card: verified.
- Storybook's index lists the story with the new tag beside the defaults: reported.
- The default touched check compares only accepted keys, so it shoots no Disabled frame: verified; it plans only the component tier, whose shots are filtered to accepted keys, and this pull request touches no component.
- A full
ci:run-visualrun plans the story's two keys through the surface tier and reports them as added, which blocks nothing: verified; a Storybook change runs the full plan, new keys give a changed verdict, and both the labelled check and the release check accept that verdict. - Either way, the two Neutral shots enter the baseline from a main capture after merge: verified.
- Product behavior is unchanged: verified against the diff.
- Scope is the SelectableCard story only, with no API, behavior, visual direction or policy change: verified.
- Product changes found during the work were removed or split: verified; the diff is one line.
- Public text contains no internal context: verified.
- Checks run (storybook index, quick preflight): reported.
- Overlap: #14029 reads the story by id, and #13733 and #13734 change a different story file: verified.
- File
apps/storybook/stories/SelectableCard.stories.tsx: clear.
…14042) * test(visual): add the Disabled SelectableCard shots to the baseline gate.mjs accept from main capture run 46297093443 (ee895f3) for core-selectablecard--disabled__neutral-light and __neutral-dark, which #14031 tagged for the baseline; they show #14017's data-disabled styling. * test(visual): the Disabled SelectableCard record says what its frames show CodeBunny on 4b6ca4c: Neutral styles nothing on data-disabled, so the frames show SelectableCard's own half-opacity disabled dimming, not #14017's data-disabled styling. gate.mjs accept is re-run from the same capture and keys with that reason. Frames unchanged.
Maintainer impact
The visual baseline shows SelectableCard in its own "One Selected Card" story (neutral light and dark) and in Card's "theme added variant" story (probe light and dark, brand cards selected and unselected). No baseline shot shows a disabled card. A theme can now style a disabled card through its
disabledstate (#14017), so a change to that look, or to the disabled card's border and opacity, reaches no pixel comparison today.Intended invariant
The visual gate decides coverage by story tags: the representative story needs no tag, and
visual-baselineadds a default-theme contract (.github/scripts/visual-gate/README.md; AST-030 FR12). Adding a key is full-plan baseline maintenance, so the new shots are accepted separately from main's capture after this merges.Change
apps/storybook/stories/SelectableCard.stories.tsx: theDisabledstory getstags: ['visual-baseline']. The story's content and id (core-selectablecard--disabled) do not change.Evidence
Disabledstory declares no tags, and no key in the baseline manifest (.github/visual-baseline/manifest.json) captures a disabled SelectableCard.storybook indexon this branch listscore-selectablecard--disabledwith tagsdev, test, manifest, autodocs, visual-baseline. The default touched visual check compares only accepted keys (existingComponentBaselinePlanin.github/scripts/visual-gate/lib/plan.mjs), so it shoots no Disabled frame. A full visual run (ci:run-visual) plans the story's two keys through the surface tier and reports them as added, which blocks nothing. Either way, the two shots (neutral light and dark) enter the baseline from a main capture and accept after this merges.Scope
Components: SelectableCard (story only)
Testing
pnpm exec storybook indexinapps/storybook, reading the Disabled entry's tags.pnpm preflight --quick.Overlap checked: #14029 (reads the Disabled story by its id, which a tag does not change), #13733 and #13734 (change
SelectableCardGroup.stories.tsx, a different file)