Skip to content

feat(Table): add Promise-based infinite loading - #8282

Draft
humbertovirtudes wants to merge 1 commit into
feat/table-activation-v1from
feat/table-infinite-scroll-v1
Draft

humbertovirtudes wants to merge 1 commit into
feat/table-activation-v1from
feat/table-infinite-scroll-v1

Conversation

@humbertovirtudes

@humbertovirtudes humbertovirtudes commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Current refresh — 2026-11-04

This same canonical stack is rebased onto main cd1e42c. The Table and activation/loading/row-virtualization primary contracts are current after merged #7972; historical pending-primary-spec language below is not the current authority status. The old #8279 approval-record branch is not a runtime prerequisite. Existing narrower API/composition owner questions, authored-size disposition and numerical/accessibility release requirements remain open.

The activation patch is unchanged by the rebase. The upstream header-resize accessible-name and removed-surface focus-return fixes survive. Per-stage generated API reports are refreshed; no new public Table hook or config is introduced. The refreshed complete Table/helper suite passes899 tests in51 files, both intermediate builds/contracts pass, and final source/declaration builds pass. Test-inclusive core TypeScript retains one TokenizerBottomSheet experimental-prop error that reproduces identically on pinned main; it is not silently called green. Integration strict lint, formatting, knowledge and pre-review pass. A bounded native browser source check covers activation click/Tab/Enter/Space, retained focus and forced-colour LTR/RTL cue without page exceptions; not full Storybook, hosted-deployment, AT, motion or numerical release certification.

This is a code-only rebase plus generated-report refresh and current description, not a specification approval, review approval, lifecycle change, duplicate PR or runtime merge. Prior evidence remains bound to the versions exercised. The parallel #8861 is not changed or merged by this refresh.

User need

Incremental Table loading must coordinate observer and manual requests while keeping a keyboard-accessible command, avoiding visible-sentinel failure loops and preventing initial loading from appearing as empty data.

Current specification and dependency

Implements the proposed module:Table/useTableInfiniteScroll and shared parent loading/viewport protocol from #7972; its current exact-head owner decision remains pending. Depends on the preceding Table implementation stack and approval-record follow-up. This is draft runtime code, not another contract proposal.

Public delta

const loading = useTableInfiniteScroll({hasMore, isLoading, onLoadMore});
<Table data={rows} columns={columns} idKey="id" plugins={{loading}} />

Exactly three fields; onLoadMore returns Promise<void>. One pre-invocation latch guards observer/manual/reentrant requests. Fulfillment and a subsequent false loading commit release it without requiring an observed true phase. Throw/rejection/invalid void pauses automatic loading, while manual retry remains possible. Callback replacement does not reset pending work; remount the hook owner for a new dataset generation. The real persistent Button owns busy semantics and its sole loading announcement; sentinel/chrome sit outside semantic table rows. Focused exhaustion returns to the existing viewport only when otherwise detached.

Evidence

All 20 infinite-loading tests pass at the integrated stack: synchronous reentry, immediate fulfillment with no intermediate true phase, task-boundary short-batch rearm, error/manual retry, stale generation, callback/root replacement, no observer fallback, busy Enter/Space focus and exhaustion handoff. Immediate fulfillment originally failed its assertion; disconnecting observation at latch acquisition fixes the unchanged regression. Shipping types pass; lint has zero errors. Real Chromium confirms busy Button stays focused/non-native-disabled, settles and hands focus back on exhaustion, with no runtime exception. Consumer docs, localized command, Storybook fixture and changeset included.

Draft holds

Not ready to merge. Prerequisites, required CI and exact final-head canonical interaction/visual evidence remain gates. Local real-source motion does not claim authenticated production or assistive-technology spoken timing. No extra announcer or new request client is added; no main merge is performed.

This PR was generated with AI assistance (Navi).

Dependency stack

The three implementation PRs contain runtime, tests, docs, Storybook fixtures and release notes. Draft status is intentional: prerequisite merges, required CI, final-head visual/interaction evidence and unresolved release budgets must be satisfied before readiness. The initial automated own-code review found four parent integration regressions; the same stack is being amended with their dedicated tests and minimal fixes, not duplicated.

Independent own-code review

The initial integrated draft passed targeted behavior tests but an independent adversarial pass found four additional parent integration regressions: legacy in-place append, rejected-virtualization overflow context, selection mutating current-item attributes, and identity-object churn rerendering unchanged rows. All four are fixed in the same dependency stack. The 51-test recheck and repaired shipping typecheck pass; an independent bounded recheck found no missed fix among those four. Release gates remain held, and no new implementation approval is inferred.

Rebase verification (2026-10-27)

Rebased the existing dependency stack onto 0cbddeac0270ffa06819330dd9b07686e833e6a2. Table accessibility bindings from #7695 and first-frame scroll keyboard access from #8388 are preserved. Conflicts were confined to Table verification-map composition and the shared scroll measurement; original PR scopes remain unchanged.

Shipping TypeScript, 290 targeted tests in 13 files, knowledge/client/format checks, current global baseline routing and a real Chromium smoke check pass. The loading test fault fixture now returns actual synchronous void/throw instead of an async function that converted those cases into Promise outcomes; production loader behavior is unchanged.

These are rebase checks, not a fresh full performance/AT/visual certification. Earlier evidence remains tied to its captured heads; existing release holds and draft states remain. No merge or new implementation approval was performed.

Latest-main refresh (2026-10-28)

Refreshed this same dependency stack onto 327dd846b7d64a114168915868abc0c4aa7a13bc. Released Table divider/motion contracts from #8652/#8679 retain FR14/FR15/DEC-3. Pending flat-data plugin claims move to FR16–FR22 and DEC-4/DEC-5; their module parent references are updated to avoid duplicate IDs. Module-local IDs and runtime patches are unchanged. This is reference reconciliation, not a new behavior decision or approval.

Shipping types and 290 targeted tests in 13 files pass. Existing draft/lifecycle states, dependency bases, previous evidence limitations and release gates are preserved. Old exact-head owner approval is historical; it is not transferred to these refreshed SHAs. No merge or new PR was performed.

Contract projection accuracy (2026-10-28)

Corrected four spec-only wording projections from the latest review: FR15 describes the approved, not released, motion decision; Table lists all three optional plugin fields; the Scroll region projection names applicable inline/block axes; the loading-module dependency summary includes parent FR22. Normative behavior, released divider/motion claims and all runtime source are unchanged. Knowledge, exact-file formatting and whitespace checks pass.

No fresh owner decision was supplied. Pending deciding-owner fields remain unstamped in the contract PR; historical approval metadata in its separate follow-up remains evidence only for the prior approved text. No approval was transferred and no merge or draft-state change was performed.

Incremental row-total correction (2026-10-28)

The current review found an unknown-total gap when loading and windowing compose. Parent Table FR20 now owns the only row-count rule: an admitted nonempty windowed table reports aria-rowcount=-1 while any loading source reports hasMore=true, whether idle, busy or retry-paused. Exhaustion makes it the exact header-plus-data count; appending while more data exists keeps it unknown. The existing render-state snapshot gains optional hasMore availability beside isLoading, preserving loading-only sources. This adds no caller total/count setting or hook configuration field. Both module records cite that parent owner.

The three optional plugin declarations remain stable public surfaces (additive compatibility, not an experimental lifecycle). Plugin diagnostics retain non-function and empty-plugin warnings; PR2 now names parent identity/render/viewport costs. Pending deciding-owner fields remain unstamped until a real exact-head decision.

Matching implementation and tests are in this same dependency stack: the parent reads a stable primitive loading/availability aggregate, the loading hook publishes an immutable availability snapshot, and seven new real-Table composition tests cover idle/busy, append/exhaustion, server/empty metadata, legacy counts, loading-only compatibility and independent availability updates. Five failing behavior assertions were observed first; the complete 297-test/14-file regression run and shipping TypeScript pass. Matched real-source browser count/focus evidence is retained for the owner outside public source.

This is a new normative clarification awaiting fresh owner approval, not a transfer of the earlier approval. The approval-record follow-up does not stamp the modified loading/windowing decisions with that historical approval; those records stay draft/null. Existing PR draft statuses, dependency bases and other release gates are unchanged. No merge or new PR was performed.

Scope and review-projection repair (2026-10-28)

Restored the existing non-goal for pagination, filtering, column-management, tree/grouping, sticky-column and context-menu anatomy beyond explicitly recorded stable parts. Flat-data capability work does not expand Table ownership into those module-specific anatomy contracts. The Table overview now names the render-state source, and the loading overview cites parent FR20 for row-total ownership. All runtime source, behavioral requirement sections and the corrected unknown-total rule are unchanged. Knowledge, exact-file formatting and whitespace checks pass.

A deciding owner and date cannot be invented: DEC-4/DEC-5 remain pending in the contract until an actual exact-head decision, and no historical approval is transferred. Existing PR identities, dependency bases and draft statuses are preserved; nothing merged.

Keyboard ref-handoff repair (2026-10-28)

The exact-head activation review exposed row keyboard attributes being removed during ref replacement after React had diffed unchanged props. Eligible reflection now reconciles actual tabindex and shortcut attributes on every reflection. Real-browser follow-up also caught transient blur: a connected focused row keeps its activation-owned tab stop across the same-commit ref handoff, and a private weak-owner/microtask guard retires it only when no successor claims the element. No imperative focus restoration or new public API is added. Ineligible rows and genuinely detached generations still remove owned attributes; caller tabIndex=-1 and shortcut composition/restoration remain intact.

Four failing behavior assertions were reproduced first for StrictMode, rebuilt columns, immutable item replacement and caller shortcuts. Added cleanup/ineligibility edge regressions too. Final targeted coverage is 302 passing tests in 14 files. Both shipping and full core test-inclusive TypeScript pass. The two reported test-type errors and explicit-any lint error are repaired with explicit item generics, nullable initialProps and BodyCellRenderProps; targeted lint has zero errors (remaining warnings are not a CI waiver).

Matched real-source Chromium evidence in light and dark reproduces the old loss of all eight tab stops and focus on Enter, then proves repeated Enter/Tab/Space activation, immutable data update focus continuity and preserved current-versus-selection semantics after repair. Images were visually inspected and motion encoded as VP9 tv-range WebM. This local StrictMode fixture exercises the real hook/Table with the old committed hook as baseline; it is not authenticated production or AT timing evidence. The evidence bundle is retained privately for the owner; no internal artifact links are included here.

Only the activation implementation/test/doc files changed, and its loading dependent is restacked. Contract #7972 at d87cbc0 and the existing approval/base/virtualization PRs are unchanged. Fresh spec-owner approval, authenticated evidence and other existing release/performance gates remain open; this is still draft, not ready to merge. No approval, lifecycle change, duplicate PR, human outreach or merge was performed.

Nested control boundary repair (2026-10-28)

The activation guard now rejects an associated native control label (including descendants) and a summary disclosure trigger before requesting row activation. Plain labels with no associated control remain ordinary row content. This is a private correction behind the documented native-control boundary: no public API, shared container policy, table renderer, contract metadata or loading behavior changed.

Four RED assertions reproduced first-party CheckboxInput-label, explicit/wrapped native-label and summary activation. Controlled checkbox state and native details-open behavior are asserted through the real Table. Five new boundary cases and one changed-predicate count regression pass; that count already met the bound, so no speculative performance change was applied. The full focused regression is 308 tests in 14 files; full core test-inclusive TypeScript and targeted lint pass. Knowledge, formatting and whitespace checks pass.

Real-source Chromium before/after checks in both themes reproduce row switching during a label/summary click in the old guard, then verify that the controls still check/open while the current row stays unchanged after repair. Native wrapped labels, keyboard summary operation, ordinary row clicks and row Enter activation also pass with no runtime exceptions. Matched images were inspected and motion recorded as VP9 tv-range WebM; this local fixture is not authenticated production or AT-timing evidence. Evidence is retained privately for the owner, without internal links in this public description.

Activation #8281 and its dependent #8282 retain their existing draft status and dependency bases. Contract #7972 and its outstanding owner decision are unchanged. No approval, duplicate PR, human outreach or merge was performed.

Fallback-root, strict-lint and forced-colours repairs (2026-10-28)

The parent supplies the loading block viewport only while its mounted window plan is actually windowed. Full-render fallback and empty tables use the browser viewport; obsolete bounded observers disconnect. Seven failing real-Table root/late-entry assertions were captured first. The same off-screen Chromium fixtures previously loaded 13 batches with custom-renderer/wrap fallback; after repair all fixtures make zero requests until visible. Existing request latch, manual, rearm and focus tests remain green.

The active row now retains a system Highlight cue under forced colours, using the existing inherited cue width. A missing/non-flat model emits one development diagnostic that names the compatible rowModel: 'flat' declaration; consumer docs explain it. One missing-diagnostic RED assertion was captured. A new canonical-story Playwright file checks the forced-colours cue and keyboard continuity. Its exact assertions failed on the baseline and pass on repaired real-source Chromium with only the local story-serving import adapted; a full built Storybook run is not claimed.

CI-mode (ASTRYX_STRICT_LINT=1) errors are repaired, including ref naming, test button types, stable test defaults and named memo fixtures. Mutable loading context/lifetime updates occur through methods of the runtime owner, not prop/state field assignment. No lint suppression was added for runtime safety. The direct-transform test fixture retains one documented children-slot rule exception.

Validation: 318 targeted tests in 15 files, full core test-inclusive TypeScript and strict-mode targeted ESLint pass (remaining warnings disclosed, not waived CI). Knowledge, SYNC, use-client, changeset, formatting and whitespace checks pass. Real-source off-screen and forced-colours captures are retained privately for the owner; this is not authenticated production, spoken-AT or numerical performance certification.

Only these existing implementation PRs are updated: shared parent/cell repairs in #8280, activation diagnostics and canonical cue test in #8281, loading runtime/observer tests in #8282. Contract #7972 at d87cbc0 and historical approval metadata are unchanged. All remain drafts; owner approval and existing release gates remain open. Nothing merged and no duplicate PR was created.

Compatibility, registry and scope repairs (2026-10-28)

The row memo comparator no longer invalidates legacy non-windowed rows for a count-only render-context change. New opt-in context consumers retain their update scope. A 200-row real Table regression and the existing tree-expansion performance test failed first; after repair append renders only the added cell and tail removal renders none. Matched real-source Chromium checks in both themes measure 201→1 append and 200→0 removal calls while retaining the same bounded virtual top/middle DOM and aria positions.

TableProps is again the released extendable interface, with optional virtualization and runtime admission diagnostics. A compile-only interface extender reproduces TS2312 before and passes after. No parallel exported props type or lifecycle decision is added. The focus-island key is derived from current canonical keys; the removal effect performs only native DOM-focus and viewport-anchor synchronization, without a derived state reset. Existing removed-focus/successor and menu-focus coverage passes.

All three self-contained Table stories use plain Meta/StoryObj. Their focused exact-source typecheck passes. The full Storybook package was attempted but remains unverified because this isolated dependency install lacks unrelated theme/chart/Vega/Lexical packages; no complete package-green claim is made. Core source/declarations built locally, and official docs generation regenerated and then verified exactly three hook registry routes. Each route is placed in the PR that introduces it; no unrelated routes changed.

Scope is redistributed across these same PRs. Activation-specific finalization, selection/activation paint coordination, first-cell cue and its protocol tests are introduced in #8281 rather than #8280. Loading-source consumption, default-empty suppression, unknown-total logic and its protocol test are introduced in #8282. Parent-only in-place append/fallback tests and windowed menu focus coverage move into #8280, whose menu fixture owns its own tab stop instead of depending on activation. The final stack retains the same observable behavior.

Remaining authored-LOC necessity evidence (not a waiver)

The scoped authored counts remain 2,715 lines for #8280 and 2,277 for #8281 (both above the 2,000-line scrutiny threshold); #8282 is 1,558. These holds are not self-cleared. The parent pre-cell seam, native geometry/anchor/focus planner, fixed-content admission and their mutation-sensitive tests must be reviewed together: moving the seam into a plugin restores cell construction before slicing, requires a second viewport, or makes callers maintain identity/offsets. Activation now contains its own guard/lifetime/ref/paint implementation and direct behavior/keyboard tests, not passive parent tests. The coordinated shared public declarations remain in the parent as the single protocol owner. Both changes still warrant size scrutiny; this explanation is dependency evidence for the maintainer, not an owner exception or self-cleared scope hold.

Validation: the repaired targeted Table stack passes its unit/DOM suites, full core test-inclusive TypeScript and changed-file strict lint. Exact intermediate virtualization and activation heads are checked independently, not only the final loading stack. Knowledge, SYNC, use-client, changeset and whitespace checks pass. Browser evidence is local real source, not authenticated production or numerical performance certification.

Contract #7972 at d87cbc0, its owner decision and all specification/approval metadata are unchanged. These existing PRs remain drafts with their dependency bases preserved. No approval transfer, duplicate PR, human outreach or merge was performed.

Loading-only incremental-render repair (2026-10-28)

Removed the renderState-presence clause from row memo invalidation. A wrapper-only loading source does not consume row-count context; flat row/cell transforms, actual windowing and activation retain their contextual updates. A new real-hook/Table regression fails before repair with 250 cell renders when 50 rows append to 200, then passes with exactly the 50 new cells. Busy-only updates and tail removal render no existing rows. The loading-protocol fixture Button now has an explicit type for CI strict lint.

Validation: 323 targeted tests in 19 files, full core test-inclusive TypeScript, strict changed-file ESLint, knowledge/SYNC/use-client and whitespace checks pass. Matched real-source Chromium in both themes confirms append 201→1 and tail removal 200→0 in the same loading-table fixture, retaining the same bounded virtual DOM and logical metadata with no runtime exceptions. Evidence is local real source, not authenticated production or numerical-release certification.

Only the existing #8282 comparator/test delta is updated. #8280/#8281, dependency bases, all spec records and approval metadata are unchanged. The PR stays draft; owner approval, prerequisite landings and existing evidence/performance gates remain open. No approval, duplicate PR, human outreach or merge was performed.

Plugin append, cue isolation and protocol placement repairs (2026-10-28)

Selection and sticky-column plugins no longer make a count-only change rebuild every row. A private weak registration marks the known first-party transforms that do not consume logical counts; custom context-reading row/cell modifiers retain count invalidation. No public consumption declaration, plugin-name/order heuristic or function-arity check is added. Three real-hook/Table RED cases showed 201 renders for one append (selection, sticky, combined); after repair each renders only the added cell and no existing cells on tail removal. A custom transform regression confirms fresh logical totals. Matched Chromium selection/sticky fixtures in light and dark confirm append201→1 and remove200→0 while preserving native windowing metadata.

The activation cue now paints on the same pseudo-element layer as the pinned-cell overlay, above its background, preserving the separate scroll-shadow layer. Each TableRow resets inherited cue width so a nested data-mode or children-mode Table does not paint the enclosing current-row cue. Default translucent overlays previously tinted/partially obscured the cue; a supported opaque accent-muted override reproduced complete occlusion. Final before/after comparisons use that same override. The exact cue regression and real-browser evidence cover pinned and unpinned rows, LTR/RTL, light/dark, forced colours and nested-row isolation. The protocol test fixtures use explicit TablePlugin/row-context types rather than any and pass strict lint.

Earlier PR heads now expose only consumed protocol and truthful docs: #8280 introduces row model/context/windowing, #8281 introduces whole-row ownership/canActivate plus its validation, and #8282 introduces renderState/canLoad plus its validation. Table consumer text and development diagnostics stage activation identity and unknown loading totals in those owning PRs, rather than describing future behavior on the virtualization head. Package exports likewise introduce hooks with their actual module source. No specification record or approval metadata is changed.

The saved final head passed 12 focused cue/append/protocol/loading tests in four files, full core test-inclusive TypeScript and strict repaired-file lint (zero errors; one inherited warning). Two final cue-file formatting fixes preserve byte-identical Babel-generated executable syntax; formatting and record/SYNC checks pass. Earlier wider parent checks passed 343 tests in 21 files and the scoped cue repair passed 236 tests in five files; those are separate receipts, not one final-head full-suite run. Intermediate PRs were typechecked and tested independently before the cue-only adoption; their exact tree deltas are verified. The repaired targeted and sibling suites, full core test-inclusive TypeScript, strict changed-file lint, knowledge/SYNC/use-client/whitespace and real-source browser checks pass. Each intermediate PR is typechecked/tested independently; neither a final-stack pass nor old approval is claimed as its authority. Full built Storybook, authenticated production evidence and numerical release budgets remain open. Authored-LOC scope scrutiny remains explicit: the parent native pre-cell seam/windowing algorithm and its tests, and the activation guard/lifetime/paint/tests still exceed the general threshold; this is not a granted exception or self-cleared hold.

These same draft PRs and dependency bases are retained. Contract #7972 at d87cbc0 and the requested owner decision are unchanged. No new PR, owner approval, human outreach or merge was performed.

Tracked window state, admission and nested activation repairs (2026-10-28)

The last window and pending physical scroll anchor are now React-owned state derived from immutable input/geometry snapshots, not refs mutated in a layout effect and read during render. Guarded render adjustment is bounded to one retry when source, snapshot, data, keys or geometry config changes. The existing geometry external store remains the sole measurement source; native viewport refs serve DOM synchronization only. There is no second virtualizer, Effect history update per frame or new public API. New normal/StrictMode regressions reproduced an anchor snapback before repair, then cover handoff, acknowledgement, repeated commits, pitch/removal, lost measurement, no tail follow and revert before acknowledgement.

Windowing emits deduplicated development diagnostics for unsupported custom renderers, explicit wrapping, conflicting row offsets/counts, structural models and invalid geometry. Every context-reading custom transform, including one without a flat declaration, receives fresh logical totals; count-independent first-party plugins preserve their existing append cost. Selection/sticky registration happens after the memoized object is constructed, removing the former wrapper-induced re-indentation. Unused blockViewport is introduced only in the loading PR. The row-focus context has its display name, earlier render-context dependencies are exact, and the synchronous Proxy fixture has explicit unknown return typing.

The activation plugin is privately registered as count-independent, and row memoisation compares its admission by value. A 200-row activation table now renders only the appended cell rather than all 201; the failing public-hook regression is retained. Gestures inside another native row stop at that row boundary: nested activation clicks, Enter and Space never activate the enclosing row, while direct outer-row presses still work. Both new assertions failed before repair and pass after.

Validation at the final stack: 350 targeted tests in 21 files pass; full core source/docs TypeScript and strict changed-file lint pass (remaining style warnings are not a CI waiver). Exact intermediate virtualization and activation heads were separately typechecked/tested. Knowledge, SYNC, use-client, changeset and whitespace checks pass. Real-source Chromium retains Row1000 at the same 5px offset across prepend, does not tail-follow append, preserves fractional offset on row pitch changes and anchors to Row1001 on removal. Nested keyboard/click checks leave the outer current state unchanged and direct outer activation works; no runtime exceptions.

All specification and approval metadata remain unchanged. These same draft PRs retain their dependency bases. Owner approval, authored-LOC scrutiny (3069 parent / 2473 activation / 1655 loading), built Storybook, authenticated evidence and numerical release gates remain open; none is self-cleared by these tests. No duplicate PR, approval transfer, human outreach or merge was performed.

Legacy plugin and mutable window append compatibility (2026-10-28)

Unchanged custom and expansion rows retain their historical append/removal scope. Private, cached immutable row-context getters record actual reads of logicalRowCount, including context.render.logicalRowCount. Row memoisation invalidates count-consuming plugins while leaving legacy transforms that never read those counts untouched. This neither infers function arity nor adds a caller flag or public count-consumption declaration. Existing known count-independent registration remains private. A stable-callback fixture proves expansion and ordinary custom row/cell plugins append one cell and remove the tail with zero preceding renders; declared and undeclared count readers still receive fresh totals.

Canonical identity memoisation now also responds to the input length. Mutating the same data array with an append and re-rendering no longer leaves a shorter identity array or throws while constructing rows. Empty and bounded rendering retain their existing semantics.

The exact old head failed four test-first assertions: expansion/custom-row/custom-cell append rendered201 cells instead of1, and a same-array windowed append threw while reading reactKey. Those tests now pass, with stable callback fixtures and a cell-level render-context count-consumption check. The final targeted suite passes 355 tests in 21 files; core source/docs types, strict changed-file lint (zero errors, style warnings retained), formatting, knowledge, SYNC, use-client, changeset and whitespace checks pass. Exact intermediate PR heads are typechecked and the virtualization compatibility/runtime tests pass independently. Matched light/dark Chromium confirms append201→1, removal200→0, and the old same-array crash becoming a bounded table with9 mounted rows and correct aria-rowcount22. Matched light/dark Chromium reproduces the old expansion append/removal cost and in-place window crash, then verifies bounded rendering, updated logical totals and no new runtime errors after repair.

The committed Chromium spec now scopes rows to #storybook-root tbody tr, avoiding hidden Storybook docs-skeleton rows; the selector is reproduced against a local server adapter with hidden skeleton markup (old locator times out, scoped locator passes), not claimed as a full built-Storybook run. The loading module adds only two comments naming the native observation/focus resources and request mount lifetime synchronized by its cleanup and activation effects; no request behavior changes. All specification and approval metadata remain unchanged. The same PRs stay draft with the same dependency bases; owner approval, authored-size scrutiny and existing release gates remain open. No duplicate PR, approval transfer or merge was performed.

Document-departure focus and wide-loading surface repairs (2026-10-28)

The virtual focus island now survives a null-relatedTarget blur when its owning document has lost focus. Genuine moves to outside elements still release the island, and caller blur callbacks and recognized menu ownership remain intact. The new unfocused-document regression fails without the guard; both null-target cases and menu return pass after it. The legacy fixture uses ReadonlyArray to satisfy strict array-type lint.

The loading plugin contributes CSS-native grid and inline-size query-container styling to the existing scroll wrapper. Its after-table surface is sticky at the visible inline range and sized to the viewport with100cqi, so the sentinel and real Button remain reachable while the table scrolls to later columns. No public API, extra geometry listener, wrapper element, request-latch behavior or manual-button primitive changes. Chromium covers full and windowed tables, LTR/RTL, manual clicks and native observer requests: the old end-of-inline view offered neither command nor request, and all eight after cases keep the command/sentinel visible and load once. A dedicated canonical-harness browser spec covers the existing full-rendering story; its source-fixture adapter run is not a full built-Storybook result.

Focus browser evidence uses identical fixed-pitch fixtures with separate table/zero cell borders and a simulated native document-departure event, not a physical application switch or canonical theme baseline. Before, the offscreen Row1 island disappears and focus becomes body; after, Row1 remains mounted/focused, and a real focus move to the outside Button releases it without stealing button focus.

A separate busy-phase 57px block-scroll shift is preexisting and remains unfixed: pinned before/after wide and narrow fixtures show the same scrollTop2093→2036, with unchanged content height2333. This repair claims horizontal reachability of the ready command and sentinel only, not a fix for that vertical behaviour. The final combined targeted suite passes357 tests in21 files; full core source/docs typing and strict changed-file lint pass (zero errors; inherited style warnings remain). Knowledge, SYNC, use-client, changeset, whitespace and formatting checks pass at the saved final heads. Separate browser evidence covers8 full/windowed × LTR/RTL × manual/native cases and4 retained full-story adapter tests; those are not included in the357 unit-test count. Detailed counts and browser adapters are in the validation receipt. All existing specification/approval metadata and dependency bases remain unchanged. These same PRs stay draft; owner approval, authored-size scrutiny, full built Storybook, authenticated evidence and numerical release gates remain open. No duplicate PR, approval transfer or merge.

Runtime admission contract accuracy (2026-10-28)

FR18 now names runtime admission of data mode, explicit identity and constrained content, with diagnostic full-render fallback, rather than claiming a restrictive opt-in props type. The exported TableProps interface remains compatible with existing interface extenders. This is a single-sentence accuracy correction; all owner, authority and lifecycle metadata remains unchanged and no approval is transferred to the new head.

Writing rubric results for the edited sentence: R1 present-tense runtime boundary, not change narration; R2 no research embedded; R3 no change-id evidence; R4 no rejected-alternative change; R5 no PR/issue link in the record; R6 no question options changed. Knowledge/SYNC/format checks pass.

Loading intrinsic sizing, native extent and diagnostics

The loading wrapper no longer imposes inline-size containment, which collapsed shrink-to-fit hosts. Existing grid content spans the table extent; its full-width sentinel and the existing Button with logical inline stickiness remain reachable during horizontal scrolling. Narrow tables retain centred commands; wide tables may clamp the command to an inline edge rather than centring it in the viewport. No public API, geometry listener or wrapper is added.

The parent geometry snapshot includes native scrollHeight and the window planner/reconciliation account for existing after-body content. The retained append regression now preserves scroll position and first-visible product through both latch acquisition and batch append instead of shifting back57px. Canonical counts, pre-cell bounds and key/fraction anchoring remain unchanged. Identity and whole-owner diagnostics are emitted once per mounted Table, including data-only rerenders.

The final combined targeted suite passes360 tests in21files. Full core source/docs types and strict changed-file lint pass (zero errors; inherited style warnings retained). Exact intermediate virtualization and activation typechecks pass, with virtualization strict lint and6 activation diagnostic tests verified separately. Knowledge/SYNC/use-client/changeset/format/whitespace checks pass. Separate browser checks cover10 retained story-adapter cases,8 shrink-host/plain-parity cases,8 horizontal cases, and matched no-jump anchors; these are not included in the360 unit-test count. Matched Chromium covers shrink-to-fit plain/loading parity, full/windowed LTR/RTL horizontal reachability and the no-jump batch anchor. Retained browser tests use source-built story adapters, not full built Storybook; combined-window cases are scratch evidence. Prior descriptions of the57px shift as unfixed apply only to earlier heads: this version fixes it.

Owner approval, authored-size scrutiny, authenticated evidence, full Storybook and numerical release gates remain open. Draft/non-draft lifecycle and dependency bases are unchanged. No duplicate PR, owner stamp, approval transfer or merge.

First-party flat admission clarification (2026-10-28)

Table FR17 explicitly requires the first-party selection and sticky-column plugins to declare rowModel: flat; their selection cells and pinned-cell wrappers preserve flat product-row structure. This closes the mismatch between fail-closed unknown-modifier admission and the promised first-party compositions. The FR16-FR22 verification map also names first-party declarations and the diagnostic full-render fallback. No declaration is inferred from plugin name or order; unknown modifiers still need a compatible explicit declaration.

Only Table.spec.md changed. All runtime source, tests, module records, owner/frontmatter metadata, lifecycle and dependency bases are unchanged. The runtime already carries these declarations; this update does not add or remove runtime admission. Knowledge, SYNC, formatting and whitespace checks pass, and per-head tree comparisons verify unchanged implementation files. The previously recorded360 runtime tests and browser checks belong to the byte-identical runtime; they were not rerun for this specification-only correction.

Writing rubric results for this clarification

  • R1 narration: the edited requirement names present-tense plugin declarations and flat structure, with no change history.
  • R2 research: no comparative survey or run data added to the record.
  • R3 evidence naming a change: verification names declarations and the fallback behavior, not a PR or commit.
  • R4 rejected alternatives: none changed.
  • R5 change references: no PR, issue or operational link added to the record.
  • R6 questions: none added, closed or given a fabricated answer.

DEC-4 and DEC-5 deciding-owner names/dates remain pending for the actual engineering owner to supply. No owner identity, decision date or exact-head approval is invented or transferred. Owner approval, authored-size scrutiny/decomposition and release gates remain open; nothing merged.

Forced-colour current-row marker and owner-only validation (2026-10-28)

Forced colours draw the current-row marker as a single3px inline-start border on the existing first-cell pseudo-element, not an outline around the cell. Keyboard focus retains its separate native row outline. The ordinary light/dark cue, pinned overlay layer and RTL geometry remain unchanged; no new DOM wrapper or public API. The retained canonical-harness browser spec inspects the logical stroke, distinguishes a focused inactive row from the current row, and verifies Enter moves current state without moving focus. Outline style, not computed default outline width, determines whether a surrounding ring paints.

An owner-only plugin with no transform methods again emits the empty-plugin development warning. A renderState source remains a meaningful parent contribution and is not classified as empty. The retained warning test reproduces the missing diagnostic on the old head and verifies one warning plus stable pipeline identity after repair.

Ordinary odd and even virtual stripes now use the same existing background transition tokens as equivalent full rendering; the retained parity test failed on the missing transition and passes after restoration. The final combined targeted suite passes362 tests in23 files. Core source/docs types and strict changed-file lint pass, and exact intermediate verification covers the virtual hover path. Record/format/whitespace checks pass. Retained forced-colour source-story adapter tests pass inLTR/RTL; eight matched forced-colour before/after normal/pinned checks and four theme-relative hover checks pass in Chromium. These browser checks are separate from the362 unit-test count. Matched Chromium before/after exercises forced colours inLTR/RTL with unpinned and pinned first cells at horizontal scroll end; retained browser tests use a source-built story route adapter, not a full built Storybook result or authenticated release certificate. New assertions failed against the old cell outline and pass for the single-edge stroke.

All canonical contract/approval metadata, draft states and dependency bases remain unchanged. The same PRs are reused; owner approval, authored-size scrutiny/decomposition and release gates remain open. No owner stamp, approval transfer or merge.

Shared-owner review repairs (2026-11-03)

The exhausted Load more command now calls the same shared temporary-focus utility used by virtualization. The duplicate tabindex/blur-listener implementation is removed; authored focusability and preventScroll are preserved. Parent warning and viewport ownership changes are inherited from the same stack.

Verification: the combined stack passes 949 tests; final critical tests, core types and CI-mode lint pass, including loading availability, request lifecycle and command focus behavior. This records verified fixes, not owner contract approval or a merge.

Focus ownership and fixture staging (2026-11-03)

Loading exhaustion now records the command focus through noteFocusWithin and calls moveFocusLeftBehind in the layout effect after removal. The ref-time focus-loss check is removed. Three shared-owner assertions failed before correction; 41 loading/composition tests pass. Real Chromium verifies one request during repeated busy Enter/Space, exhaustion focus with preventScroll, fitting temporary tabindex cleanup and authored tabindex preservation.

Final combined targeted verification: 121 tests, full core types and zero-warning CI lint pass. The current spec-owner, deciding-owner/date and authored-size holds remain. No lifecycle change, size exception, new authority or merge is claimed. Older full-suite receipts remain tied to their recorded heads.

Keyboard activation with standing selection

Restacked onto the activation keyboard-selection correction without changing loading behavior. The required canLoad fixture field remains here, not in the activation predecessor. Combined activation/loading/protocol/count regressions: 97 tests pass; full core types pass.

Changed-source CI lint passes with zero errors/warnings. Existing owner/spec and authored-size holds remain; no approval, exception or lifecycle change is claimed. Older receipts retain their recorded head bindings.

Row-virtualization dependency refresh

Spec #7972 is merged and current. This same PR is rebased onto the row-specific useTableRowsVirtualization dependency in #8280. Relative to its previous version, plugin behavior is unchanged. Generated public API reports and registry entries are aligned. Table.virtualization stays unchanged; the old hook alias is absent.

Verification: 841 Table tests/48 files, core types/build, generated API check, strict zero-warning changed-source lint, knowledge/baseline/pre-review and actual 2k/1k Chromium examples pass. Seven exact-delta tests pass after a test-only loop-brace lint correction. The fresh independent review found no rename-specific source/browser defect. Existing authored-size and broader release requirements remain; the PR stays draft, with no runtime merge. Older evidence retains its actual source bindings.

Unsupported-mode diagnostics and runnable example

The hook now emits the current FR13/DEC-7 development diagnostic through its existing per-instance deduplicated runtime.diagnose owner when Table has no render context, uses children mode or rejects flat-row admission. The transform still returns the exact previous wrapper props: no command, observer, request or empty-state change is added outside admission. The private type predicate now describes its actual admitted literal values.

Five real assertion failures reproduced the missing warnings (children/tree/grouped/undeclared modifier/missing context); 46 targeted loading/composition tests and core types pass after correction. Strict changed-source lint, core build, generated API report check, knowledge and current baseline/pre-review checks pass. A minimal public InfiniteScrollHookUsage block names useTableInfiniteScroll in exampleFor, shows caller-owned rows/loading/Promise completion and has CLI patch coverage; its generated registry route is the only route addition.

A fresh independent source/browser review verifies deduplicated diagnostics and the supported manual loading path. Exact-head browser evidence exercises the public runnable example through exhaustion, including focus handoff and unchanged row semantics. The earlier authority hold is resolved by the merged current contract; authored-size and release requirements remain separate. This update does not change the PR lifecycle or merge any runtime PR.

Example static-export route correction

Lists /templates/InfiniteScrollHookUsage/ alongside the inherited virtualization example route. The canonical export-contract test reproduced exactly the omitted new example paths; all six route-contract tests pass after the correction. Compared with the preceding published PR version, only apps/sandbox/scripts/next-export-routes.json changes. Runtime source and behavior are byte-identical.

This corrects the proven route-inventory mismatch, not a claim that the hosted deployment has finished. Authored-size disposition, numerical performance/accessibility release evidence and unresolved compatibility-owner decisions remain separate. No runtime merge or lifecycle change is performed.

Parent numbering and focus-island correction

Windowed row-index cells consume the parent Table logical position instead of a second data/key lookup. The lazy legacy lookup remains for ordinary rendering; custom start offsets retain full-render fallback. A removed focused key clears its retained island, while the existing focus note returns genuinely detached focus through the shared owner. Restoring that key does not recreate an island. Formatting and local consumer documentation are corrected.

Two regression assertions failed before correction: a same-array appended row had an empty number despite aria-rowindex=5, and restoring a removed key recreated its offscreen island. The 39-test virtualization regression set and 120 restacked plugin tests pass in separate runs. Core types, strict changed-source lint, core build/API check, knowledge/pre-review and formatting pass.

All 11 native-browser functional stages pass. The harness's final console-error assertion still reports an unclassified resource 404; a fully clean browser run is not claimed. A separate pre-existing same-array, same-length canonical-identity cache gap remains: numerical reorder checks prove positions only, not canonical-key or focus safety. Final-state screenshots are not matched before/after visual or motion certification.

The row-status composition decision, authored-size disposition and numerical performance/accessibility release requirements remain open. No new public API, spec approval, size exception or runtime merge is claimed. The same activation/loading PRs are restacked with their plugin behavior unchanged. Earlier receipts retain their actual source-head bindings.

Numeral overflow and fallback-focus repair

Measured four-digit row numbers can exceed the original 48px column and become an ellipsis. The existing mounted-geometry validator now compares actual numeral text bounds and ancestor padding for recognized logical row-number cells, and restores the existing full-render fallback when they do not fit. It does not widen only the header or change column floors, pinned offsets, container padding or generic data-cell truncation. The row context-provider shape remains stable across fallback, preserving surviving focused control nodes. Context type declarations now precede the TablePlugin pipeline JSDoc, so the documentation belongs to its actual declaration.

Proof on the virtualization head: 46 targeted regression tests and types/strict current-repair lint/build/API/knowledge checks pass. The prior overflow and surviving-focus assertions failed before correction. Six native layout checks pass: balanced, spacious, inherited 24px edge padding, pinned and 24px code-font conditions restore full legacy wrapping without ellipsis; compact RTL remains windowed because 1001 fits. The original 48px column and following pinned offset remain unchanged. A separate native pointer test preserves the same connected and focused input through 9 mounted rows becoming full 2,000-row rendering. All 135 combined plugin/fallback regression tests, final core types, declaration binding and build/API/pre-review checks pass on the restacked head. The activation and loading hook bodies are byte-identical to their previous versions.

Limits remain explicit: fallback restores complete wrapped numerals, not a new single-line typography design. Native pointer continuity is not keyboard traversal, motion or AT certification. Scale/zoom transformations are not certified; the existing one-pixel tolerance remains. The rejection latch retries changed data/key/config inputs, not column-only changes. Full rendering after overflow is O(N). The canonical-identity cache issue, authored-size disposition, numerical performance/memory and dedicated accessibility release requirements, and undecided row-status composition remain open. No public API shape, specification approval, lifecycle transition or runtime merge is performed. Previous receipts remain tied to their actual source versions.

Expansion identity and owned-viewport repair

The earlier stable-provider change left an afterRow branch outside that provider. Expansion could therefore replace its ordinary data row and focused chevron. The row and optional detail panel now occupy fixed child slots under the same provider; falsey panel omission remains unchanged. Separately, a caller scrollWrapper could be treated as a virtual viewport without attaching Table's geometry owner. Windowing now admits the privately registered Table-owned wrapper only; caller wrappers keep ordinary full rendering, their styles and composition, with a deduplicated diagnostic when virtualization is requested. No public registration/root API or second geometry observer is added.

The targeted assertions failed before correction: the original expanded row/control disconnected, a divider override was lost, and a caller wrapper mounted only 10 data rows instead of all 50. The virtualization stage passes all 727 Table tests in 38 files. The final restacked Table suite passes 852 tests, and core types, strict repair-file lint, build/API, knowledge and pre-review checks pass. The activation/loading hook bodies remain unchanged.

Matched native source checks use the same fixture/routes and 1200x760 viewport. Enter on the second row's chevron previously left focus on BODY; opening and closing now retain the original row, control and focus. At scrollTop56000, the caller viewport previously contained an inaccessible gap and no visible data; it now contains all 2,000 rows with visible products and no virtual marker. Source/version association is parent-attested, not an independently hashed browser module bundle. Independent exact-source review and image inspection found no new defect in this repair.

Earlier numeral-overflow/fallback-focus and documentation fixes are retained. Authored-size disposition, row-status composition approval, numerical performance/memory and dedicated accessibility release evidence remain open. Targeted keyboard proof is not full spoken-AT, motion or production certification. No lifecycle transition, review approval or runtime merge is performed; previous evidence remains tied to its actual versions.

Shared diagnostic and focus-selector ownership

Per-instance warning deduplication now belongs to one internal factory in the existing devWarning utility. The render-safe useDevWarning wrapper and the activation/loading runtime callbacks share it instead of maintaining separate message Sets. The imperative form is necessary because plugin transforms and observer callbacks cannot invoke React hooks; the hook still sends diagnostics after commit. Public once-per-mount behavior uses one stable key, while runtime/per-message warnings keep one key per reason. Prefixes remain current, actual remounts obtain new histories and production stays silent. The factory is not added to public barrel/package exports.

Temporary focusability now uses the existing canonical FOCUSABLE_SELECTOR rather than a copied string. Authored tabindex, native/editable guards, modality/options forwarding and owned cleanup remain intact. No public API, extra observer or row/request-state owner is added.

Proof: two ownership assertions failed before correction. The helper/runtime contract set passes147 tests; the final combined Table, disclosure, warning and focus suite passes1468 tests. Strict repair-file lint, full core types, build/API/knowledge/pre-review and exact intermediate checks pass. Native StrictMode proof shows two instances emitting six path warnings, no repeats across three rerenders and twelve after actual remount. A separate native Tab/Enter exhaustion test exercises the supported manual-load path with IntersectionObserver unavailable: focus returns to the Table group with a temporary tabindex, and successor focus releases it. This is not normal-observer lifecycle, full AT, motion or production certification. Browser runtime-to-source binding remains parent-attested.

Earlier row-number, expansion continuity, viewport admission and documentation fixes are retained. Existing authored-size disposition, row-status/API/example ownership decisions, canonical identity limitations and numerical performance/memory/accessibility release requirements remain open. No lifecycle transition, reviewer approval or runtime merge is performed.

@vercel

vercel Bot commented Oct 24, 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 4, 2026 1:33am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 4, 2026, 1:46 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from ee5df46 to f37e24e Compare October 24, 2026 18:17
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from 30953a0 to 4fafa8e Compare October 24, 2026 18:17
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from f37e24e to 867a1cd Compare October 27, 2026 04:05
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from 4fafa8e to 521d8f0 Compare October 27, 2026 04:05
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from 521d8f0 to cf40b91 Compare October 27, 2026 20:07
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 867a1cd to 53409ee Compare October 27, 2026 20:07
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from cf40b91 to e363b1a Compare October 27, 2026 20:46
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 53409ee to 6a12764 Compare October 27, 2026 20:46
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 6a12764 to 4726cb2 Compare October 27, 2026 21:46
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from e363b1a to 6292167 Compare October 27, 2026 21:46
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from 6292167 to 1cd0b10 Compare October 27, 2026 22:35
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 4726cb2 to 1af260f Compare October 27, 2026 22:35
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-infinite-scroll-v1 branch from 1cd0b10 to 3b967a5 Compare October 28, 2026 01:24
@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 1af260f to 0ad3b25 Compare October 28, 2026 01:24

@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 is on hold for an engineering owner's decision, not for code changes: useTableInfiniteScroll answers the open questions OQ1-OQ8 of module:Table/useTableInfiniteScroll, which is still a draft on main, and the Table rows it feeds (FR20, FR22, DEC-4, DEC-5) are not current yet. The decision covers the Promise-only onLoadMore, the always-present Load more button and its focus hand-off at exhaustion, the failure pause with manual retry, zero look-ahead and the remount reset. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. No independent code defects were found.

[Automated review]

@humbertovirtudes
humbertovirtudes force-pushed the feat/table-activation-v1 branch from 0ad3b25 to 507361a Compare October 28, 2026 02:06

@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 is on hold for an engineering owner's decision, not for code changes: useTableInfiniteScroll and the TablePlugin.renderState protocol it adds have no current governing spec (module:Table/useTableInfiniteScroll is still a draft on main, and this PR answers its open questions OQ1–OQ8), and hiding the default EmptyState while an empty table loads changes current component:Table FR8, so that record needs updating too. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request or by saying which answers must change, and the author may do so as an engineering owner. No code defect was found at this revision, and the stacked prerequisite pull requests still need to land first.

[Automated review]

@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 is on hold for an engineering owner's decision on the contract this pull request implements: module:Table/useTableInfiniteScroll is still a draft on main (its shape is blocked on OQ1-OQ8), the new TablePlugin.renderState, TableRenderContext.canLoad and blockViewport protocol and the new @astryxdesign/core API rows have no current record, and hiding the default EmptyState while an empty table loads changes current Table FR8. An engineering owner records that decision by commenting /approve-spec <full head SHA> (the author can do this as an engineering owner) or says what must change, including whether the missing exampleFor template block for the new hook lands here or goes to an issue. Separately, one fix is needed whatever the decision:

  • useTableInfiniteScroll.tsx:307-322 copies retainViewportFocus from plugins/virtualization/useTableWindow.ts:147-162 for the same Table Scroll region; move that helper where both modules can import it and call it from setButton.

[Automated review]

Comment on lines +307 to +322
if (destination?.isConnected) {
const needsTabIndex = !destination.hasAttribute('tabindex');
if (needsTabIndex) {
resourcesRef.current.releaseFocus?.();
destination.setAttribute('tabindex', '-1');
const release = () => {
destination.removeEventListener('blur', release);
if (destination.getAttribute('tabindex') === '-1') {
destination.removeAttribute('tabindex');
}
resourcesRef.current.releaseFocus = null;
};
resourcesRef.current.releaseFocus = release;
destination.addEventListener('blur', release, {once: true});
}
focusForLastInput(destination, {preventScroll: true});

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.

This repeats retainViewportFocus in plugins/virtualization/useTableWindow.ts:147-162 for the same Scroll region (runtime.viewport): the temporary tabindex="-1", the once blur cleanup and focusForLastInput(node, {preventScroll: true}). Two copies drift: a fix to one (for example restoring an authored tabindex value) misses the other. Move the helper where both modules can import it, call it here and keep the dispose it returns as releaseFocus.

rowModel: 'flat',
renderState: runtime.renderState,
transformScrollWrapper(props, context) {
// Parent owns admission diagnostics and suppresses conflicting empty state.

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: the parent reports no loading admission (its diagnostics cover owner conflict, identity and windowing fallback), so the first clause is not true. Suggested: // Table hides its default empty row while this source loads.

Comment thread packages/core/src/Table/BaseTable.tsx Outdated
Comment on lines +595 to +596
// A primitive bitset is a stable aggregate snapshot for independent loading
// and incremental availability; existing loading-only sources remain valid.

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: two topics in one sentence, and the second narrates compatibility. Suggested: // useSyncExternalStore needs a stable snapshot. A number compares by value.

@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, because module:Table/useTableInfiniteScroll is still a draft on main and this pull request answers its open questions: the Promise-only onLoadMore, the always-present Load more Button and its exhaustion focus hand-off, the TablePlugin.renderState protocol with its new core API rows, and hiding the default EmptyState while an empty table loads (current Table FR8). An engineering owner records that decision by commenting /approve-spec <full head SHA> or by saying which part must change, and the author may do so as an engineering owner; the decision should also say whether the missing exampleFor template block for the new hook lands here or goes to an issue. Independently, please route the exhaustion focus hand-off in useTableInfiniteScroll.tsx through the shared noteFocusWithin/moveFocusLeftBehind path, as row windowing does for the same Scroll region, instead of its own focus check in the Button's ref.

[Automated review]

Comment on lines +297 to +313
if (
node === null &&
previous &&
!runtime.config.hasMore &&
previous.ownerDocument.activeElement === previous
) {
// A parent's ref may detach during this same mutation phase before
// reattachment. Retain only its last committed, still-connected destination.
const destination =
runtime.context?.viewport.current ?? resourcesRef.current.viewport;
if (destination?.isConnected) {
resourcesRef.current.releaseFocus?.();
resourcesRef.current.releaseFocus = focusForLastInputTemporarily(
destination,
{preventScroll: true},
);
}

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.

This checks for lost focus itself in the ref and then calls focusForLastInputTemporarily, while utils/focusReturn.ts owns that concern through noteFocusWithin and moveFocusLeftBehind, which row windowing already uses for the same Scroll region (plugins/virtualization/useTableWindow.ts:330-349). Suggested: note focus with noteFocusWithin when the Button takes focus, call moveFocusLeftBehind(note, context.viewport.current, null, {preventScroll: true}) from the surface's layout effect in the commit that removes the Button, and drop this branch.

@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: module:Table/useTableInfiniteScroll is still a draft on main, and this pull request answers its open questions (the Promise-only onLoadMore, the always-present Load more Button and its exhaustion focus hand-off, the failure pause and the remount reset), adds the TablePlugin.renderState protocol with new core API rows, and hides the default EmptyState while an empty table loads, which changes current Table FR8. An engineering owner records that decision by commenting /approve-spec <full head SHA> or by saying which part must change, and the author may do so as an engineering owner; the decision should also say whether the missing exampleFor template block for the new hook lands here or goes to an issue. The earlier focus hand-off finding is fixed, and no other code change is needed.

[Automated review]

rowModel: 'flat',
renderState: runtime.renderState,
transformScrollWrapper(props, context) {
// Table hides its default empty row while this source loads.

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 comment sits above the admission check, so it reads as describing that branch. It states why the plugin needs no empty-row handling, which belongs beside renderState: runtime.renderState, two lines up.

@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: module:Table/useTableInfiniteScroll is still a draft on main, and this pull request answers its open questions (the Promise-only onLoadMore, the always-present Load more Button and its exhaustion focus hand-off, the failure pause and the remount reset), adds the TablePlugin.renderState protocol with new core API rows, and hides the default EmptyState while an empty table loads, which changes current Table FR8. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request or by saying which part must change, and the author may do so as an engineering owner. The decision should also say whether the missing exampleFor template block for the new hook lands here or goes to an issue. No other blocking change is needed.

[Automated review]

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

Recommending approval: useTableInfiniteScroll and the Table render-state protocol it feeds follow the current module:Table/useTableInfiniteScroll and component:Table specs, and the missing development warning for children-mode and non-flat tables from the previous review is fixed and tested.

  • This pull request targets the activation branch, so it can land only after the activation and virtualization pull requests it is stacked on.
  • Non-blocking: the per-instance warning set in runtime.diagnose repeats the one in useTableActivation; a shared per-instance helper in utils/devWarning.ts could serve both later.

[Automated review]

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

Recommending approval: useTableInfiniteScroll and the Table render-state protocol it feeds follow the current module:Table/useTableInfiniteScroll and component:Table specs. The tests cover the shared request latch, the failure pause, the busy Load more Button, the exhaustion focus hand-off, the hidden default empty state while loading and the unknown windowed row total.

There are no blocking findings; this can land once the activation and virtualization pull requests it is stacked on have landed.

  • Non-blocking: two new comments in useTableInfiniteScroll.tsx can be shortened to plain sentences (inline suggestions).

[Automated review]

Comment on lines +206 to +208
// Release loading resources at latch acquisition, even when immediate
// fulfillment coalesces away a rendered busy phase. Preserve visibility
// until native reacquisition supplies the post-batch geometry.

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 plain style): "coalesces away a rendered busy phase" is hard to parse. Suggested:

// Stop observation when the latch is set. A fast Promise can settle
// before any busy render. Keep the visibility flag: the next native
// entry reports the geometry after the new rows.

Comment on lines +253 to +254
// Grid gives the existing content box the table's intrinsic inline extent,
// without size containment suppressing its contribution to shrink-to-fit hosts.

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): one sentence carries two topics, and the second describes the containment this replaced. Suggested:

// Grid sizes the content box to the table's inline extent.
// A shrink-to-fit host still gets that width.

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

Recommending approval: useTableInfiniteScroll and the Table render-state protocol it feeds follow the current module:Table/useTableInfiniteScroll and component:Table specs. The tests cover the shared request latch, the failure pause, the busy Load more Button, the exhaustion focus hand-off, the hidden default empty state while loading and the unknown windowed row total.

There are no blocking findings; this can land once the activation and virtualization pull requests it is stacked on have landed.

  • Non-blocking: two new comments in useTableInfiniteScroll.tsx can be shortened to plain sentences (inline suggestions).

[Automated review]

Comment on lines +206 to +208
// Release loading resources at latch acquisition, even when immediate
// fulfillment coalesces away a rendered busy phase. Preserve visibility
// until native reacquisition supplies the post-batch geometry.

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 plain style): "coalesces away a rendered busy phase" is hard to parse. Suggested:

// Stop observing now. A request that fulfills at once may never render a busy state.
// Keep the visibility flag. The next observer entry updates it after the new rows render.

Comment on lines +253 to +254
// Grid gives the existing content box the table's intrinsic inline extent,
// without size containment suppressing its contribution to shrink-to-fit hosts.

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): one sentence carries two topics, and the second describes the containment this replaced. Suggested:

// Grid makes the content box as wide as the table.
// Size containment here would collapse shrink-to-fit hosts.

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

Requesting changes: useTableInfiniteScroll and the Table render-state protocol it feeds follow the current module:Table/useTableInfiniteScroll and component:Table specs, and the tests cover the shared request latch, the failure pause, the busy Load more Button, the exhaustion focus hand-off, the hidden default empty state while loading and the unknown windowed row total. One shared-code fix is needed first.

  • createRuntime keeps its own per-instance warning dedupe (useTableInfiniteScroll.tsx:93 and :117-122), a third copy of what hooks/useDevWarning.ts and the activation store already do; add one per-instance helper beside devWarn in utils/devWarning.ts, call it from each Table runtime, and delete the local Sets.

Non-blocking: two new comments in useTableInfiniteScroll.tsx can be shortened to plain sentences (inline suggestions). After the fix, this can land once the activation and virtualization pull requests it is stacked on have landed.

[Automated review]

Comment on lines +117 to +122
diagnose(message: string) {
if (process.env.NODE_ENV !== 'production' && !diagnostics.has(message)) {
diagnostics.add(message);
devWarn('useTableInfiniteScroll', message);
}
},

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.

Blocking (shared path): this per-instance dedupe (with the diagnostics Set at line 93) repeats useWarning in hooks/useDevWarning.ts and the activation store's diagnose. The hook form cannot run inside a plugin transform or an observer callback, so extend the shared owner instead of copying it: add one per-instance helper beside devWarn in utils/devWarning.ts, for example

export function createDevWarnings(component: string): (message: string) => void {
  const warned = new Set<string>();
  return message => {
    if (!warned.has(message)) {
      warned.add(message);
      devWarn(component, message);
    }
  };
}

then use diagnose: createDevWarnings('useTableInfiniteScroll') here, the same in useTableActivation, and delete both local Sets.

Comment on lines +206 to +208
// Release loading resources at latch acquisition, even when immediate
// fulfillment coalesces away a rendered busy phase. Preserve visibility
// until native reacquisition supplies the post-batch geometry.

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 packs two topics and an idiom ("coalesces away a rendered busy phase"). Suggested rewrite:

// Disconnect when the latch is set. A fast fulfilment can skip the busy render.
// Keep the visibility flag. The next observer reports the new geometry.

Comment on lines +253 to +254
// Grid gives the existing content box the table's intrinsic inline extent,
// without size containment suppressing its contribution to shrink-to-fit hosts.

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): the second line narrates the size containment this replaced. Suggested rewrite:

// Grid makes the content box as wide as the table.
// A shrink-to-fit host still sizes to the table.

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

Recommending approval: useTableInfiniteScroll and the Table render-state protocol it feeds follow the current module:Table/useTableInfiniteScroll and component:Table specs, and the earlier shared-code finding is fixed now that the hook uses the shared development-warning helper. The tests cover the shared request latch, the failure pause, the busy Load more Button, the exhaustion focus hand-off, the hidden default empty state while loading and the unknown windowed row total.

Non-blocking: two new comments in useTableInfiniteScroll.tsx can be shortened to plain sentences (inline suggestions). This can land once the activation and virtualization pull requests it is stacked on have landed.

[Automated review]

Comment on lines +203 to +205
// Release loading resources at latch acquisition, even when immediate
// fulfillment coalesces away a rendered busy phase. Preserve visibility
// until native reacquisition supplies the post-batch geometry.

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 style): this packs two topics and an idiom ("coalesces away a rendered busy phase"). A plainer version that keeps only the reason:

Suggested change
// Release loading resources at latch acquisition, even when immediate
// fulfillment coalesces away a rendered busy phase. Preserve visibility
// until native reacquisition supplies the post-batch geometry.
// Stop observing when the latch is set, not when the busy state renders.
// An immediate result can skip that render. Keep the last visibility
// until the next observer reports the new geometry.

Comment on lines +250 to +251
// Grid gives the existing content box the table's intrinsic inline extent,
// without size containment suppressing its contribution to shrink-to-fit hosts.

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 style): the second clause describes size containment, which the code does not use. Keep only the reason:

Suggested change
// Grid gives the existing content box the table's intrinsic inline extent,
// without size containment suppressing its contribution to shrink-to-fit hosts.
// Grid stretches the content box to the table's inline extent.
// The table width still reaches shrink-to-fit hosts.

This diff was generated with AI assistance (Navi).
Tags: ai-generated

Independent review fixes preserve legacy appends, fallback wrapping, caller-owned attributes and fine-grained row updates.

Clarify and implement parent-owned unknown row totals for admitted incremental loading; past approval does not cover the new protocol claim.

Preserve keyboard attributes across activation ref handoffs; cover rerender, StrictMode and caller-affordance restoration. Fix test-inclusive TypeScript and lint errors. AI-assisted changes.

Keep associated control labels and disclosure summaries inside their native interaction boundary; real-Table regression coverage. AI-assisted changes.

Repair fallback observation admission, strict-lint ownership and forced-colours/diagnostic boundaries. AI-assisted changes.

Repair legacy row-render and interface compatibility, generated registry routes and story types. Split activation and loading runtime support into their owning PRs. AI-assisted changes.

Avoid count-only row invalidation from a loading-state source; real incremental rendering regression and strict test lint repair. AI-assisted changes.

Preserve selection and pinned-column append cost with private count-consumer registration; stage protocol and consumer docs only in their introducing PR. AI-assisted changes.

Preserve active cues above pinned overlays and reset inherited cue width at every row boundary. AI-assisted changes.

Keep custom row totals fresh, explain window admission fallbacks, trim unused loading protocol and registration formatting churn. AI-assisted changes.

Track actual immutable row-count reads without imposing count invalidation on legacy plugins; refresh canonical identity on mutable data-length changes. AI-assisted changes.

Preserve offscreen row focus when the browser document loses focus; keep wide Table loading reachable on horizontal scroll. AI-assisted changes.

Clarify runtime Table windowing admission while preserving the exported props interface. No approval or runtime behavior change. AI-assisted changes.

Preserve native loading extent anchors, intrinsic Table sizing and per-instance diagnostics. AI-assisted changes.

Declare first-party flat Table modifiers in the canonical admission contract. This diff was generated with AI assistance (Navi).
Tags: ai-generated

Keep forced-colour current-row marker separate from focus and restore owner-only empty-plugin warnings. This diff was generated with AI assistance (Navi).
Tags: ai-generated

Use the row-specific useTableRowsVirtualization public hook and config type. Include its runnable CLI example and generated public API/registry contracts. Runtime behavior is unchanged.

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

Recommending approval: useTableInfiniteScroll and the Table render-state protocol follow the current module:Table/useTableInfiniteScroll and component:Table records, and the unit, composition and Chromium checks show the shared request latch, failure pause, busy Button focus, exhaustion focus hand-off, empty-loading state and unknown row total working as specified. It can land once the activation and virtualization pull requests below it have landed.

  • Before the stack reaches main, the module's remaining verification rows still need to land: the browser accessibility spec the record names (axe, keyboard, touch and zoom flows), the AR2 busy-transition count, and the Table.perf.test.tsx extensions.
  • The two optional comment-style rewrites already suggested inline on useTableInfiniteScroll.tsx still apply.

[Automated review]

This branch was successfully deployed

1 active deployment
Preview — d8d329ae Deployed Nov 4, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant