Skip to content

[Component Audit] CommandPaletteItem: preserve option activation and identity - #7324

Open
cixzhang wants to merge 4 commits into
mainfrom
night-watch-component-audit/CommandPaletteItem/2026-10-11
Open

cixzhang wants to merge 4 commits into
mainfrom
night-watch-component-audit/CommandPaletteItem/2026-10-11

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

User impact

Disabled command options no longer fire product click callbacks. Standalone items also retain caller-provided DOM identity, so labels, automation, and integrations can address the option they rendered without changing CommandPalette-managed active-descendant IDs.

What changed

  • Suppress the entire click path while isDisabled; enabled consumer cancellation still stops local selection, context selection, and close.
  • Preserve caller id, ref, data/ARIA props, classes, styles, and the stable theme target on standalone items while retaining context-owned option semantics.
  • Add focused context/passthrough/disabled tests, a dedicated four-state Storybook fixture, an RTL verified-N/A record, aligned item/root docs, a patch changeset, and a draft observational component contract.

Authority and compatibility

  • Passthrough and event composition: architecture:public-component-api/INV5,INV7.
  • Accessibility and composite ownership: spec:AST-020/FR1,FR2, architecture:interaction-modality, and WAI-ARIA 1.2 option semantics. Buttons and links are not nested inside role="option" because their semantics become presentational.
  • Compatibility: victim-free [fix] under spec:AST-017/FR1,FR3,FR5; isDisabled already promises non-interaction and BaseProps already promises standalone native passthrough.
  • Open owner decision, not changed here: A2/OQ1 asks what keyboard/composite contract the released standalone Item path should expose.
  • Needs Review, not auto-fixed: OQ2 records that selected background paint masks keyboard highlight when both states apply. Local browser proof is unavailable, and any visual remedy needs owner direction.
  • Attribution: the standalone Item id correction overlaps prior Item work by korkt-kim; coauthor and release-note credit are preserved while the separate CommandPaletteList correction remains out of scope.

Audit score

Rubric: 1.16.6 · mode: Night Watch

  • Before: 75.8 / C, 3 open BLOCKs, rendered design not measured.
  • After: 93.3 / C, 1 open BLOCK (A2 standalone keyboard ownership), rendered design not measured; OQ2 remains Needs Review.
  • Sensitivity: settle and implement A2 with no other score movement → 100 / A; OQ2 still needs separate rendered judgment.

Test plan

  • pnpm vitest run packages/core/src/CommandPalette/CommandPaletteItem.test.tsx packages/core/src/CommandPalette/CommandPalette.test.tsx packages/core/src/theme/themingTargets.test.ts — 464 passed.
  • pnpm -F @astryxdesign/core build — passed.
  • pnpm -F @astryxdesign/storybook build — passed.
  • Focused strict ESLint, pnpm check:knowledge, pnpm check:changesets, and pnpm check:sync — passed.
  • pnpm test — the broad concurrent local run produced 52 existing CLI/filesystem/time-limit failures; focused component, parent, and theming suites pass. Exact-head Actions remains authoritative.
  • Browser, accessibility, RTL, and visual evidence: pending exact-head Actions. Local Chromium launch is unavailable on this managed host, so no local browser result is credited.

Writing rubric results

  • R1 narration: none.
  • R2 research: none.
  • R3 evidence: current source, tests, public docs, and current records.
  • R4 rejected alternatives: remain in OQ1/OQ2 rather than asserted as decisions.
  • R5 change references: none.
  • R6 open questions: OQ1 standalone keyboard/composite ownership and OQ2 selected-plus-highlighted paint remain genuinely unanswered.

@vercel

vercel Bot commented Oct 11, 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 Oct 11, 2026 1:26pm UTC

Request Review

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

astracat-bot Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 11, 2026, 1:53 PM UTC

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

25 of 460 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 155,733
Chat Full AI Chat probe dark 155,005
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,229
Chat With Attachments probe dark 11,065
TableRowExpansion Detail Panel neutral dark 5,129
TableRowExpansion Detail Panel neutral light 4,050
SideNav Resizable in AppShell probe light 3,208
TableGroupedRows Default neutral light 2,133
TableGroupedRows Default neutral dark 2,116
Markdown Default probe dark 897
Markdown Default probe light 897
Markdown Default neutral dark 882

and 5 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review found nothing blocking: both runtime corrections restore CommandPaletteItem's documented disabled and passthrough behavior, and the new test for each fails without the fix and passes with it. No changes are requested. The standalone keyboard contract and selected-plus-highlighted paint stay with the open questions already recorded in this PR.

[Automated review]

This branch was successfully deployed

1 active deployment
Preview — d04bbb58 Deployed Oct 11, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant