Repository navigation
test(Table): add Chromium accessibility and 1k/10k/100k release evidence for row windowing - #10659
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: the accessibility spec passes, but the release spec this pull request adds fails at this head, and the fixture setup needs two fixes before these specs can gate Table changes.
Blocking:
- The release spec fails the module record's PR5 budget for the supported plugins: the incremental p95 is 2.1 ms at 1k and 100k rows in your own run against a 2 ms budget, and supported range-plus-commit sits at 4.0 ms against 4 ms, so please bring the supported path under budget with margin in the implementation (the description points at the per-row checkbox mount and the per-cell truncation check) or have an engineering owner amend PR5, keep the budgets unchanged, and take the timing samples with no other browser sharing the CPU (CI runs this lane with four workers).
- Both specs build the fixture in
beforeAllwithemptyOutDir: trueinto the sametest-results/table-row-fixturefolder, so with four workers one build empties the folder while the other is writing it (a parallel run fails in the release spec'sbeforeAllwith the StyleX layer-split error); build into a folder unique to each worker and serve that one. frames()inTableVirtualization.release.harness.tscopies theframeshelper that@astryxdesign/interaction-harnessalready exports; import it instead.
Smaller: the mounted-row assertion allows 16 rows, but with no focused row the record's PR1 bound is 15 here.
[Automated review]
a9cf951 to
a511885
Compare
015a303 to
3c5d4fc
Compare
There was a problem hiding this comment.
Changes requested: the accessibility spec passes, and the build-folder and frames() fixes from the last review are in, but the release spec this pull request adds still fails at this head.
Blocking:
- The release spec fails the module record's PR5 supported-path budgets: the incremental p95 is 2.1 ms at 1k and 100k rows in your own run against 2 ms, and each of three reruns of this head failed at least one supported item (100k range-plus-commit 4.1 ms and incremental 2.1 ms, 100k incremental 2.1 ms, 10k range-plus-commit 4.4 ms against 4 ms), so please bring the supported path under budget with margin in the implementation (the description points at the per-row checkbox mount and the per-cell truncation check) or have an engineering owner amend PR5, keep the budgets unchanged, and take the timing samples with no other browser sharing the CPU (CI runs this lane with four workers).
Smaller: TableVirtualization.a11y.chromium.spec.ts:93 still allows 16 rows when nothing is focused (PR1 allows 15 there), and because a changeset gates only the release note, landing the stack together keeps the hook from shipping in a core release without one.
[Automated review]
a511885 to
f700397
Compare
3c5d4fc to
3e8ae84
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once the pull requests below merge and this one targets main.
The release spec now meets the module record's PR5 budgets with margin (supported range-plus-commit p95 2.2–2.5 ms against 4 ms, supported-plugin overhead 0.7–1.1 ms against 2 ms, in a one-worker and a four-worker rerun), the accessibility spec passes, and the earlier PR5 failure and 16-row bound are fixed.
Optional follow-ups:
TableVirtualization.release.vite.mjs:23-24still names the sharedtest-results/table-row-fixturefolder that the harness always overrides; dropping it keeps a direct build from bringing the shared folder back.- The release check uploads no
table-row-release.json, so a passing release run keeps none of the PR7 receipt. - A changeset gates only the release note, so landing the stack together keeps
useTableRowsVirtualizationfrom shipping in a core release without one. - For the Text change (now in #10668):
useTruncation.test.tsx:87no longer reaches theunobserveRef.current === unobserveguard, because a newly observed element queues no microtask, so running it on an element another subscriber already observes would cover it; the comment atuseTruncation.ts:126-134has a 27-word passive sentence that could be split.
[Automated review]
b6090d0 to
907dee3
Compare
3e8ae84 to
6a7b1ad
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once the pull requests below merge and this one targets main.
Both new specs pass here: the release spec meets the module record's PR5 and PR6 budgets with margin (supported range-plus-commit p95 2.3–2.4 ms against 4 ms, supported-plugin overhead 0.9–1.0 ms against 2 ms, in a one-worker and a four-worker run), and the accessibility spec passes at all three densities. The earlier budget failure, build-folder race and duplicated frames() helper are fixed.
Optional follow-ups:
TableVirtualization.release.vite.mjs:23-24still names the sharedtest-results/table-row-fixturefolder that the harness always overrides; dropping it keeps a direct build from bringing the shared folder back.- The release check's contract shards upload no
test-results/, so a passing release check keeps none of thetable-row-release.jsonreceipt. - Miss: the receipt's
buildfield is a description with no package versions or commit, while PR7 asks for build versions. - Miss: the release spec has no entry in
.github/a11y-contract-durations.json, so the pull-request contract job plans its roughly 80-second run at the 17-second median and can start it too late to finish. - A changeset gates only the release note, so landing the stack together keeps
useTableRowsVirtualizationfrom shipping in a core release without one.
[Automated review]
907dee3 to
8a30faf
Compare
6a7b1ad to
dc1c59a
Compare
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TableBody | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
5 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TableRow | 7.0 kB (0) · 4.0 kB CSS (0) | — | ✓ · ✓ · ✗ |
| Table | 126.0 kB (0) · 18.4 kB CSS (0) | — | ✓ · ✓ · — |
| TableCell | 110.5 kB (0) · 17.9 kB CSS (0) | — | ✓ · ✓ · ✓ |
| TableHeaderCell | 110.0 kB (0) · 17.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| TableSelectionToolbar | 70.9 kB (0) · 13.2 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 29 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
There was a problem hiding this comment.
Approval waits on an engineering owner's decision, and two fixes are needed either way. Both new specs pass at this head, including in its CI run.
Owner decision
- Miss:
TableVirtualization.release.a11y.chromium.spec.tsis routed@pr-a11y release-only, so its millisecond budgets gate every pull request that touches Table and the release check, whilespec:AST-030FR18 and DEC-10 keep runtime timing out of merge and release gates andmodule:Table/useTableRowsVirtualizationDEC-5 says the PR5/PR6 targets gate completion; an engineering owner either keeps the gate by commenting/approve-spec dc1c59acb6e04fa1a99b0190d3239ec07f413b9c(the author may do so as an engineering owner) or asks for the millisecond assertions to become a recorded, non-gating receipt while the count, structure and leak assertions keep gating.
Required fixes
- The commit message says "The changeset ships with this evidence, so the hook is released only after it passes", but the changeset and
useTableRowsVirtualizationalready reachedmainwith #8280, so reword it before merge. - Miss: PR7 asks the receipt to record build versions, but
environment.build(TableVirtualization.release.a11y.chromium.spec.ts:273-274) is only a description, so add the head commit and the resolved React, Vite and StyleX versions.
Non-blocking notes, including a console fallback check that the production fixture can never trigger, are inline and in the review.
[Automated review]
| }; | ||
| }); | ||
| expect(Math.abs(pinned.offset - pinned.widths)).toBeLessThanOrEqual(1); | ||
| expect(fallbacks).toEqual([]); |
There was a problem hiding this comment.
Non-blocking: the fixture is a Vite production build, and createDevWarnings returns early in production (packages/core/src/utils/devWarning.ts:62), so neither diagnostic reaches the console and this assertion cannot fail. The row bound at :145 already proves there is no fallback; drop the listener or assert a DOM signal.
dc1c59a to
672c92c
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision. Both new specs pass at this head.
Owner decision
- Miss:
TableVirtualization.release.a11y.chromium.spec.tsis routed@pr-a11y release-only, so its millisecond budgets (range-plus-commit, no-op, frame work, cold mount and supported-plugin overhead) gate every pull request that touches Table and the release check, whilespec:AST-030FR18 and DEC-10 keep runtime timing out of merge and release gates andmodule:Table/useTableRowsVirtualizationDEC-5 says the PR5/PR6 targets gate completion; an engineering owner either keeps the gate by commenting/approve-spec 672c92c1e1d65512888ca9a36feaf57989c31b47(the author may do so as an engineering owner) or asks for the millisecond assertions to become a recorded, non-gating receipt while the count, structure and leak assertions keep gating.
Fixed since the last review: the commit message no longer claims a changeset ships with this evidence, and the receipt records the commit and the resolved React, React DOM, Vite and StyleX versions.
Non-blocking: the density test's console fallback check cannot fail in the production fixture, readHeadCommit lets Git's error through outside a checkout, and TableVirtualization.release.vite.mjs:23-24 keeps unused output defaults.
[Automated review]
| /** The checked-out commit, or `unknown` outside a Git checkout. */ | ||
| function readHeadCommit(): string { | ||
| try { | ||
| return execFileSync('git', ['rev-parse', 'HEAD'], { |
There was a problem hiding this comment.
Non-blocking: outside a Git checkout, Git's fatal: not a git repository goes straight into the test output before this returns unknown. Pass stdio: ['ignore', 'pipe', 'ignore'] so only the receipt reports it.
|
/approve-spec 672c92c |
There was a problem hiding this comment.
Approved. Both new specs pass at this head in CI, and the release receipt meets every budget in the module record: range-plus-commit p95 at most 2.0 ms of 4, supported-plugin overhead at most 0.9 ms of 2, 100k cold mount 45 ms of 250, and at most 15 mounted rows.
An engineering owner kept the @pr-a11y release-only millisecond budgets as a pull-request and release gate with /approve-spec at this head, which settles the open question.
Optional follow-ups:
- The density test's console check (
TableVirtualization.a11y.chromium.spec.ts:164) cannot fail in the production fixture; the row bound at:145already proves there is no fallback. readHeadCommitlets Git's error through outside a checkout, andTableVirtualization.release.vite.mjs:23-24still names a shared output folder the harness always overrides.
[Automated review]
…nce for row windowing A real-Chromium accessibility spec covers native semantics, logical positions, keyboard focus, anchoring and the windowed row-number width at each density. The release spec measures range-plus-commit, no-op commits, frame cadence, bounded work, heap and 20-cycle lifetime at 1k, 10k and 100k rows, and its receipt records the head commit and the resolved React, Vite and StyleX versions. This diff was generated with AI assistance (Navi). Tags: ai-generated
672c92c to
e06b56a
Compare
There was a problem hiding this comment.
Approved. CI is green at this head, both new specs included, and the release receipt meets every budget in the module record: range-plus-commit p95 at most 2.4 ms of 4, supported-plugin overhead at most 1.2 ms of 2, frame work p95 at most 13.2 ms of 16.7, 100k cold mount 48 ms of 250, and at most 15 mounted rows. The fixture now gives the Table a 320px parent as main requires, and the release-only gate is unchanged since an engineering owner kept it.
Optional follow-ups:
- The density test's console check (
TableVirtualization.a11y.chromium.spec.ts:164) cannot fail in the production fixture; the row bound at:145already proves there is no fallback. readHeadCommitlets Git's error through outside a checkout, andTableVirtualization.release.vite.mjs:23-24still names a shared output folder the harness always overrides.
[Automated review]
Stack
Row virtualization is split into eight stacked PRs, each under the 2,000-line limit. Each PR's base is the one above it, so review and merge from the top of this list down.
Two record amendments the stack relies on: #10665 (Table adopts the shared list-windowing module first) and #10666 (a windowed row-number column fits its last position).
Primary intent
Add the release evidence that the row-virtualization module record requires. It ships nothing to consumers, so it needs no Changeset; the feature Changeset is in #8280.
User or maintainer impact
module:Table/useTableRowsVirtualizationFR13 and DEC-5 make the PR5/PR6 timing and memory targets gate completion, and its AR rules name a Chromium accessibility spec. Reviewers can now check those targets in CI instead of trusting a description.Problem and solution fit
TableVirtualization.a11y.chromium.spec.ts: real Chromium, production Vite and StyleX build of a public Table fixture. It checks native table roles, logicalaria-rowcount/aria-rowindex,aria-hiddenspacer rows with no role or tab stops, PageDown, Tab and Shift+Tab, a focused checkbox that keeps its node when scrolled 500 rows away, focus return after removing the focused row, and scroll anchoring on leading deletion and append. At compact, balanced and spacious density it scrolls a 2,000-row supported table to row 1,501 and checks that the number fits its cell, the pinned ID column starts where the columns before it end, at most 15 rows are mounted and no fallback is reported.TableVirtualization.release.a11y.chromium.spec.ts: 1k, 10k and 100k rows, core (3 columns) and supported (selection, row index withoutdata, sticky columns; 5 columns). It measures range-plus-commit from the viewportscrollevent to the end of the React commit it causes, no-op commits, frame cadence, bounded cell work, heap, and 20 controlled-GC remount cycles, and it scrolls past row 1,000 to check that four-digit row numbers stay windowed. Budgets are the module record's, unchanged; the mounted-row bound is 15 (a 320px viewport at 56px rows plus four overscan rows per side).frameshelper from@astryxdesign/interaction-harness.Authority
module:Table/useTableRowsVirtualizationFR13, PR5 to PR7, DEC-5 and the AR evidence rules.Change and evidence
Real Chromium accessibility spec: 9/9 pass (Chromium 149, production Vite and StyleX build).
1k/10k/100k release measurements (100 samples per corpus, 20 controlled-GC remount cycles, 1280x800 page, 320px viewport, 56px rows; one Linux machine, four Playwright workers; this exact head):
Met in every corpus, with the module record's budgets unchanged: range plus commit within 4 ms (worst 2.5 ms); the supported plugins' extra cost within 2 ms (1.3, 1.1 and 0.9 ms); no-op commit within 2 ms; cold 100k mount within 250 ms; at most 15 mounted rows, including after scrolling past row 1,000; one identity pass and no key revalidation on scroll; no cell work on a no-op re-render; no missed or blank frames; heap within the 32 MiB and 1k-plus-8 MiB budgets; retained growth and plateau within 1 MiB; no orphan viewport nodes, animation frames or event listeners.
Margin: the previous head put the supported path at its budget (range plus commit up to 4.4 ms, extra cost up to 2.2 ms across runs). Most of that was Text's first truncation measurement forcing a layout pass on every scroll step; #10668 moves it to the shared resize observer's first notification. Across the A/B runs, range plus commit p95 fell from 3.5–3.9 to 2.1–2.3 ms for the supported table.
Range + commit runs from the viewport
scrollevent to the end of the React commit it causes, including layout effects. The receipt also records the whole-stepTaskDurationbound, which includes browser style, layout and paint. Before the final heap sample, the harness dispatches one click on the empty root, because React DOM keeps the target of the last event it dispatched until the next one; the receipt says so.Scope
Testing
--max-warnings=0) on every changed file, andpnpm typecheckinpackages/corepass on this exact head.vitest run --project ui packages/coreon this head: 20,720 tests pass. The Table, hooks, utils and Chat suites pass on this PR's own head. Four locale time-format tests (DateTimeInput,TimeInput,timeFormat) fail on the local machine's ICU data and pass in CI; they do not touch Table.node scripts/pre-review.mjs --base <the branch below>: 1,020 authored lines.playwright test --config=playwright.config.ts --project=chromium --workers=4 TableVirtualization: 10/10 pass; results above.main, that is, after the PRs below it merge.This PR was generated with AI assistance (Navi).