Repository navigation
[Component Audit] CommandPaletteList: make listbox evidence and composition guidance trustworthy - #7370
Merged
cixzhang merged 4 commits intoOct 12, 2026
Conversation
…nd styling inputs
… an observational contract Add a component-owned Storybook route for the standalone listbox and the scrolling palette composition, classify the component as verified RTL N/A, correct the composition hint, and record current behavior as a draft contract.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression42 of 448 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 22 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
github-actions
Bot
deleted the
night-watch-component-audit/CommandPaletteList/2026-10-12
branch
October 13, 2026 06:27
cixzhang
added a commit
that referenced
this pull request
Oct 14, 2026
…docs (#7372) ## User impact Builders reading DateInput's API reference could not find `containerClassName`, `containerStyle`, `controlClassName`, or `controlStyle`, even though DateInput accepts them and they are the only class-name and inline-style hooks it has after root styling was removed. The English, Chinese, and dense references now list all six part-styling props, like the other field components. The draft contract now matches DateInput's current behavior. Runtime behavior does not change. ## Audit scope - Package/component: `core/DateInput` - Base: `1e883f86e7aa5c2be376671f746d79e5cfae769b` - Frozen head: `4faee79d299c5f4661bfecbb01a7aade966440ee` - Mode: Night Watch whole-component audit · Rubric: **1.16.6** - Runtime/API changes: none (API reference, draft contract, and a `[docs]` Changeset) - Landing: held until the 0.7.0 release is tagged. ## Score - Before: **85.6 / C** — 2 open BLOCKs; §5b not measured. - After: **87.3 / C**, confirmed by the exact-head checks — the same 2 BLOCKs, both owned by open contributor pull requests (see Needs Review). - Sensitivity: resolve the 2 open BLOCKs and change nothing else → **99.0 / A**. - Sections §1, §2, §3, §4, §5a, §5b, §6, §7, §8, §9, §10 — before `3, 5, 5, 3, 5, nm, 5, 5, 4, 5, 4`; after `3, 5, 5, 3, 5, nm, 5, 5, 5, 5, 4`. ## Findings | ID | Section | Finding | Authority | Result | |---|---|---|---|---| | D1 | §1 A5 — BLOCK | In the bottom-sheet calendar, the month arrows become natively disabled at the first or last reachable month, so a keyboard user who steps onto that month loses focus to the document. | `architecture:interaction-modality`; WCAG 2.2 SC 2.4.3 | **Open.** #6304 already fixes it; not duplicated here. | | D2 | §4 B15 — BLOCK | After a clear, the pointer surface passes `undefined` to Calendar, which treats it as uncontrolled, so reopening the calendar shows the cleared date as selected. A focused test at the exact head reproduces it: one day stays selected after clear and reopen. | DateInput clear contract (FR1, FR11); Calendar's documented controlled-empty `null`; WCAG 2.2 SC 4.1.2 | **Open.** #6935 already fixes it; not duplicated here. | | D3 | §8 X5b — FIX | The API reference omitted `containerClassName`, `containerStyle`, `controlClassName`, and `controlStyle`, which DateInput accepts under `family:input-fields/FR10`; the other field members list them. | `family:input-fields/FR10`; rubric X5b | **Fixed** in the English, Chinese, and dense references. | | D4 | §8 — FIX | The draft contract described the removed `date-input-clear-icon` alias and did not cite the FR10 base-prop and part-styling rule DateInput now follows. | Current source; `family:input-fields/FR10` | **Fixed.** The contract cites FR10 and the current clear-glyph target; the FR10 suite joins `verified_by`. No new component requirement is added. | Not scored: the bottom-sheet surface inherits BottomSheet's recorded shared-dismissal adoption gap (owned by BottomSheet under `family:overlay-dismissal`). The bottom-sheet calendar's day cells fade their colors without a reduced-motion collapse, but the motion record is still a draft, so no current authority applies. ## What changed - `DateInput.doc.mjs` — four props entries in `docs` and `docsZh`, four `docsDense` descriptions, matching the sibling field components. - `DateInput.spec.md` (draft) — cites `family:input-fields/FR10` in the governing rules and the family relationship, adds `DateInput.fr10.test.tsx` to `verified_by`, and names the current clear-glyph target. - `.changeset/date-input-part-style-props-docs.md` — `[docs]` patch, because the API reference ships in the package. ## Evidence - This PR changes no behavior, so no new functional test was added; typed docs validation and the doc-prop suites cover the docs change. - Exact-head checks on `4faee79`: CI run 38256902974 succeeded, including build, lint, unit tests, docsite tests, and the Storybook build. - `pr-a11y` audited all 26 DateInput stories: 0 violations and no new baseline entries. - `pr-rtl` (core): `core/DateInput` passes the automatic check and its curated calendar/clear control-order check. - Stable visual regression: see Visual acceptance. - Owner-exempt `review-required` is success on `4faee79`, set by GitHub Actions through the repository's Review signal workflow. `spec-owner-approval` is success (draft record only), and the CLA check passes. - A private review of the exact head, title, and description is clean. - Local runs on the first head: DateInput, doc-prop, and theming suites — 757/757; `typecheck:docs`; `pnpm build`; docsite generate and tests — 620 passed, 6 skipped; `check:knowledge`; `check:changesets`. Later commits changed only draft-contract text, with `check:knowledge` re-run after each, plus one empty commit that retriggered a failed preview deployment. - No local browser result is credited; browser evidence comes from the exact-head checks above. ## Closed evidence inventory | Surface | Evidence | Result | |---|---|---| | Controlled ISO value, typing, constraints, formats | source; focused suites | pass | | Five presentation values and deprecated mapping | `Presentation.test.tsx`; native and touch suites | pass | | Pointer calendar open, select, close | source; tests; `OpenCalendarAudit` story | pass | | Clear and calendar selection | source; focused test at the exact head | open — D2 | | Bottom-sheet calendar, wheels, save | `DateInputTouch.test.tsx` | pass | | Bottom-sheet month arrows at a bound | source | open — D1 | | Native picker, Action, clear, focus continuity | `NativeDateField.test.tsx` | pass | | Field states, status, disabled reason, InputGroup | focused suites; `AllVariations` | pass | | FR10 base props and part styling | `DateInput.fr10.test.tsx`; `StylingParts` story | pass | | API reference completeness | `DateInput.doc.mjs` | fixed — D3 | | Theming targets | `themingTargets.test.ts`; themed stories | pass | | Accessibility and RTL | exact-head `pr-a11y` (26 stories) and `pr-rtl` (core) | pass | | Narrow viewport and coarse pointer pixels | none | not measured | ## Visual acceptance Product visual delta: **N/A**. The change is limited to the API reference, the draft contract, and a Changeset; no component source, style, story, or rendered output changes. The exact-head stable visual gate passed with verdict `changed`: 448 shots, 356 unchanged, 42 changed, 50 added, 22 removed, 0 failed, against a baseline captured on 2026-09-26. #7370's exact-head report, from a PR that changed no DateInput file, lists the same 42 changed, 50 added, and 22 removed shots. 41 changed shots match it pixel for pixel; the 42nd, a SideNav resize shot, also varies between runs of this PR. No DateInput shot changed: its 8 added and 2 removed shots appear identically in #7370's report. The verdict reflects baseline drift, not this PR. ## Knowledge overlap search - Terms: `component:DateInput`, `DateInput.spec.md`, `containerClassName`, `controlClassName`, `FR10`, `date-input-clear-icon`, plus the path `packages/core/src/DateInput/`. - Canonical owner: the existing draft `component:DateInput` at `packages/core/src/DateInput/DateInput.spec.md`; the FR10 rule stays with `family:input-fields` and is linked, not copied. - Overlapping open work inspected: #6935 and #6304 own D2 and D1; #7358 changes translator imports; #6884, merged after this audit's base, changes only the bottom-sheet padding in `TouchDateField.tsx`; #6133 and #5939 are drafts. None edits `DateInput.spec.md`. DateRangeInput, DateTimeInput, and TimeInput carry the same API-reference gap; that is outside this audit. ## Review feedback - Automated review asked that the contract not restate part of `family:input-fields/FR10` and then that it not add a draft requirement that no current spec states. The contract now only cites FR10; the earlier FR13 row and its verification row are removed. The automated review approved the final head. ## Needs Review - **D1** — focus at the bottom-sheet month bounds: owned by #6304. - **D2** — stale calendar selection after clear: owned by #6935. - **Merge timing** — held until the 0.7.0 release is tagged. ## Writing rubric results - R1 narration: none; the contract states current behavior. - R2 research: none. - R3 evidence: facts and standards, not changes. - R4 rejected alternatives: none. - R5 change references: none. - R6 open questions: none. ## FR10 exact-head report ```json { "schemaVersion": 1, "component": "DateInput", "package": "core", "mode": "night-watch", "rubricVersion": "1.16.6", "repositoryBase": "1e883f86e7aa5c2be376671f746d79e5cfae769b", "repositoryHead": "4faee79d299c5f4661bfecbb01a7aade966440ee", "componentContractHead": "4faee79d299c5f4661bfecbb01a7aade966440ee", "inventory": {"closed": true, "rows": 13}, "score": {"before": 85.6, "after": 87.3, "beforeBlocks": 2, "afterBlocks": 2}, "unresolvedObjectiveGaps": [{"id": "D1", "rule": "A5", "owner": "#6304"}, {"id": "D2", "rule": "B15", "owner": "#6935"}], "unresolvedManualGaps": [], "remediations": [ {"id": "D3", "state": "verified-source", "evidence": "six part-styling props listed in all three references"}, {"id": "D4", "state": "verified-source", "evidence": "draft contract cites FR10 and names the shared clear glyph target"} ], "approvals": {"privateExactHeadSelfReview": "clean", "reviewSignal": "success (GitHub Actions)", "specOwner": "draft record only"}, "checks": {"local": "green; no local browser", "exactHeadCI": "success (run 38256902974)", "a11y": "0 violations across 26 owned stories", "rtl": "automatic and curated checks pass", "visual": "N/A product delta; gate drift matches an unrelated PR"}, "eligibility": {"eligible": false, "reasons": ["FR11 auto-merge inactive", "two open BLOCKs owned by contributor pull requests", "held until the 0.7.0 release is tagged"]} } ```
12 tasks done
cixzhang
pushed a commit
that referenced
this pull request
Oct 14, 2026
## User impact
`CommandPaletteList` accepts the native `id` prop through `BaseProps`, but drops it when rendered outside a `CommandPalette`. Consumer selectors and caller-owned ARIA relationships therefore cannot target the supplied identifier in the supported standalone form.
## Problem and solution fit
The list forwards its remaining DOM props and then assigns `id={ctx?.listId}`. Without a command-palette context, that later `undefined` overwrites the forwarded consumer ID.
Use `ctx?.listId ?? props.id` so the standalone list preserves the supplied ID. Inside a composed `CommandPalette`, the context-managed list ID remains authoritative and the query field's `aria-controls` relationship is unchanged.
## Expected behavior and authority
The [current public component API contract, INV5](https://github.com/facebook/astryx/blob/17306ce7a4a3a50161065a2d8347ebe6d44d390c/docs/architecture/public-component-api.md#boundaries-and-invariants) requires accepted consumer DOM props to reach the element that owns the contract while protecting component-owned accessibility behavior. `CommandPaletteListProps` already extends `BaseProps`; no new prop, type, or usage pattern is introduced.
## Smallest restoration
- Preserve the consumer `id` on standalone `CommandPaletteList`.
- Retain the existing standalone regression test and the composed query-field/listbox relationship coverage.
- Narrow the patch changeset to `CommandPaletteList`.
The `CommandPaletteItem` correction from the original version of this PR has already landed in #7324. This branch is rebased onto current main and removes the overlapping Item implementation and test changes. The remaining List correction is also identified as owned by this PR in #7370.
No search, selection, keyboard, styling, ref, role, label, managed ARIA, or file-header changes are included.
## Evidence
```tsx
<CommandPaletteList id="command-results">
<CommandPaletteItem value="settings">Open settings</CommandPaletteItem>
</CommandPaletteList>
```
- **Before:** the rendered listbox has no `id`. Temporarily restoring `id={ctx?.listId}` makes the standalone regression test fail because `getAttribute('id')` returns `null`.
- **After:** the supplied ID reaches the listbox. The complete CommandPalette directory passes **91 tests across eight files**.
- **Representative unchanged path:** the existing composition test verifies that the query field's `aria-controls` still equals the rendered listbox ID inside `CommandPalette`.
## Scope
- [x] One standalone List ID-forwarding defect is restored.
- [x] Item changes already merged in #7324 are excluded.
- [x] No new public API, visual representation, default, or interaction model is introduced.
- [x] Public text and artifacts contain no internal Meta context.
## Testing
- [x] `pnpm exec vitest run --project ui packages/core/src/CommandPalette` — **91 passed**, eight files.
- [x] `pnpm -F @astryxdesign/core typecheck` — passed.
- [x] Strict ESLint on the two changed TypeScript files — passed.
- [x] Prettier check on all three changed files — passed.
- [x] `pnpm check:repo` — passed, including knowledge, changeset, and sync checks.
- [x] `pnpm build` — passed.
- [x] Commit hooks — staged-file formatting and `pnpm check:repo` passed.
- [x] Repository strict ESLint excluding one existing Git-ignored local generated bundle — **0 errors, 105 warnings**. The unmodified `pnpm lint:strict` also scans that local bundle and fails on it; no lint configuration change is included.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
CommandPaletteListhad no component-owned Storybook route, so the accessibility, RTL, and rendered checks could not inspect the results listbox at all. Its JSDoc also told builders to place it insideCommandPalette, which renders its own list and takes none from callers. This PR adds the smallest fixture set, an explicit RTL classification, focused contract tests, and accurate composition guidance. Runtime behavior does not change.Audit scope
core/CommandPaletteList291c4e9e2247340adb9755d970780cf0e516d45b159e7bdaf30c66954e2b0d808ebfd5d44ee6b4f6Score
2.5, 5, 3, 4, 5L, nm, 3, 5L, 3, 4, 5L; after2.5, 5, 3, 4, 5L, nm, 5, 5L, 5, 5, 5L.L= limited: §5a, §7, and §10 are structurally vacuous here (no radius, height, type, motion, state, effect, observer, or responsive logic), so their weight is redistributed. Scoring them as ordinary sections gives 75.6 → 83.3.Findings
accessibility-audit.js --components CommandPaletteListresolved no owned stories, so component-scoped axe, RTL, and rendered evidence could not run.architecture:component-test-sufficiencyINV2; rubric V10/X9/I17core-commandpalettelist--defaultandcore-commandpalettelist--scrolling-results; RTL is classified verified N/A.idis replaced by the absent context id.architecture:public-component-api/INV5@compositionHinttold builders to place the list insideCommandPalette, which renders its own list and accepts none.CommandPaletteAPI; shipped standalone example blocksrefreaches it, or that consumer class and style combine with the list target.architecture:component-test-sufficiencyINV2/INV6;architecture:public-component-api/INV6,INV8role="listbox"around a non-option message; axe reportsaria-required-children(critical) on the empty palette fixture in the exact-head checks of #7094.listboxrequired owned elementsWhat changed
apps/storybook/stories/CommandPaletteList.stories.tsx—Default(standalone listbox with its translated default name) andScrollingResults(24 results in an inlineCommandPalettecapped at 320px, which exercises the list overflow container).apps/storybook/rtl-audit/verified-not-applicable.json— a specific verified-N/A reason with file digests.CommandPaletteList.test.tsx— query-field relationship,ref, and styling-input composition.CommandPaletteList.tsx— composition hint only.CommandPaletteList.spec.md— draft observational contract, including the AR4 empty-content conflict;CommandPalette.spec.mdnames it as the owner of the List root's own semantics..changeset/command-palette-list-composition-docs.md—[docs]patch for the shipped JSDoc.TDD and mutation evidence
No production behavior changed, so each red arm mutates the shipped implementation and then restores it.
id={ctx?.listId}ref={ref}classNamefrommergeProps; separately drop the listthemePropstargetClosed evidence inventory
CommandPalette/index.ts, package subpathchildren(required)labeland translated defaultrole="listbox"and name win over consumerrole/aria-labelaria-controlsidrefclassName,style,xstylemerge with the targetxstylesource-verifiedonMouseOverpassthrough used by palette hover highlightCommandPalette.test.tsxhover testcommand-palette-listtargetthemingTargets.test.tsScrollingResultsfixture rendered by exact-head ActionsVisual acceptance
Product visual delta: N/A. No style, token, target, or rendered behavior changes; the only source change is JSDoc. On the frozen head, Stable visual regression ran its full plan (448 shots) and reported
changed(42 changed, 50 added, 22 removed, 0 failed). None of those shots is a CommandPalette shot, and an unrelated pull request at the same base reports the same 42 changed shots with identical pixel counts and the same removals, so the verdict is existing baseline drift onmain, not this change.Validation (frozen head)
themingTargets, and doc-prop tests — 523/523.pnpm check:knowledge,pnpm check:changesets,pnpm check:sync,check-use-client.pnpm buildand production Storybook build. Route resolution before: "No owned Storybook stories resolved for: CommandPaletteList"; after:core/CommandPaletteList -> core-commandpalettelist--default, core-commandpalettelist--scrolling-results.pr-a11yauditedcore/CommandPaletteList -> core-commandpalettelist--default, core-commandpalettelist--scrolling-resultswith 0 violations and no baseline change;pr-rtl (core)reportscore/CommandPaletteListasverified-nawith no applicable dimension; no local browser result is credited.Knowledge overlap search
CommandPaletteList,command-palette-list,component:CommandPaletteList,listbox, plus the pathspackages/core/src/CommandPalette/CommandPaletteList*andCommandPalette.spec.md.component:CommandPalette(packages/core/src/CommandPalette/CommandPalette.spec.md) names the List, as an anatomy part with itscommand-palette-listtarget mapping. It states that it does not describe listbox semantics.component:CommandPaletteListrecords only the List root's own facts — accessible name, list-id application, native and styling passthrough, and overflow scrolling. Anatomy and target mapping stay with the aggregate record, which gains one "Does not own" bullet pointing here.idgap; perf(i18n): every core component renders with its own English slice #7358 only changes the translator import; feat(core): make the CLI visible where agents read #5939 is a docs-only draft. None of these is authority, and this PR's aggregate edit is a separate bullet so it does not rewrite their lines.Needs Review
human-api): should a public composite owner supply keyboard navigation for a standalone list, should the standalone composition take a different role, or should standalone use stay pointer-only presentation? This is the same open question as the CommandPaletteItem audit in [Component Audit] CommandPaletteItem: preserve option activation and identity #7324.id: owned by fix(CommandPaletteList): preserve standalone ids #6988.Writing rubric results
FR10 exact-head report
{ "schemaVersion": 1, "component": "CommandPaletteList", "package": "core", "mode": "night-watch", "rubricVersion": "1.16.6", "repositoryBase": "291c4e9e2247340adb9755d970780cf0e516d45b", "repositoryHead": "159e7bdaf30c66954e2b0d808ebfd5d44ee6b4f6", "componentContractHead": "159e7bdaf30c66954e2b0d808ebfd5d44ee6b4f6", "inventory": {"closed": true, "rows": 14}, "score": {"before": 69.6, "after": 79.2, "beforeBlocks": 4, "afterBlocks": 3}, "unresolvedObjectiveGaps": [{"id": "D2", "rule": "P2/P3", "owner": "#6988"}, {"id": "D6", "rule": "A2", "owner": "#6950"}], "unresolvedManualGaps": [{"id": "D5", "rule": "A2/A4", "question": "OQ1"}], "remediations": [ {"id": "D1", "state": "verified-source", "evidence": "owned story route resolves two stories; verified-N/A RTL record"}, {"id": "D3", "state": "verified-source", "evidence": "composition hint matches the public API and shipped blocks"}, {"id": "D4", "state": "verified-test", "evidence": "three focused tests, each red under its own mutation"} ], "approvals": {"privateExactHeadSelfReview": "clean", "reviewSignal": "pending", "specOwner": "draft records only"}, "checks": {"local": "green; no local browser", "exactHeadCI": "success (run 38237833607)", "a11y": "0 violations on both owned stories", "rtl": "verified-na", "visual": "N/A product delta; gate drift identical on an unrelated PR"}, "eligibility": {"eligible": false, "reasons": ["FR11 auto-merge inactive", "three open BLOCKs, one needing an owner decision", "Actions-owned review-required pending"]} }