Skip to content

test(cli): the swizzle proof renders Lab's Table Infinity hook with valid geometry - #13944

Merged
cixzhang merged 1 commit into
mainfrom
lane4/swizzle-proof-table-infinity-sample
Nov 28, 2026
Merged

cixzhang merged 1 commit into
mainfrom
lane4/swizzle-proof-table-infinity-sample

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

User impact

None for users. Main's swizzle proof fails since #13822 (thanks @humbertovirtudes for Table Infinity): slice 1 of packages/cli/test/swizzle-proof fails with SWIZZLE_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-110 FR7) ejects, type-checks, bundles and renders a copy of every swizzle target. A target with no sample in samples.mjs is rendered as an element with its doc's defaults, so the new public Lab hook useTableInfinityVirtualization runs 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 new lab__useTableInfinityVirtualization sample 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 its tableProps on core's Table with an idKey and an accessible name, as the hook's doc says. It follows the shape of the core__SnapPaging hook sample.

Smallest restoration

  • packages/cli/test/swizzle-proof/samples.mjs: one lab__useTableInfinityVirtualization entry. 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)

  • One defect is restored.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

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.mjs passes.

…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.
@cixzhang cixzhang added the lane:4 Astryx fix-loop lane 4 owns this label Nov 28, 2026
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 28, 2026 8:12am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 28, 2026
@astracat-bot

astracat-bot Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 28, 2026, 8:55 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2970c02

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2970c02

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 against main's failing Node leg at that merge and main'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 tableProps on Core's Table with an idKey and 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 main and passes with this change. Reported (author's run); the failure on main is confirmed above.
  • Claim: samples.test.mjs passes. 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.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 28, 2026 08:35
@cixzhang
cixzhang merged commit 2fb8581 into main Nov 28, 2026
147 checks passed
@github-actions
github-actions Bot deleted the lane4/swizzle-proof-table-infinity-sample branch November 29, 2026 06:08

This branch was successfully deployed

1 active deployment
Preview — 2970c02c Deployed Nov 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. lane:4 Astryx fix-loop lane 4 owns this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant