Skip to content

test(visual): the disabled SelectableCard story joins the visual baseline - #14031

Merged
cixzhang merged 1 commit into
mainfrom
lane4/selectablecard-disabled-visual-baseline
Nov 29, 2026
Merged

cixzhang merged 1 commit into
mainfrom
lane4/selectablecard-disabled-visual-baseline

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

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 disabled state (#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-baseline adds 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: the Disabled story gets tags: ['visual-baseline']. The story's content and id (core-selectablecard--disabled) do not change.
  • No component, theme, spec or test change.

Evidence

  • Failure before the change: on main the Disabled story declares no tags, and no key in the baseline manifest (.github/visual-baseline/manifest.json) captures a disabled SelectableCard.
  • Success after the change: storybook index on this branch lists core-selectablecard--disabled with tags dev, test, manifest, autodocs, visual-baseline. The default touched visual check compares only accepted keys (existingComponentBaselinePlan in .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.
  • Product/runtime behavior verified unchanged: only a story tag changes.

Scope

Components: SelectableCard (story only)

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec storybook index in apps/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)

…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.
@cixzhang cixzhang added the lane:4 Astryx fix-loop lane 4 owns this label Nov 29, 2026
@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 29, 2026 3:28pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 29, 2026
@astracat-bot

astracat-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 29, 2026, 6:02 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 714cc48

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 714cc48

Storybook · Sandbox · built from this PR's head

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-visual label a change under apps/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 "Without ci: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.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-visual run 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.

Automated review (maintainer link)

@cixzhang
cixzhang merged commit ee895f3 into main Nov 29, 2026
141 of 144 checks passed
cixzhang added a commit that referenced this pull request Nov 29, 2026
…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.
@github-actions
github-actions Bot deleted the lane4/selectablecard-disabled-visual-baseline branch November 30, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 714cc48f Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. lane:4 Astryx fix-loop lane 4 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant