Repository navigation
test(cli): the swizzle proof renders Lab's Table Infinity hook with valid geometry - #13944
Conversation
…alid geometry Main-red fix: a lab__useTableInfinityVirtualization swizzle sample that calls the hook with a positive row and column count and whole-pixel geometry and spreads its tableProps on Table, so slice 1 of the swizzle proof passes again. The hook came in #13822.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 2970c02 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI. One check, docsite-browser, was still running on this head at review time; every other check that ran has passed.
The new lab__useTableInfinityVirtualization sample gives the swizzle proof options that pass every range check in the hook, and main's full proof at the base fails only this target, so the error that has failed main since #13822 is the one this entry removes. No changes are needed.
Claims and files checked
Review mode: same-head; reason: none
- Live title: the swizzle proof renders Lab's Table Infinity hook with valid geometry. Verified: the proof hands this target to the new sample, and the sample's options pass all three of the hook's range checks; the render at this head is the author's reported run, and
main's full proof at the base fails only this target. - Claim:
main's proof has failed slice 1 with the quoted message since #13822. Verified againstmain's failing Node leg at that merge andmain's full release proof at the same commit. - Claim: this change makes
main's Node leg pass again. Reported (author's run);main's full proof at the base fails only this target, and this head changes nothing else. - Claim: the proof ejects, type-checks, bundles and renders every swizzle target. Verified against the swizzle spec and the proof's steps.
- Claim: a target with no sample renders with its doc's defaults, so the hook runs with no options and throws by design. Verified in the proof's render entry and the hook's validation.
- Claim: the hook needs positive counts and whole-pixel row, column, header and viewport sizes. Verified.
- Claim: the sample's sizes are the geometry of the hook's own test. Verified for the pixel sizes; the test uses larger counts, which the claim does not call geometry, and both mount the same 19 × 13 window.
- Claim: the sample spreads
tablePropson Core'sTablewith anidKeyand an accessible name, as the hook's doc says. Verified. - Claim: it follows the shape of the SnapPaging sample. Verified.
- Claim: one entry and no product code. Verified: one file, 31 added lines.
- Claim: the nine listed overlapping pull requests each edit other entries in the samples file and none names this hook. Verified by reading each one's files; that the draft moving Lab samples into Lab would carry this entry is reported.
- Claim: one defect restored; no hidden API, visual, default or interaction change; no internal context in public text. Verified.
- Claim: the thanks names the author of the Table Infinity change. Verified.
- Claim: with the hook marked changed, slice 1 fails on
mainand passes with this change. Reported (author's run); the failure onmainis confirmed above. - Claim:
samples.test.mjspasses. Verified: it passed (5 tests) in this head's Node tests. - File:
packages/cli/test/swizzle-proof/samples.mjs. Clear. - Rules changed since the last review: none.
User impact
None for users. Main's swizzle proof fails since #13822 (thanks @humbertovirtudes for Table Infinity): slice 1 of
packages/cli/test/swizzle-prooffails withSWIZZLE_PROOF_FAIL lab__useTableInfinityVirtualization [render] Table Infinity requires a positive count and fixed, whole-pixel geometry.This change makes main's test-node leg pass again.Problem and solution fit
The swizzle proof (
spec:AST-110FR7) ejects, type-checks, bundles and renders a copy of every swizzle target. A target with no sample insamples.mjsis rendered as an element with its doc's defaults, so the new public Lab hookuseTableInfinityVirtualizationruns with no options, and it throws by design: it requires a positive row and column count and whole-pixel row height, column width, header height and viewport size. The newlab__useTableInfinityVirtualizationsample renders a small component that calls the copy's hook with valid options (1000 rows and 100 columns, a 32 px row, a 112 px column, a 36 px header, and a 448 × 320 px viewport, the geometry of the hook's own test) and spreads itstablePropson core'sTablewith anidKeyand an accessible name, as the hook's doc says. It follows the shape of thecore__SnapPaginghook sample.Smallest restoration
packages/cli/test/swizzle-proof/samples.mjs: onelab__useTableInfinityVirtualizationentry. No product code changes.Scope
Components: none (test data only).
Overlap checked: #13769, #13762, #13735, #13734, #13733, #13700, #13019, #12891, #11082 (each renames, rewrites, moves or adds other components' entries in samples.mjs and none names this hook; draft #13019 moves the Lab samples into Lab and would carry this entry with them)
Testing
SWIZZLE_PROOF_CHANGED=packages/lab/src/TableInfinity/useTableInfinityVirtualization.tsx pnpm exec vitest run --project node packages/cli/test/swizzle-proof/swizzle-proof.{1..8}.test.mjs: on main, slice 1 fails with the message above (1 affected target, the other slices have none); with this change slice 1 passes.samples.test.mjspasses.