Skip to content

test(visual): the disabled SelectableCard story is shot in the probe theme too - #14046

Merged
cixzhang merged 2 commits into
mainfrom
lane4/selectablecard-disabled-theme-matrix
Nov 29, 2026
Merged

cixzhang merged 2 commits into
mainfrom
lane4/selectablecard-disabled-theme-matrix

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

#14017 lets a theme style a disabled SelectableCard through its data-disabled state, and #14031 put the Disabled story in the visual baseline. But the baseline shoots that story only in the neutral theme, which styles nothing on data-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-baseline adds a default-theme contract, and visual-theme-matrix opts the story into every accepted theme (neutral and probe), which also plans its probe shots (probe:opt-in in .github/scripts/visual-gate/lib/plan.mjs).

Change

  • apps/storybook/stories/SelectableCard.stories.tsx: the Disabled story's tag changes from visual-baseline to visual-theme-matrix. The story's content and id do not change.
  • apps/storybook/stories/Card.stories.tsx: Card's ThemeAddedVariant story gets visual-theme-matrix too. An opted-in story's targets count as covered in the probe cover, and the Disabled story renders the same card and selectable-card targets, so without this tag the cover drops ThemeAddedVariant, whose probe shots the Card record names as verification (core-card--theme-added-variant, FR1, FR2, FR5).
  • The neutral shots accepted in test(visual): add the Disabled SelectableCard shots to the baseline #14042 stay: the surface tier plans a visual-theme-matrix story in the default theme, as it plans a visual-baseline one.
  • No component, theme, spec or test change.

Evidence

  • Failure before the change: the baseline manifest has core-selectablecard--disabled__neutral-light and __neutral-dark only, and the neutral theme writes no rule for SelectableCard's data-disabled.
  • Success after the change, from gate.mjs plan --json on this branch and on main with the same scout observations (a recent CI scout): the probe tier adds core-selectablecard--disabled__probe-light and __probe-dark and removes nothing (164 shots against 162); the surface tier adds core-card--theme-added-variant__neutral-light and __neutral-dark and removes nothing (368 against 366). Without the Card tag, the probe tier dropped core-card--theme-added-variant__probe-light and __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.
  • 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 preflight --quick.

Overlap checked: #14044 (adds new SelectableCard stories after the Disabled story; does not touch its tag)

…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.
@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 10:11pm 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, 10:22 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 205afb2

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 425657d

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.

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-baseline adds a default-theme contract and visual-theme-matrix opts 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.

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.

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 card and selectable-card targets as covered, so the Card ThemeAddedVariant story, which renders only those two targets, drops out of the plan and its core-card--theme-added-variant probe shots, the theme-added card check the Card spec's verification map names, stop being captured; keep it planned, for example by tagging ThemeAddedVariant with visual-theme-matrix as 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-baseline adds a default-theme contract and visual-theme-matrix opts 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.

Automated review (maintainer link)

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.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 425657d

@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: 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-baseline adds a default-theme contract and visual-theme-matrix opts into every accepted theme and plans probe shots: verified.
  • Only the Disabled story's tag changes; its content and id stay: verified.
  • Card's ThemeAddedVariant gains visual-theme-matrix: verified.
  • An opted-in story's targets count as covered in the probe cover, and the Disabled story renders the same card and selectable-card targets: 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-matrix story 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.

Automated review (maintainer link)

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

This branch was successfully deployed

1 active deployment
Preview — 425657dd 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