Skip to content

feat(Table): useTableColumnsVirtualization windows the unpinned columns - #11014

Merged
humbertovirtudes merged 1 commit into
mainfrom
feat/table-columns-virtualization
Nov 12, 2026
Merged

humbertovirtudes merged 1 commit into
mainfrom
feat/table-columns-virtualization

Conversation

@humbertovirtudes

@humbertovirtudes humbertovirtudes commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

User need

Builders with wide Tables (hundreds of columns, such as metric or spreadsheet-style views) pay for every cell in every row even though only a handful of columns are on screen. Row windowing bounds the block axis but not the inline one, so a 300-column, 200-row table still mounts 60,000 cells. Paging columns or hiding them changes what the user can reach and breaks header association, so composition does not solve it.

Problem and solution fit

This is the first implementation slice of module:Table/useTableColumnsVirtualization:

  • useTableColumnsVirtualization({initialViewportWidth}) returns the same opaque TableVirtualizationCapability type as the rows hook, read through its own registered key, so each reader accepts only its own axis.
  • Table.virtualization takes one capability or a list with at most one rows and one columns capability (FR12). Any other list renders without windowing and warns once in development.
  • Table windows only the unpinned run between the pinned start and end runs (FR2). Pitch is the width each column renders at the table's minimum width, from resolveColumnFloorWidths, the same widths pinned offsets use (FR3). Two overscan columns per side. When the scroll area is at least the table's minimum width, every column mounts.
  • The header row and every body row render the same structure: pinned start cells, an inaccessible native spacer <td> for each unmounted run, the mounted cells and the pinned end cells (FR4). Spacers have the summed pitch, no content, padding, border or focus stop.
  • While columns window, the table carries aria-colcount and each mounted header and body cell carries its full-table aria-colindex (FR5). Without windowing, neither attribute is added.
  • Server and first client render the same seed: the run columns that start inside initialViewportWidth less the widths of both pinned runs, plus overscan (FR6).
  • Inline geometry comes from the existing Table runtime measurement on the shared scroll subscription; column windowing adds no subscription, observer or frame of its own (FR9): clientWidth and a logical scrollLeft (absolute value, so right-to-left tables read the distance from the inline start). The runtime reads scrollLeft only while a column subscriber exists, so row-only tables do no extra work on inline scroll.
  • Admission (FR11): data mode, explicit valid identity, the Table-owned scroll wrapper, flat rows and single-line content under the rows module's FR14 rules (no explicit wrap, no unadmitted custom renderer). A cell that spans columns, found on mounted cells after commit, latches the same fallback. A Table whose own min-width exceeds the sum of the column widths renders every column (FR3). Each case warns once in development.

Import boundary (architecture:component-import-boundaries INV7). Table reaches the column window only through the value the caller passes. No allowlist row is added.

  • The capability carries the implementation under its shared key: {initialViewportWidth, windowing}, where windowing.Window is a component (plugins/virtualization/TableColumnWindow.tsx). The hook module imports it statically, and nothing has a module-level side effect, so it tree-shakes with the hook.
  • Table's base wiring is one small module, Table/tableColumnWindowing.ts. Table passes the column window its shared admission result and whether the resolved columns are single-line. Admission is keyed by column object, so the window does not judge the sized copies. It holds the shared key, the list validation (FR12) and the layout types; BaseTable also has a few import type lines.
  • BaseTable builds everything that reads the column layout inside a render function, which has no hooks. With a columns capability, it renders <Window capability input render>. The component calls the column planner's hooks behind its own boundary, then render(layout), as in the draft Window pattern in refactor(Table): a Table that never windows carries no windowing code (prototype) #10827. No hook is called from a value.
  • Only the hook's import reaches these parts: the column planner (useTableColumnWindow), useInlineListWindow, the spacer cells, the column admission checks and pitches, and the pinned-run lookup.
  • Remount on toggle. Adding or removing the columns capability changes the component at that place, so the table remounts, and focus and scroll position reset. This matches component:Table: adding or removing an identity-dependent capability mode is a remount boundary, and a geometry change inside the mode is not. Changing only initialViewportWidth keeps the same component and does not remount, and neither does an admission fallback inside the window. The hook docs and the changeset say so. Unit tests cover adding and removing the capability and a seed change. An admission fallback keeps the same component by construction, because the fallback renders inside the column window; no test covers that case yet.

pnpm check:component-import-boundaries --base-ref origin/main passes with no allowlist change.

Eager gzip per entry, Table line Before (main) After
Previous head 73e1552 (measured on its own base) 126.8 KB 128.6 KB, and the check failed on Table/BaseTable → useTableColumnWindow
This head (CI, against the current main) 127.5 KB 128.0 KB (about +0.5 KB)
Previous head 943de98, on main 06b7e61 127.0 KB 127.5 KB (+0.4 KB; 130,099 → 130,544 bytes)

The +445 bytes measured on the previous head are what a Table without the hook still carries; CI measures about the same on this head:

  • list validation and its message: about 95 bytes;
  • the window element and its input: about 90 bytes;
  • the inline fields and subscribeInline in the one shared geometry source, which FR9 needs on the existing subscription: about 75 bytes;
  • the aria-colindex/aria-colcount and spacer-mapping branches: about 35 bytes;
  • the admission conditions that both axes share, the truncate default and glue: the rest.

Getting under 0.3 KB means moving list validation behind the capability, or giving the geometry source a generic extension point. Both restructure the rows path, so this PR stops here.

Pinned runs. No existing seam told Table which columns the sticky plugin pins: the plugin keeps its keys in a private ref and writes offsets only in cell transforms. This PR adds the smallest internal mechanism, Table/tablePinnedColumnRuns.ts, with registerPinnedColumnRuns(plugin, resolve) and resolvePinnedColumnRuns(plugins, columns). It is a sharedWeakMap('table/pinned-column-runs', 1) keyed by plugin object, so a copied plugin and the package Table agree. Only useTableStickyColumns and the column window import it; Table itself never does. The sticky plugin registers a resolver that counts its runs with the same precedence as its offsets: a key in both runs pins to the start. Nothing public changes, and Table never reads the plugin's config.

Empty first render. A Table that first renders with data={[]} now windows its columns once rows arrive. The empty-state <td colSpan> had tripped the spanning-cell check and latched the fallback. The check now runs only while the body has data rows. The test (empty, then data, then columns window) failed before the fix and passes after.

CLI example (architecture:knowledge-contracts INV28). packages/cli/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.{tsx,doc.mjs} has exampleFor: 'useTableColumnsVirtualization': 121 columns, a pinned first column and the seed. It is mirrored in the sandbox export routes and the ShadCN route lock, which the docsite generator verifies, and has its own @astryxdesign/cli changeset.

Shared windowing module. Column windowing runs through the private list-windowing module (architecture:list-windowing INV1), not a Table-only engine:

  • packages/core/src/virtualization/useInlineListWindow.ts is the module's inline-axis hook, beside useListWindow. It reads the shared inline geometry, subtracts the viewport space covered at each edge, and plans the item range and its segments.
  • packages/core/src/virtualization/listWindow.ts gains calculateVariableListRange, a binary search over prefix offsets for items of varying size, with unit tests beside the fixed-pitch ones. Segments reuse createListWindowSegments.
  • Table/plugins/virtualization/useTableColumnWindow.ts is Table's adapter, behind the hook. It maps the windowed run between the pinned runs to full-table column positions and spacer widths, and owns the spanning-cell admission. TableColumnWindow.tsx adds the column admission, pitches and spacer rendering.
  • useListWindow itself does not serve columns: it is a fixed-pitch, block-axis hook (rowHeight, scrollTop/viewportHeight/startOffset, scrollTop writes). Columns need per-item widths, the inline axis with logical offsets in right-to-left tables, and inset pinned runs. Generalising it would change the rows hook's inputs and outputs, a larger change to the shared engine; the inline hook sits beside it in the same module and shares its pure range and segment math.

Later slices

Not in this PR, and stated in the hook's docs and dev warning:

  • FR7, the retained focused column.
  • FR8, the first-visible-column anchor across column order, width, visibility and pinning changes.
  • FR10, rows and columns windowing together. In this slice, a list with both capabilities keeps row windowing and renders every column, with a development warning that names the later release.
  • PR3/PR4 frame-timing evidence at 1,000 columns.

Rebase onto main

Rebased onto main 95449a2, with a conflict resolution against Promise-based infinite loading (see "Rebase onto main (973a981)" below). The spec is merged, so the base is now main. packages/core/api-report.md is gone from main, so this PR no longer touches it. The inline range lives in the shared module as useInlineListWindow, calculateVariableListRange sits in listWindow.ts, and the runtime snapshot uses main's startOffset.

Current specification

  • docs/specs/components/Table/plugins/virtualization/useTableColumnsVirtualization.spec.md (FR1–FR6, FR9, FR11, FR12; DEC-1 to DEC-3), current on main (spec(Table): column virtualization windows the unpinned columns #11013).
  • component:Table FR18 (Table.virtualization takes one capability or a list with at most one per axis), FR13 (column floors) and FR19 (shared viewport).

Public delta and caller burden

  • New export from @astryxdesign/core and the Table subpath: useTableColumnsVirtualization, UseTableColumnsVirtualizationConfig.
  • Table.virtualization / BaseTable.virtualization widen from TableVirtualizationCapability to TableVirtualizationCapability | ReadonlyArray<TableVirtualizationCapability>. Every existing call stays valid.
  • No theme target, no new data-* attribute. Spacers are plain aria-hidden cells.
  • Caller burden: one seed width and an explicit idKey; content stays single-line (default textOverflow becomes truncate when the capability is present, as with rows).
const virtualization = useTableColumnsVirtualization({initialViewportWidth: 960});
const sticky = useTableStickyColumns({startKeys: ['name']});
<Table data={rows} columns={columns} idKey="id" plugins={{sticky}} virtualization={virtualization} />;

Specification coverage

Six points raised during implementation are now settled in the current record on the base branch, and this PR follows each:

  1. Explicit valid identity is an admission requirement (FR11, matching parent FR18).
  2. A Table minimum width wider than the sum of the column widths renders every column and warns (FR3).
  3. The seed subtracts both pinned runs from initialViewportWidth (FR6); a unit test proves the server seed equals the first client range with an end-pinned run.
  4. A spanning cell is found after mount and latches the fallback (FR11).
  5. Column windowing adds no subscription, observer or frame of its own; it reads the shared measurement (FR9).
  6. Vertical writing modes are a non-goal.

No known gap remains between this slice and the record, apart from the later slices listed above.

Design and alternatives

The spec rejects a uniform columnWidth and measuring offscreen columns (DEC-3), windowing pinned columns (DEC-2), and a second Table prop or a combined hook (DEC-1). While windowed, mounted header cells take their pitch in pixels rather than their percentage share: at the table's minimum width the two are equal, and a pixel width cannot resolve against the spacers.

Evidence

  • Unit (jsdom, actual Table): seed range on the server and first client; only mounted cells are constructed; identical spacer structure in the header and every body row; aria-colcount/aria-colindex only while windowed; pinned start and end runs always mounted with unchanged offsets; middle-of-run window from measured width and scroll position, also in right-to-left; a viewport or seed at least the table minimum width mounts every column; no change without the capability; admission fallbacks and warnings for seed, wrap, custom renderer, non-flat rows, duplicate identity, spanning cell, wide min-width and rows+columns; list validation.
  • Real browser (Chromium, built Storybook, Core/Table virtualization/Column windowing: 300 columns × 200 rows, pinned 160px first column, 900px viewport, 120px columns): see Testing.
  • Unchanged legacy paths: the full Table and utils Vitest suites pass, including the rows virtualization, fallback and sticky-column suites; the existing windowed Card Chromium spec passes.

Scope

Components: Table, useTableColumnsVirtualization, useTableStickyColumns

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

These local runs used the previous tree (943de98 on main 06b7e61). This head rebased onto main 95449a2 with a conflict resolution in BaseTable.tsx; local installs were unavailable (registry errors), so CI at this head is the authority: every check passes, including lint (import boundaries), typecheck, tests, the docsite build, Storybook and the Chromium specs.

Command Result
New boundary tests before the fix (empty, then data; remount on toggle) 2 fail
vitest run --project ui packages/core/src/Table packages/core/src/virtualization packages/core/src/utils 112 files, 2075 tests pass
(cd packages/core && pnpm typecheck) pass
prettier --check and eslint --max-warnings=0 on every changed file pass
vitest run scripts/shared-identity.test.mjs 7/7 pass
node scripts/check-knowledge.mjs pass
node scripts/sync-exports.js --check up to date
pnpm check:component-import-boundaries --base-ref origin/main holds, no allowlist change; Table 127.0 → 127.5 KB (CI against the current main: about +0.5 KB)
node scripts/release/changeset-coverage.mjs pr --base origin/main --head HEAD pass (@astryxdesign/core and @astryxdesign/cli named)
pnpm build pass
Docsite: node apps/docsite/scripts/generate-data.mjs (route lock and registries) pass
Docsite: build-previews + next build fails during prerender with Next.js "Expected workStore to be initialized" on unrelated pages. The same failure happens on the previous head on this offline test machine, so the Vercel preview is the authority here.
pnpm storybook:build, then Playwright --project=chromium TableColumnWindowing TableWindowedTextSize TableVirtualization.a11y TableWindowedCard TableScroll TableMinWidth 16/16 pass

Review fixes (943de98)

  • The hook's docs now state the two parts of column windowing this slice does not have yet: focus in an unpinned column is lost when that column scrolls out of the window (module FR7), and column order, width, visibility or pinning changes do not keep the first visible column in place (FR8). feat(Table): column windowing retains the focused column and anchors the first visible column #11018 adds both.
  • The Core changeset no longer says Tables that do not opt in carry no column windowing code. Their Table import carries about 0.4 KB gzip of wiring (list validation, the column branches and the inline geometry), and the column planner loads only with the hook.

Rebase onto main (973a981)

main merged Promise-based infinite loading (#10570), which edits the same part of BaseTable.tsx. This slice keeps its render function for everything that reads the column layout, and that function now carries #10570's two changes: aria-rowcount is -1 while an admitted loading source reports more rows, and the default empty state stays hidden while the first rows load. #10570's loading source, admission and runtime-context field merged unchanged.

@vercel

vercel Bot commented Nov 10, 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 12, 2026 7:14pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@humbertovirtudes
humbertovirtudes force-pushed the spec/table-columns-virtualization branch from f4c490b to 74080eb Compare November 10, 2026 08:46
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 12, 2026, 7:41 PM UTC

@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.

Approval waits on an engineering owner's spec decision. Two fixes are needed either way.

  • Spec decision: column windowing, useTableColumnsVirtualization and the Table.virtualization list form are specified only in the open spec PR #11013 (module:Table/useTableColumnsVirtualization and the component:Table FR18 amendment), not on main, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or by landing #11013 first.
  • What the decision settles: whether this slice may ship before FR7 (focus retention), FR8 (inline anchor), FR10 (rows and columns together) and the PR3/PR4 timing evidence, and without a template example that names the new hook.
  • Fix: packages/core/src/Table/tableColumnAdmission.ts:80 keeps the pinned-run registry in a module-local WeakMap, so scripts/shared-identity.test.mjs fails and a swizzled Table using the package's useTableStickyColumns windows its pinned column away; keep it under sharedWeakMap('table/table-column-admission/pinned-run-resolvers', 1) from utils/sharedRealm.
  • Fix: the new useTableColumnsVirtualization.doc.mjs adds the ShadCN route hooks/use-table-columns-virtualization, which internal/shadcn-registry/routes.lock.json does not list, so the docsite build stops at the route-lock check (the failed Vercel deployment); commit the lock refreshed with UPDATE_SHADCN_ROUTE_LOCK=1 node apps/docsite/scripts/generate-data.mjs.

Tables without the capability render as before. In Chromium, the 300 × 200 story keeps the same visible cells while mounting 2,800 body cells instead of 60,000.

[Automated review]

canWindow ? geometry.getSnapshot : getUnmeasured,
canWindow ? geometry.getServerSnapshot : getUnmeasured,
);
// Prefix offsets of the windowed run, and the pinned run sizes.

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.

Non-blocking (INV29): this comment restates the memo below it. Drop it and name the memo for what it holds, for example runGeometry.

@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.

Approval waits on an engineering owner's spec decision, and three fixes are needed either way.

  • Spec decision: column windowing, useTableColumnsVirtualization and the Table.virtualization list form are specified only in the open spec PR #11013 (module:Table/useTableColumnsVirtualization and the component:Table FR18 amendment), not on main, so an engineering owner needs to record the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or by landing #11013 first.
  • What the decision settles: whether this slice may ship before FR7 (retained focused column), FR8 (inline anchor), FR10 (rows and columns together) and the PR3/PR4 timing evidence, and without a template block that names the new hook (INV28).
  • Miss: a Table that first renders with data={[]} never windows its columns once rows arrive, because getColumnViolation (useTableColumnWindow.ts:106-117) counts Table's own empty-state cell (<td colSpan={resolvedColumns.length}>, BaseTable.tsx:1127) as a spanning cell and latches the fallback for the unchanged widths and config, so ignore that row or skip the check while the body has no data rows.
  • Fix: tableColumnAdmission.ts:80 keeps the pinned-run registry in a module-local WeakMap, so scripts/shared-identity.test.mjs fails and a swizzled Table using the package's useTableStickyColumns windows its pinned column away; keep it under sharedWeakMap('table/table-column-admission/pinned-run-resolvers', 1) from utils/sharedRealm.
  • Fix: the new useTableColumnsVirtualization.doc.mjs adds the ShadCN route hooks/use-table-columns-virtualization, which internal/shadcn-registry/routes.lock.json does not list, so the docsite build stops at the route-lock check; commit the lock refreshed with UPDATE_SHADCN_ROUTE_LOCK=1 node apps/docsite/scripts/generate-data.mjs.

The comment at useTableColumnWindow.ts:150 still restates the memo below it (a non-blocking INV29 note).

Automated review (maintainer link)

@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.

Approval waits on an engineering owner's spec decision, and three fixes are needed either way.

  • Spec decision: column windowing, useTableColumnsVirtualization and the Table.virtualization list form are specified only in the open spec PR #11013 (module:Table/useTableColumnsVirtualization and the component:Table FR18 amendment), not on main, so an engineering owner needs to record the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or by landing #11013 first.
  • What the decision settles: whether this slice may ship before FR7 (retained focused column), FR8 (inline anchor), FR10 (rows and columns together) and the PR3/PR4 timing evidence, and without a template block that names the new hook (INV28).
  • Miss: a Table that first renders with data={[]} never windows its columns once rows arrive, because getColumnViolation (useTableColumnWindow.ts:106-117) counts Table's own empty-state cell (<td colSpan={resolvedColumns.length}>, BaseTable.tsx:1127) as a spanning cell and latches the fallback for the unchanged widths and config, so ignore that row or skip the check while the body has no data rows.
  • Fix: tableColumnAdmission.ts:80 keeps the pinned-run registry in a module-local WeakMap, so scripts/shared-identity.test.mjs fails and a swizzled Table using the package's useTableStickyColumns windows its pinned column away; keep it under sharedWeakMap('table/table-column-admission/pinned-run-resolvers', 1) from utils/sharedRealm.
  • Fix: the new useTableColumnsVirtualization.doc.mjs adds the ShadCN route hooks/use-table-columns-virtualization, which internal/shadcn-registry/routes.lock.json does not list, so the docsite build stops at the route-lock check; commit the lock refreshed with UPDATE_SHADCN_ROUTE_LOCK=1 node apps/docsite/scripts/generate-data.mjs.

The comment at useTableColumnWindow.ts:150 still restates the memo below it (a non-blocking INV29 note).

Automated review (maintainer link)

@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.

Approval waits on an engineering owner's spec decision, and two fixes are needed either way.

  • Spec decision: column windowing, useTableColumnsVirtualization and the Table.virtualization list form are specified only in the open spec PR #11013 (module:Table/useTableColumnsVirtualization and the component:Table FR18 amendment), not on main, so an engineering owner needs to record the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or by landing #11013 first.
  • What the decision settles: whether this slice may ship before the record's FR7 (retained focused column), FR8 (inline anchor), FR10 (rows and columns together) and PR3/PR4 timing evidence, and without a template block that names the new hook (architecture:knowledge-contracts INV28).
  • Miss: a Table that first renders with data={[]} never windows its columns once rows arrive, because its own empty-state row (<td colSpan>, BaseTable.tsx:1127) trips the spanning-cell check in useTableColumnWindow.ts:106-117 and latches the fallback; skip Table's empty-state row in that check, or skip the check while the body has no data rows.
  • The pinned-run registry at tableColumnAdmission.ts:80 is a module-local WeakMap, so scripts/shared-identity.test.mjs fails and a swizzled Table that uses the package's useTableStickyColumns windows its pinned columns away; keep it under sharedWeakMap('table/table-column-admission/pinned-run-resolvers', 1).

The ShadCN route-lock entry is now in place and the docs build passes. When this branch moves onto main, drop the packages/core/api-report.md hunk, since main no longer has that file.

Automated review (maintainer link)

@humbertovirtudes
humbertovirtudes marked this pull request as ready for review November 11, 2026 09:44
@humbertovirtudes
humbertovirtudes force-pushed the spec/table-columns-virtualization branch from 6217d0f to 039e904 Compare November 11, 2026 10:18
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-columns-virtualization branch from 5e442a7 to 7a07c34 Compare November 11, 2026 10:44
@humbertovirtudes
humbertovirtudes changed the base branch from spec/table-columns-virtualization to main November 11, 2026 10:44
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 11, 2026
@github-actions
github-actions Bot requested a review from cvkxx November 11, 2026 10:44

@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.

Approval waits on an engineering owner's decision, and two fixes are needed either way.

  • Owner decision: module:Table/useTableColumnsVirtualization is now current, but it marks FR7 (retained focused column), FR8 (first-visible-column anchor), FR10 (rows and columns together) and the PR3/PR4 timing evidence "Required for release", and architecture:knowledge-contracts INV28 asks for a template block that names the new hook, so an engineering owner decides whether this slice ships first by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or says the hook should wait.
  • Miss: BaseTable.tsx:34-38 statically imports useTableColumnWindow, a crossing that architecture:component-import-boundaries INV7 forbids, so the lint job's component-import-boundaries check fails and every Table import grows by 1.8 KB gzip; let useTableColumnsVirtualization register or carry the planner so BaseTable reads only the registration, or get the record owner to approve an allowlist row.
  • Miss: a Table that first renders with data={[]} never windows its columns once rows arrive, because Table's own empty-state cell (<td colSpan>, BaseTable.tsx:1127) trips the spanning-cell check in useTableColumnWindow.ts:106-117 and latches the fallback; skip that row in the check, or skip the check while the body has no data rows.

The pinned-run registry now uses a shared key, and the route-lock entry is in place. A non-blocking docs note is inline.

Automated review (maintainer link)

Comment thread packages/core/src/Table/BaseTable.tsx Resolved
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec f70735c

@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.

Column windowing follows the current Table and module records for what this slice builds, and CI's real-browser run at this head confirms bounded, aligned columns; two wording fixes are needed before approval.

  • packages/core/src/Table/useTableColumnsVirtualization.doc.mjs does not say that focus in an unpinned column is lost when that column scrolls out (module FR7) or that the first visible column is not kept across column changes (FR8), although the description says the hook's docs state the later slices.
  • .changeset/table-columns-virtualization.md says Tables that do not opt in "carry none of the column windowing code", but every Table import now carries the list validation, the column branches and the inline geometry (CI's import-boundaries check: Table 127.0 KB to 127.5 KB gzip).

An engineering owner's /approve-spec for this head settles releasing before FR7, FR8, FR10 and the PR3/PR4 timing evidence, with the wiring over the 0.3 KB allowance in architecture:component-import-boundaries INV7 that the description states. That approval is bound to this commit, so after the fixes an engineering owner records it again by commenting /approve-spec <full head SHA> on the new head; the author may do so as an engineering owner.

Claims and files checked
  • Verified: the hook returns an opaque capability under its own shared key, which the rows reader rejects (hook source, unit test).
  • Verified: the prop takes one capability or a list with at most one per axis; any other list renders without windowing and warns once (resolver, unit test).
  • Verified: only the unpinned run windows, with layout-floor pitches and two overscan columns per side; a wide enough scroll area mounts every column (column window source, unit tests, CI browser run).
  • Verified: header and body rows share one spacer structure, and spacers are empty, unpadded and not focusable (unit test; CI measured no drift).
  • Verified: the column count and positions appear only while columns window (unit test, CI browser run).
  • Verified: the server and first client use the same seed, less both pinned runs (unit test).
  • Verified: inline geometry rides the runtime's one subscription, and the inline offset is read only while a column subscriber exists (runtime source).
  • Verified: admission fallbacks, including a spanning cell found after mount and a wide minimum width, each warn (unit tests).
  • Verified: Table reaches the window only through the passed value, and the import-boundaries check holds with no allowlist change (CI lint).
  • Verified: adding or removing the capability remounts the Table, and a seed change does not (unit tests).
  • Verified: a Table without the hook carries about 0.4 KB more gzip (CI lint and size report), over the record's 0.3 KB allowance, which the owner approval accepts.
  • Verified: the pinned-run registry is shared across copies and gives the start run precedence (registry and sticky plugin source).
  • Verified: an empty first render windows its columns once rows arrive (unit test).
  • Verified: the CLI example block and its route entries build (CI docsite build).
  • Verified: the inline range lives in the shared windowing module with its own unit tests (source, tests).
  • False: the later slices are stated in the hook's docs; only the rows-and-columns limit is.
  • Core changeset: behavior statements verified; false: Tables that do not opt in carry none of the column windowing code.
  • Verified: the CLI changeset's 121-column example with a pinned first column (block source).
  • Finding: .changeset/table-columns-virtualization.md, packages/core/src/Table/useTableColumnsVirtualization.doc.mjs.
  • Non-blocking note: packages/core/src/Table/plugins/virtualization/useTableColumnWindow.ts (a comment that restates its memo).
  • Clear: packages/core/src/Table/BaseTable.tsx, Table.tsx, Table.doc.mjs, types.ts, index.ts, tableColumnWindowing.ts, tablePinnedColumnRuns.ts, tableRuntime.ts.
  • Clear: packages/core/src/Table/plugins/virtualization/TableColumnWindow.tsx, useTableColumnsVirtualization.ts, index.ts, useTableColumnsVirtualization.test.tsx; packages/core/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx; packages/core/src/Table/__tests__/TableColumnWindowing.a11y.chromium.spec.ts.
  • Clear: packages/core/src/virtualization/listWindow.ts, listWindow.test.ts, useInlineListWindow.ts.
  • Clear: .changeset/table-columns-virtualization-cli-example.md, packages/cli/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.tsx, ColumnsVirtualizationHookUsage.doc.mjs, apps/storybook/stories/TableVirtualization.stories.tsx, apps/sandbox/scripts/next-export-routes.json, internal/shadcn-registry/routes.lock.json.

Automated review (maintainer link)

@humbertovirtudes
humbertovirtudes force-pushed the feat/table-columns-virtualization branch from f70735c to 943de98 Compare November 12, 2026 16:11
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec 943de98

@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: column windowing follows the current Table and module records for what this slice builds, and both wording fixes from the last review are in.

An engineering owner's /approve-spec on this commit covers releasing before the module's focused-column, first-visible-column and rows-and-columns requirements and its timing evidence, with Table wiring over the 0.3 KB allowance in architecture:component-import-boundaries INV7. Three non-blocking suggestions are inline: the tableColumnWindowing.ts header still says a Table that never imports the hook carries none of the column windowing code, the hook doc's docsDense leaves out the release caveats, and no test shows that an admission fallback keeps the table mounted.

Claims and files checked
  • Verified: the hook returns an opaque capability under its own shared key, which the rows reader rejects (hook source, unit test).
  • Verified: the prop takes one capability or a list with at most one per axis; any other list renders without windowing and warns once (resolver, unit test).
  • Verified: only the unpinned run windows, with layout-floor pitches and two overscan columns per side; a wide enough scroll area mounts every column (column window source, unit tests, Chromium spec).
  • Verified: header and body rows share one spacer structure, and spacers are empty, unpadded, borderless and not focusable (unit test, Chromium spec).
  • Verified: the column count and positions appear only while columns window (unit tests, Chromium spec).
  • Verified: the server and first client use the same seed, less both pinned runs (unit tests).
  • Verified: inline geometry rides the runtime's one subscription, and the inline offset is read only while a column subscriber exists (runtime source).
  • Verified: each admission fallback warns, including a spanning cell found after mount and a wide minimum width (unit tests).
  • Verified: Table reaches the window only through the passed value, the import-boundaries check holds with no allowlist change, and Table grows from 127.0 KB to 127.5 KB gzip (CI lint at this head); the per-part byte breakdown is an estimate and was not checked.
  • Verified: the pinned-run registry is shared across copies and gives the start run precedence, as the sticky offsets do (registry and sticky plugin source).
  • Verified: an empty first render windows its columns once rows arrive (unit test, empty-state guard).
  • Verified: the example block, its route entries and the route lock (block source, CI docsite build).
  • Verified: the inline range lives in the shared windowing module with its own unit tests (source, tests).
  • Verified: adding or removing the capability remounts the table and a seed change does not (unit tests); an admission fallback keeps the table mounted by construction, with no test.
  • Verified: the hook doc's description states the later slices (focus loss, first visible column, rows and columns together); the dense doc does not.
  • Verified: the new exports and the widened prop keep every existing call valid (exports, types).
  • Verified, wording stale: the governing module record is current on the main branch; the description still places it on the stacked spec pull request, which has merged.
  • Not checked locally: the author's command results and test counts (CI at this head used instead).
  • Core changeset: every statement verified, including the focus and first-visible-column caveats and the 0.4 KB wiring (source, CI lint).
  • CLI changeset: verified, a 121-column example with a pinned first column (block source).
  • Note (non-blocking): packages/core/src/Table/tableColumnWindowing.ts (file header), packages/core/src/Table/useTableColumnsVirtualization.doc.mjs (dense doc), packages/core/src/Table/plugins/virtualization/useTableColumnWindow.ts (a comment that restates its memo), packages/core/src/Table/plugins/virtualization/useTableColumnsVirtualization.test.tsx (no fallback-remount test).
  • Clear: packages/core/src/Table/BaseTable.tsx, Table.tsx, Table.doc.mjs, types.ts, index.ts, tablePinnedColumnRuns.ts, tableRuntime.ts.
  • Clear: packages/core/src/Table/plugins/virtualization/TableColumnWindow.tsx, useTableColumnsVirtualization.ts, index.ts; packages/core/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx; packages/core/src/Table/__tests__/TableColumnWindowing.a11y.chromium.spec.ts.
  • Clear: packages/core/src/virtualization/listWindow.ts, listWindow.test.ts, useInlineListWindow.ts.
  • Clear: .changeset/table-columns-virtualization.md, .changeset/table-columns-virtualization-cli-example.md, packages/cli/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.tsx, ColumnsVirtualizationHookUsage.doc.mjs, apps/storybook/stories/TableVirtualization.stories.tsx, apps/sandbox/scripts/next-export-routes.json, internal/shadcn-registry/routes.lock.json.

Automated review (maintainer link)

Comment on lines +8 to +10
* @position Table's base wiring for column windowing. The column hook puts
* its implementation in the capability value, so a Table that never
* imports the hook carries none of the column windowing code.

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.

Non-blocking: this header still says a Table that never imports the hook "carries none of the column windowing code", the wording the changeset dropped. This module is the wiring every Table import carries (CI's import-boundaries check: Table 127.0 KB to 127.5 KB gzip). Suggested:

 * @position Table's base wiring for column windowing: the shared key, list
 *   validation and layout types. The column planner and window load only
 *   with the hook.

/** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
export const docsDense = {
description:
'Geometry-only column windowing opt-in for Table.virtualization. Keep full data, columns and a stable idKey on Table. Declared widths set the window; pinned columns always mount; a wide enough scroll area mounts every column. Unsupported content or structure renders every column. Native mounted-cell semantics, not discovery of unmounted columns. Adding or removing the capability remounts the table.',

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.

Non-blocking: docsDense leaves out the caveats the description now states, so the dense docs give a builder no warning about them. Suggested addition: "Not yet: rows and columns together (the rows window, every column renders); focus in an unpinned column is lost when it scrolls out; column changes do not keep the first visible column."

@humbertovirtudes
humbertovirtudes force-pushed the feat/table-columns-virtualization branch from 943de98 to 973a981 Compare November 12, 2026 16:51
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec 973a981

@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.

Approval waits on an engineering owner's decision for this head, and the description needs a refresh.

  • Owner decision: releasing useTableColumnsVirtualization before the module record's FR7 (retained focused column), FR8 (first-visible-column anchor), FR10 (rows and columns together) and PR3/PR4 timing evidence, with about 0.5 KB gzip of column wiring in every Table import (over the import-boundaries record's 0.3 KB allowance), was approved for the previous head only, so an engineering owner records it for this rebased head by commenting /approve-spec <full head SHA> (the author may, as an engineering owner), or says the hook stays unexported.
  • The description still describes the previous tree: it says the branch sits on an older main, that the Testing runs used this exact tree, and that Table grows from 127.0 KB to 127.5 KB, while this head carries a conflict resolution with useTableInfiniteScroll and CI measures 127.2 KB to 127.7 KB.
  • Miss: the description says unit tests cover all three remount cases, though none shows that an admission fallback keeps the table mounted, and it places the module record on a stacked spec PR although the record is current on main; the last review listed both only as non-blocking.

CI passes at this head, including the column-windowing Chromium spec (10 of 300 columns mounted at the start, 12 mid-scroll, no header and body drift). Non-blocking: the tableColumnWindowing.ts header still says Tables that do not opt in carry none of the column code, docsDense leaves out the release caveats, and the spanning-cell check does not re-run when only the data changes.

Claims and files checked
  • Claim: the hook returns an opaque capability under its own shared key that the rows reader rejects: verified (tableColumnWindowing.ts, unit test).
  • Claim: Table.virtualization takes one capability or a list with at most one per axis, and any other list renders unwindowed with one warning: verified (resolveTableVirtualization, unit test).
  • Claim: only the unpinned run windows, with floor-width pitches, two overscan columns per side, and every column mounts when the scroll area is at least the minimum width: verified (TableColumnWindow.tsx, useTableColumnWindow.ts, unit tests, Chromium spec).
  • Claim: header and body rows share one structure with empty, inaccessible spacers: verified (unit test, Chromium spec).
  • Claim: aria-colcount and full-table aria-colindex appear only while columns window: verified (unit tests).
  • Claim: server and first client use the same seed, less both pinned runs: verified (unit tests).
  • Claim: inline geometry uses the existing subscription, and scrollLeft is read only while a column subscriber exists: verified (tableRuntime.ts).
  • Claim: admission falls back with a warning for each unsupported case, including a spanning cell after mount and a wide minimum width: verified (unit tests).
  • Claim: Table reaches the column window only through the passed value, with no new allowlist row: verified (CI import-boundaries check).
  • Claim: adding or removing the capability remounts, a new seed does not, and tests cover all three cases: partly false (no test for the admission-fallback case).
  • Claim: the pinned-run registry uses a shared key, is imported only by the sticky plugin and the window, and pins a key in both runs to the start: verified (tablePinnedColumnRuns.ts, useTableStickyColumns.tsx).
  • Claim: an empty first render windows once rows arrive: verified (useTableColumnWindow.ts, unit test); its red-first run was not repeated.
  • Claim: the CLI example block names the hook and is mirrored in the route lists with its own changeset: verified (docsite build).
  • Claim: the rebase base, the Testing runs on this exact tree, and Table 127.0 KB to 127.5 KB: false at this head (rebased again, conflict resolution, CI 127.2 KB to 127.7 KB).
  • Claim: the module record is on a stacked spec PR: false (current on main).
  • Claim: the hook docs state the FR7, FR8 and FR10 limits, and the core changeset states the wiring cost: verified (useTableColumnsVirtualization.doc.mjs, changeset).
  • Changesets: the core entry (opt-in, behavior, list form, focus and anchor limits, fallbacks, remount, about 0.4 KB of wiring) and the CLI entry (121-column example block): verified.
  • Files: BaseTable.tsx, Table.tsx, types.ts, index.ts, tableRuntime.ts, tableColumnWindowing.ts, tablePinnedColumnRuns.ts, useTableStickyColumns.tsx, plugins/virtualization/index.ts, TableColumnWindow.tsx, useTableColumnsVirtualization.ts, listWindow.ts, useInlineListWindow.ts: clear.
  • Files: useTableColumnWindow.ts: non-blocking (comment restates a memo; spanning check misses data-only changes).
  • Files: useTableColumnsVirtualization.test.tsx, listWindow.test.ts, TableColumnWindowing.a11y.chromium.spec.ts, TableVirtualization.stories.tsx: clear (the description's remount-test claim is the finding).
  • Files: useTableColumnsVirtualization.doc.mjs: non-blocking (docsDense caveats); Table.doc.mjs, the CLI example block and its doc, both changesets, routes.lock.json, next-export-routes.json: clear.

Automated review (maintainer link)

// eslint-disable-next-line @eslint-react/set-state-in-effect -- records a violation read from mounted cells
setRejected({widths, seed: initialViewportWidth, reason});
}
}, [isWindowed, hasRows, segments, table, widths, initialViewportWidth]);

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.

Non-blocking (module FR11): this check runs again only when the range, widths, seed or row presence change. A custom plugin whose transformBodyCell sets colSpan for some rows can bring a spanning cell in with new data while the mounted range stays the same, and then the window never latches the fallback, so that row's cells drift from the header. No first-party flat plugin sets colSpan; adding the row keys (or the row count) to the dependencies would close it.

@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec 973a981

@humbertovirtudes
humbertovirtudes force-pushed the feat/table-columns-virtualization branch from 973a981 to ad86a1a Compare November 12, 2026 18:31
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec ad86a1a

@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.

Changes requested: one sentence in the description still claims test coverage that the tests do not have; the engineering owner's decision for this head covers shipping before focus retention, the column anchor, rows-and-columns windowing and the timing evidence, and the extra wiring size, so this is the only blocker.

  • Miss: the "Remount on toggle" paragraph still says "Unit tests cover all three" although no test shows that an admission fallback keeps the table mounted, so delete that sentence or add the sibling test (render windowed, rerender with textOverflow="wrap", expect the same <table> element).

Non-blocking: the Testing passage's "CI at this head: 127.2 → 127.7 KB" now reads 127.5 KB → 128.0 KB because CI compares against the current main (the +0.5 KB growth is unchanged), and the open notes on the tableColumnWindowing.ts header, the docsDense caveats and the spanning-cell re-check still apply. A Chromium check of this head's Storybook build mounts 10 of 300 columns at the start and 12 mid-scroll, with header and body aligned.

Claims and files checked
  • Claim: the hook returns an opaque capability under its own shared key that the rows reader rejects: verified (tableColumnWindowing.ts, unit test).
  • Claim: Table.virtualization takes one capability or a list with at most one per axis, and any other list renders unwindowed with one warning: verified (resolveTableVirtualization, unit test).
  • Claim: only the unpinned run windows, with floor-width pitches and two overscan columns per side, and every column mounts when the scroll area is at least the minimum width: verified (TableColumnWindow.tsx, useTableColumnWindow.ts, unit tests, Chromium check).
  • Claim: header and body rows share one structure with empty, inaccessible spacers: verified (unit test, Chromium check).
  • Claim: aria-colcount and full-table aria-colindex appear only while columns window: verified (unit tests, Chromium check).
  • Claim: server and first client use the same seed, less both pinned runs: verified (unit tests).
  • Claim: inline geometry uses the existing subscription, and the inline scroll position is read only while a column subscriber exists: verified (tableRuntime.ts).
  • Claim: each unsupported case falls back with a warning, including a spanning cell after mount and a wide minimum width: verified (unit tests).
  • Claim: Table reaches the column window only through the passed value, with no new allowlist row: verified (CI import-boundaries check).
  • Claim: adding or removing the capability remounts and a new seed does not: verified (unit tests); an admission fallback keeps the table mounted: true by construction, untested; "unit tests cover all three": false.
  • Claim: every Table import grows by about 0.4 to 0.5 KB gzip: verified (CI: +0.5 KB); the quoted absolute sizes for this head: stale, as main moved.
  • Claim: the pinned-run registry uses a shared key, only the sticky plugin and the window import it, and a key in both runs pins to the start: verified (tablePinnedColumnRuns.ts, useTableStickyColumns.tsx).
  • Claim: a Table whose first render is empty windows once rows arrive: verified (useTableColumnWindow.ts, unit test); the red-first run was not repeated.
  • Claim: the CLI example block names the hook and is mirrored in both route lists, with its own changeset: verified.
  • Claim: the shared windowing module gains an inline hook and a variable-size range with unit tests: verified (useInlineListWindow.ts, listWindow.ts, listWindow.test.ts).
  • Claim: focus retention, the column anchor, rows and columns together and the timing evidence are later slices, stated in the hook docs and the warning: verified (hook doc, development warning, open follow-up pull request).
  • Claim: the branch sits on the current merge base, and the infinite-loading resolution keeps the unknown row count and the loading empty-state guard: verified (BaseTable.tsx).
  • Claim: the module record is current on main: verified.
  • Claim: the public delta is the new hook and config type and the widened prop, with no theme target or data attribute: verified (CI API report, source).
  • Claim: CI at this head passes every check, including the Chromium specs: lint, typecheck, build, docsite, interaction and visual checks pass; the label-gated accessibility browser specs did not run.
  • Changesets: the Core entry (opt-in, behavior, list form, focus and anchor limits, fallbacks, remount, wiring cost) and the CLI entry (121-column example block): verified.
  • Files: BaseTable.tsx, Table.tsx, types.ts, index.ts, tableRuntime.ts, tablePinnedColumnRuns.ts, useTableStickyColumns.tsx, plugins/virtualization/index.ts, TableColumnWindow.tsx, useTableColumnsVirtualization.ts, listWindow.ts, useInlineListWindow.ts: clear.
  • Files: tableColumnWindowing.ts: non-blocking (header overstates what a Table without the hook carries).
  • Files: useTableColumnWindow.ts: non-blocking (a comment restates a memo; the spanning check misses data-only changes).
  • Files: useTableColumnsVirtualization.test.tsx, listWindow.test.ts, TableColumnWindowing.a11y.chromium.spec.ts, TableVirtualization.stories.tsx: clear (the description's remount-test claim is the finding).
  • Files: useTableColumnsVirtualization.doc.mjs: non-blocking (docsDense caveats); Table.doc.mjs, the CLI example block and its doc, both changesets, routes.lock.json, next-export-routes.json: clear.

Automated review (maintainer link)

Table.virtualization accepts a columns capability, alone or in a list with
at most one rows capability. Table mounts only the unpinned columns near the
inline viewport, plus two overscan columns per side, and keeps the pinned
start and end runs mounted. Each column's pitch is the width it renders at
the table's minimum width. The header row and every body row render the same
inaccessible spacer cells for unmounted columns. While columns window, the
table carries aria-colcount and mounted cells carry full-table aria-colindex.
The server and first client use the same seed from initialViewportWidth.
Inline geometry comes from the shared Table viewport measurement.

The capability carries the column window, a component, under a shared key.
Table renders that component around its table and reads no column planner
code of its own, so a Table that never imports the hook carries none of it.
Adding or removing the capability remounts the table; a new seed does not.
The pinned-run registry moves to its own module, which only the sticky
columns plugin and the column window import.

A Table whose first render has no rows windows its columns once rows
arrive: the empty-state cell no longer counts as a cell that spans columns.

Unsupported content or structure renders every column with a development
warning. With both capabilities, this slice windows the rows and renders
every column. The retained focused column, the first-visible-column anchor
and windowing both axes together come in later slices. Adds the hook's CLI
example block.

This diff was generated with AI assistance (Navi).
Tags: ai-generated
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-columns-virtualization branch from ad86a1a to ad3261d Compare November 12, 2026 19:03
@humbertovirtudes

Copy link
Copy Markdown
Contributor Author

/approve-spec ad3261d

@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: the Node test leg 4 of 5 is running again on this commit. Its first run hit the 15-minute job limit with no failing test, and every other check passed. Column windowing follows the current Table and module records for everything this slice builds, and shipping before focus retention, the inline anchor, rows-and-columns windowing and the timing evidence, along with the extra wiring every Table now carries, has an engineering owner's decision for this commit. The earlier description point is fixed, and only optional cleanups remain:

  • Miss: the pinned-run resolver in useTableStickyColumns.tsx reads stateRef.current while Table renders; closing over start and end reads the values themselves.
  • The tableColumnWindowing.ts header and docsDense in the hook doc still leave out what the changeset says: the wiring every Table carries, and the focus, anchor and rows-and-columns caveats.
Claims and files checked
  • Claim: the hook returns the shared opaque capability under its own key, and the rows reader rejects it. Verified (hook and key modules; capability identity test).
  • Claim: Table.virtualization takes one capability or a list with at most one per axis; other lists render unwindowed and warn. Verified (list resolver; invalid-list test).
  • Claim: only the unpinned run windows, with two overscan columns per side, floor-width pitch, and every column at full width. Verified (window and planner; pinned, middle and wide-viewport tests; browser check of the story).
  • Claim: header and body rows share one spacer structure, and spacers are empty, unpadded and unfocusable. Verified (spacer cell; structure test; browser check).
  • Claim: aria-colcount and aria-colindex appear only while columns window. Verified (BaseTable; position tests).
  • Claim: the server and the first client share a seed that subtracts both pinned runs. Verified (inline window; server and end-pinned seed tests).
  • Claim: inline geometry uses the existing runtime subscription, and scrollLeft is read only with a column subscriber. Verified (tableRuntime.ts).
  • Claim: admission checks and per-case warnings, including the spanning cell and a wide min-width. Verified (fallback reasons; admission tests).
  • Claim: Table reaches the column window only through the capability, with no allowlist row, and the boundary check passes. Verified (imports; CI lint on this commit).
  • Claim: a Table import grows by about 0.4–0.5 KB gzip. Verified (CI: 127.5 KB to 128.0 KB); the per-part byte breakdown is the author's estimate.
  • Claim: the pinned-run registry is shared across copies, and only the sticky plugin and the column window import it. Verified (registry module; imports).
  • Claim: a Table whose first render is empty windows once rows arrive. Verified (row-presence guard; empty-start test).
  • Claim: the example block names the hook, appears in the sandbox routes and the route lock, and has its own CLI changeset. Verified (block, route files, changeset; CI docsite build).
  • Claim: the range math lives in the shared windowing module beside the rows hook. Verified (inline window and range function; unit tests).
  • Claim: focus retention, the inline anchor and rows-and-columns windowing are not built, and the docs and warning say so. Verified; the timing evidence is release evidence with no behavior to document.
  • Claim: adding or removing the capability remounts the table and a seed change does not; tests cover both, with no test for a fallback. Verified (render structure; remount and seed tests).
  • Claim: the rebase keeps infinite loading's row count and initial empty state. Verified (BaseTable).
  • Claim: new exports, the widened prop, and no theme target or data attribute. Verified (entry files; CI API analysis).
  • Claim: default text truncates with the capability. Verified (BaseTable).
  • Claim: CI on this commit passes. Verified for every finished check; one Node test leg is running again after its first run hit the time limit with no failing test.
  • Claim (core changeset): windowing, positions, full-width mounting, the list form, the behavior with both capabilities, the focus and anchor caveats, fallback warnings, remount and the wiring cost. Verified.
  • Claim (CLI changeset): a 121-column example with a pinned first column. Verified.
  • Files: all 26 changed files were read. Optional notes: useTableStickyColumns.tsx (render-time ref read), tableColumnWindowing.ts (stale header), useTableColumnsVirtualization.doc.mjs (dense doc caveats), useTableColumnWindow.ts (spanning-cell recheck, one narrating comment), useTableColumnsVirtualization.test.tsx (no renderer-count test for in-range scrolls). Clear: the other 21 files.

Automated review (maintainer link)

[attachScrollShadow],
);
registerPinnedColumnRuns(plugin, columns =>
countPinnedRuns(columns, stateRef.current.start, stateRef.current.end),

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.

Non-blocking (INV17): this resolver runs while Table renders and reads stateRef.current, a latest-value ref, instead of the values. The hook registers it again on every render, so it can close over them:

registerPinnedColumnRuns(plugin, columns =>
  countPinnedRuns(columns, start, end),
);

As written, moving stateRef to useCommittedRef would leave the pinned runs one render behind.

@humbertovirtudes
humbertovirtudes merged commit 10bae06 into main Nov 12, 2026
135 of 137 checks passed
@github-actions
github-actions Bot deleted the feat/table-columns-virtualization branch November 13, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — ad3261d8 Deployed Nov 12, 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant