Skip to content

test(CommandPalette): match the current Spinner progressbar role - #10196

Merged
cixzhang merged 1 commit into
mainfrom
recut/test-commandpalette-progressbar-role
Nov 6, 2026
Merged

cixzhang merged 1 commit into
mainfrom
recut/test-commandpalette-progressbar-role

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Supersedes #10175 (co-authored by astracat-bot)

The same change as #10175, byte for byte, re-cut on current main from a maintainer branch with the bot as co-author.

Maintainer impact

All six CommandPalette audit captures fail before screenshots or semantic sensors run: the pending palette's .astryx-spinner[role="status"] locator finds zero elements instead of one. Spinner's role changed to progressbar in #7910, but this consumer assertion still queries the old role.

Intended invariant

The current Spinner contract, AR1 and the compatibility table, requires role="progressbar" for every indicator, including hidden composed rings. CommandPalette delegates its loading indicator to Spinner under its FR3 contract.

Change

Change only the shared capture locator from status to progressbar. Keep the exact count of one and every existing geometry, contrast, anatomy, and screenshot check. The CSS locator remains appropriate because CommandPalette deliberately hides its composed spinner with aria-hidden.

No behavior change. No remaining uncertainty about the expected role; restoring status in the component would contradict the current Spinner contract.

Evidence

  • Before: reproduced captures narrow-light in Chromium with the exact CI failure at line 139: expected 1, received 0.
  • After: all six captures pass: wide-light-ltr, wide-dark-ltr, wide-light-rtl, wide-dark-rtl, narrow-light, and narrow-dark (7.2 seconds).
  • Representative unchanged path: all 46 CommandPaletteInput.test.tsx tests pass.
  • The Storybook fixture, audit test file, and Spinner implementation are unchanged between the first bad commit and the tested base, eaea67de3568bde61072c901f1e9713fe19b0ce4, apart from this assertion.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • No unrelated product changes.
  • Public text and artifacts contain no private operational context.

Testing

Using the repository-pinned Node.js 24.22.1 and pnpm 11.10.0:

  • pnpm storybook:build
  • pnpm exec playwright test packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts --config=playwright.config.ts --project=chromium
  • pnpm exec vitest run --project ui packages/core/src/CommandPalette/CommandPaletteInput.test.tsx --maxWorkers=1
  • pnpm specs:for --diff origin/main
  • pnpm review:pre — no findings; self-review only, independent review still needed.
  • Targeted Prettier and ESLint checks, and git diff --check pass.

Co-authored-by: astracat-bot[bot] <323722387+astracat-bot[bot]@users.noreply.github.com>
@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 6, 2026
@vercel

vercel Bot commented Nov 6, 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 6, 2026 1:26am UTC

Request Review

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

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 1:33 AM UTC

@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 audit locator now matches the role="progressbar" that Spinner renders under its current accessibility contract, and the exact count of one is kept. The CommandPalette audit fails all six captures on the base (expected 1, received 0 at line 139) and passes all six with this change.

CI has not run its required checks on this head yet: the run stopped because the CI queue was full, so the next step is to re-run the CI jobs.

[Automated review]

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 7fb7be3

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
CommandPalette 59.0 kB (0) · 12.4 kB CSS (0) — ✓ · ✓ · ✓
CommandPaletteEmpty 6.4 kB (0) · 3.5 kB CSS (0) — ✓ · ✓ · —
CommandPaletteFooter 17.2 kB (0) · 3.7 kB CSS (0) — ✓ · ✓ · ✓
4 more components
Component Size LoC Visual · A11y · RTL
CommandPaletteGroup 3.7 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
CommandPaletteInput 27.9 kB (0) · 7.5 kB CSS (0) — ✓ · ✓ · ✓
CommandPaletteItem 11.7 kB (0) · 3.6 kB CSS (0) — ✓ · ✓ · —
CommandPaletteList 16.1 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 19 rows; run pnpm api:report.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang
cixzhang marked this pull request as draft November 6, 2026 01:52
@cixzhang
cixzhang marked this pull request as ready for review November 6, 2026 01:52
@cixzhang
cixzhang merged commit 8ee380b into main Nov 6, 2026
130 of 164 checks passed
@cixzhang
cixzhang deleted the recut/test-commandpalette-progressbar-role branch November 6, 2026 03:42

This branch was successfully deployed

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

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant