Repository navigation
test(Tokenizer): capture busy layout before the search settles - #11034
Merged
astracat-bot[bot] merged 1 commit intoNov 10, 2026
Conversation
astracat-bot
Bot
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
November 10, 2026 12:24
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
AI review status for this pull request.
|
Contributor
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Tokenizer · Storybook | 93.4 kB (0) · 18.8 kB CSS (0) | 2,340 (0) | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 36 rows, core 36 rows; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
github-actions
Bot
deleted the
codebunny/fix/test-tokenizer-capture-busy-layout-before-the-search-settles-786a44
branch
November 11, 2026 06:05
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.
validation: ran pnpm storybook:build (passed); pnpm test:a11y-contract --grep 'rtl.*a themed, larger Spinner' --repeat-each=20 --workers=4 TokenizerEndLane.a11y.chromium.spec.ts (20 passed); pnpm test:a11y-contract --fully-parallel --workers=4 TokenizerEndLane.a11y.chromium.spec.ts (22 passed). Prettier, scoped ESLint, specs:for and review:pre passed with no change findings.
Maintainer impact
The themed Tokenizer end-lane contract can fail with “The search settled before 208px was measured” even though its geometry is correct. Its busy-box measurement crosses several browser-driver calls and four animation frames, while the Loading story's search resolves after 1,200 ms. A delayed driver continuation can therefore read the settled field instead of the busy Spinner state the test triggered.
Intended invariant
No behavior change. Keep the exact settled-versus-busy width and height comparison, the 200–400 px and max-content sweep, both directions, and the 24 px Spinner override. The maintained contract is input-fields FR1/FR7: source-busy feedback must not change the field's geometry.
Change
Arm an in-page observer before the search keystroke. Capture the box when
aria-busybegins and on every animation frame while it remains true; retain any exact dimension mismatch until the search settles. A driver delay no longer loses that observation. The sampler cannot finish without seeing a busy transition, and its observer/frame callback are released after each measurement. Also wait for the baseline query to enter and leave busy state, rather than mistaking its debounce period for a settled search.Only the test changes. The search source, queries, product timers, component code, assertions, and timeouts are unchanged. The alternative of making the fixture search slower or retrying missed samples is deliberately avoided.
Evidence
Newest failed try: 2026-11-10 11:27 UTC, run 1794309614, job “a11y contracts 3/8 part 1/2”, commit 42e482c. Earlier failures reported the same race at 264, 248, and 368 px.
deflake_evidence: d. It was rescued 5 times in 7 days across 5 commits and 2 containers (causes async-retry 2, retry 2, other 1).
pnpm test:a11y-contract --grep 'a themed, larger Spinner' --repeat-each=20 --workers=4 TokenizerEndLane.a11y.chromium.spec.tspassed 40/40 at 42e482c, consistent with intermittency.aria-busyis true. The unchanged exact-size assertion fails, reporting all 27 width cases, including200px: settled 200x136, busy 200x200andmax-content: settled 629.22x32, busy 629.22x200. The injected style is not part of the patch.Scope
Components: Tokenizer browser test only.
No intended public API, product behavior, visual direction, or policy change. No product files, baselines, retry settings, or timeout budgets change.