Repository navigation
fix(core): audit BaseTypeahead - #6179
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7fee5ae to
95a475b
Compare
95a475b to
3930cd1
Compare
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsTypeahead (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual RegressionStatus: No visual change across 2 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
3930cd1 to
8c792c2
Compare
8c792c2 to
7595c9e
Compare
7595c9e to
d539b93
Compare
There was a problem hiding this comment.
Direct BaseTypeahead users can still lose accessible relationships, focus order, or result text, so I don’t think this is ready yet.
- The new passthrough still overwrites
id,tabIndex,aria-describedby, andaria-labelledby. - At 320px, the popup reaches one viewport edge and the long result creates 447px of scrollable content inside a 288px listbox.
- The observational record says disabled and stale paths are covered, but exact-head probes still select after becoming focusable-disabled and reopen after Escape when pending work resolves. These are inherited, so please record them rather than taking on their fixes here.
- Please keep the permanent fixture surface smaller: reuse the existing Custom Search block and drive equivalent story states from one reusable fixture.
The grapheme, empty-option, forced-colors, label/focus, a11y, and RTL checks otherwise look good.
af0df71 to
d08602b
Compare
d08602b to
7af883c
Compare
…-audit/BaseTypeahead/2026-09-09
|
/approve-spec dc02cb0 |
There was a problem hiding this comment.
The final head resolves the prior review findings. Native input attributes preserve their documented precedence, the 320px results surface keeps both gutters and contains long content, inherited A4 and A11 violations are recorded accurately, and the permanent fixtures are reduced to reusable coverage. Exact-head evidence and the completed machine checks support the corrected 77.8/C audit result.
|
/approve-spec dc02cb0 |
Resolved conflicts:
- packages/core/src/Tokenizer/Tokenizer.tsx: took upstream's
BusyIndicatorLaneProvider-wrapped BaseTypeahead (array inputXStyle with
the lane reserve) and re-added
`transformQuery={hasCreate ? commitDelimitedText : undefined}`.
- packages/core/src/Tokenizer/Tokenizer.test.tsx: took upstream's
multi-line vitest import (adds beforeEach) and folded this branch's
`useState` into upstream's `import {Profiler} from 'react'`.
- packages/core/src/Typeahead/BaseTypeahead.doc.mjs: kept upstream's
xstyle/inputTabIndex/onKeyDown entries and re-added the transformQuery
entries (docs, docsZh, docsDense), prettier-formatted like the rest of
upstream's now-formatted file.
Semantic fallout fixed in packages/core/src/Typeahead/BaseTypeahead.tsx:
- The empty-query branch called `setIsLoading(false)` directly. Upstream
(meta#5555) routes the busy state through `setLoading`, which also reports
it to the BusyIndicatorLane and edge-guards on a ref. Bypassing it left
Tokenizer's end-lane spinner up forever after a delimiter commit
abandoned an in-flight search. Now `setLoading(false)`. Covered by the
new Tokenizer test "a delimiter commit clears the busy indicator of an
in-flight search" (red before: the Loading status span was still in
the document).
- Upstream's meta#6179 audit spreads `...rest` onto the input, but this
branch's hard-coded `onCompositionEnd={handleCompositionEnd}` came
after it and silently dropped a consumer's onCompositionEnd. It is now
destructured and composed with composeEventHandlers, like
onFocus/onBlur/onPointerDown. Covered by extending BaseTypeahead's
"forwards supported DOM, styling, and event props" test (red before:
onCompositionEnd called 0 times).
Tokenizer, Typeahead and PowerSearch suites: 14 files, 439 tests pass.
Why
core/BaseTypeaheadwas first in the Night Watch queue. The audit found dropped input props, invalid empty-result semantics, grapheme-counting drift, and narrow-viewport overflow. Formal review then found incomplete native/legacy precedence, remaining 320px content overflow, an omitted stale post-Escape failure, and excess permanent fixtures.What changed
xstyleinputs; defined legacy input aliases win, while nativeid,aria-labelledby,aria-describedby, andtabIndexsurvive when aliases are undefined;menuWidthas a requested width before viewport clamping and records the shipped focusable-disabled and stale post-Escape failures without overstating them;No public prop, export, default, or compatibility promise is added or removed.
Audit result
core/BaseTypeahead(@astryxdesign/core)N/1.16.253bc34db7c9dd40c3fe0f0e0f419adaea71a73cd, 63.4 / D507f7c203f4e451a2bb50ecd731c850d510271fb, 72.4 / Cdc02cb01275f4b616a08533295db7c2a2b6fc814, 77.8 / C18781904cb07904c51f273aaaed272ec62d669b1; all 12 PR-owned files match the reviewed head byte-for-byte.9b8be1bb1dAffected rubric rows
x=32, right=320, clientWidth=288, scrollWidth=447tox=32, right=304, clientWidth=272, scrollWidth=272; every option is also contained. Responsive improves 1.0 → 5.0.argTypesare removed, and block examples are distinct rather than duplicate.Retained findings
BaseTypeaheadremains constructible without an accessible name; requiring one changes public API/default behavior.BaseTypeaheadPropsexposes package-internal composition knobs; removal or admission needs compatibility ownership.Validation
dc02cb0; focused suite 610 passed.95d05ca; the only later source delta is the two focusable-disabled accuracy comments.pnpm teston predecessor candidateaf0df71f(the only later change is block registry composition): 16,112 passed, 33 failed, 45 skipped. Failures were unrelated Mac/repository fixtures and timing limits; exact-head GitHub CI is the authoritative full-suite gate.Exact-head audit eligibility report
{ "report_version": 2, "component": "BaseTypeahead", "package": "core", "mode": "N", "rubric_version": "1.16.2", "repository_head": "dc02cb01275f4b616a08533295db7c2a2b6fc814", "landed_commit": "18781904cb07904c51f273aaaed272ec62d669b1", "landed_bytes": {"pr_owned_files": 12, "match_reviewed_head": true}, "evidence_head": "d39ed3262601f1292890841cf7158e25bc89133c", "score": { "review_baseline": {"value": 72.4, "grade": "C"}, "corrected": {"value": 77.8, "grade": "C"} }, "inventory": { "closed": true, "evidence": "https://github.com/facebook/astryx/blob/d39ed3262601f1292890841cf7158e25bc89133c/pr-6179/BaseTypeahead/README.md" }, "unresolved": { "blocks": ["A1", "A4", "A11", "P-INV12"], "fixes": ["T7-reachability", "C22-state-machine-boundary"], "manual_gaps": [ "required accessible-name API/default", "released internal-prop compatibility", "bare-input focus-ring ownership", "reconciliation with PRs 5999 and 6000" ] }, "required_checks": { "head": "dc02cb01275f4b616a08533295db7c2a2b6fc814", "state": "passed" }, "eligibility": { "verdict": "landed_human_reviewed", "auto_merge": false, "reasons": [ "unattended merge remained ineligible because four BLOCKs remain", "AST-029 FR11 unattended audit activation is not shipped", "independent exact-head review and required checks passed before normal merge" ] }, "ledger_updated": true, "ledger_commit": "9b8be1bb1d8cd314c99a5f962456fafdb2d375dc" }This PR landed through normal human-reviewed merge; auto-merge was not used. The final ledger row records only the landed squash commit under rubric 1.16.2.