An open source design system that's fully customizable and agent ready
TypeScript
spec(Table): complete approved flat-data v1 contracts
Humberto Virtudesc1ba7f39e8d8
diff --git a/docs/specs/components/Table/Table.spec.md b/docs/specs/components/Table/Table.spec.mdindex 1651f175e7..e919e9a4fb 100644--- a/docs/specs/components/Table/Table.spec.md+++ b/docs/specs/components/Table/Table.spec.md@@ -1,13 +1,13 @@---schema_version: 3-template_version: 3+template_version: 7kind: componentid: component:Tableauthority: currentarchive_reason: nullsuperseded_by: null-approved_by: cixzhang-approved_at: 2026-09-01+approved_by: humbertovirtudes+approved_at: 2026-11-03owners: [cixzhang]review_triggers: [public-api, behavior, layout, theming, accessibility]verified_by:@@ -34,7 +34,7 @@ modules:module:Table/useTableActivation,module:Table/useTableInfiniteScroll,module:Table/useTableRowStatus,- module:Table/useTableVirtualization,+ module:Table/useTableRowsVirtualization,module:Table/useTableColumnResize,]families: []@@ -52,31 +52,54 @@ system_specs: [spec:AST-025]# Table component contract+## Contract at a glance++| Area | Contract |+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | The shared plugin protocol exposes optional immutable render context, declared row-model/whole-row ownership, and an observable `renderState` source with immutable loading/availability snapshots. `Table.virtualization` accepts the opaque capability from `useTableRowsVirtualization` together with data and explicit `idKey`. |+| Behavior | Table validates one canonical identity, admits compatible flat-row compositions, plans windows before cell construction, and coordinates one viewport, logical row sequence and paint resolution. |+| End-user impact | Row activation remains independent from selection; loaded rows keep state and focus, and large flat tables bound mounted work without changing native table semantics. |+| Builder impact | Existing use without the new capabilities is unchanged. Windowing requires explicit identity and fixed-height layout; arbitrary row/detail/tree output does not silently enter the supported mode. |+| Compatibility/readiness | Opt-in protocol additions preserve legacy row keys and body-relative ARIA without opt-in. New capabilities require their implementation and browser/performance verification before release. |+| Review checks | Reject a second key extractor, order-selected whole-row owners, rendering all cells before slicing, parallel scroll ownership, independent overlay writers or window-relative accessibility metadata. |+| Governing rules | Table owns the parent protocol; module records own capability behavior. Shared viewport behavior follows `spec:AST-025`; API caller burden follows `architecture:public-component-api`. |++This table is a review projection; the body below is authoritative.+## Intent-Table presents consistently structured data in semantic rows and columns. This-contract records its current aggregate anatomy, parent-owned target inventory,-stable sorting, selection, expansion, and empty-state parts, and the shared-`TablePlugin` protocol through which public modules compose. Module-local API,-generated anatomy, accessibility, migration, and evidence belong to each listed-`module:*` record.+Table presents consistently structured data in semantic rows and columns. It owns+aggregate anatomy, the shared plugin protocol, canonical identity, render admission,+logical row metadata and coordinated scrolling. Each module owns its independent+public behavior and evidence, without privately replacing the Table renderer.## Compatibility and migration-- Released default preserved: `no`; data-driven columns with omitted `width`- keep their equal flexible share plus a compact 60px readability floor rather- than collapsing toward zero. A column overrides that floor with- `proportional(value, {minWidth})`. When those floors no longer fit, the existing Table Scroll- region overflows horizontally. Explicit pixel and proportional widths are unchanged.-- Compatibility class: standards-conformance bug fix; no public prop, semantic- Table element, or Scroll-region behavior changes. 0.7.0 removes the deprecated- `base-table` target alias while preserving `table`.-- Controlled/uncontrolled behavior: unchanged-- FR15 adds `useTableRowExpansion`'s optional `animatedLayout` option, an- additive change; without it, rows change at once as before.-- Migration decision: `spec:AST-025` FR12, FR14, FR19, FR21, and DEC-1; replace- `base-table` theme keys and `.astryx-base-table` selectors with `table` and- `.astryx-table`, or run `astryx upgrade --from 0.6.3 --apply --path .`+- Released default preserved: yes for capability opt-in. Without activation or+ virtualization, legacy reconciliation keys, body-relative `rowIndexStart` and+ `rowCount`, children composition, column floors and scroll behavior remain unchanged.+- FR15 retains the approved row-expansion animatedLayout decision, including the no-glide boundary for grid/column dividers; these flat-data capabilities do not implement or amend that motion contract.+- Compatibility class: additive parent protocol and fixed-height windowing opt-in.+ Optional context arguments preserve existing shorter transform callbacks.+- Controlled/uncontrolled behavior: caller data, ordering, selection, activation,+ expansion and loading remain caller-owned. Dataset/order changes use new data+ references in the opt-in identity/windowing path; mutable-compatible `T[]` types+ do not freeze caller data. Adding/removing identity-dependent capability mode+ is an explicit Table remount boundary; changing `activeKey`, eligibility or+ geometry inside that mounted mode is not a remount boundary.+- Retained width compatibility (DEC-2): the compact floor for an explicit column+ with omitted width is 60px rather than a zero-width flexible share. Per-column+ `proportional(value, {minWidth})` overrides that floor; explicit widths remain+ unchanged and insufficient room uses the existing inline Scroll region. This+ existing default correction is not described as preservation of its former+ floor merely because the new capabilities are opt-in.+- Retained scroll/target compatibility (DEC-1): shared viewport behavior follows+ `spec:AST-025` FR12, FR14, FR19 and FR21. Effective keyboard access, fitting+ pass-through and inline containment remain on the existing wrapper/content box.+ The canonical `table` target replaces the removed `base-table` alias; consumer+ migration instructions remain with the public docs and release owner.+- Migration decision: DEC-1/DEC-2 govern those retained corrections; DEC-4/DEC-5+ govern the capability additions and their distinct opt-in/remount boundary.Consumer migration instructions belong in consumer docs and release notes.@@ -84,34 +107,27 @@ Consumer migration instructions belong in consumer docs and release notes.**Owns**-- The Table and Scroll region, the aggregate Header section, Body section,- conditional Footer section, Row, Column header cell, and Cell anatomy, and the- eight current `table*` targets mapped below.-- The stable Sort control and Sort priority rendered by useTableSortable.-- The stable Expansion control and Expanded detail panel rendered by- useTableRowExpansion.-- Placement of selection-plugin CheckboxInput controls in generated header and- body cells.-- The shared `TablePlugin` transform surface, phase order, sequential composition,- named-plugin ordering, slot protocol, failure isolation, and stable plugin-array- identity used by every Table module.+- Table, Scroll region and observed content box, Header, Body, conditional Footer,+ Row, Column header cell and Cell, and their eight canonical targets.+- Stable sort/selection/expansion placement and default empty-state composition.+- Shared transforms, sequential phase order, named ordering, slot protocol,+ failure isolation and stable plugin-array identity.+- Canonical key resolution and opt-in validity, row classification, declared+ whole-row conflict handling, immutable transform context and pre-cell render planning.+- The coordinated viewport, logical positions and parent row-paint resolution.**Does not own / non-goals**-- CheckboxInput visuals, Icon glyphs, or the default EmptyState surface; those- remain owned by their respective components.-- Cell values, custom cell renderers, custom empty states, footer content, or- expanded detail content supplied by the caller.+- Module-local callbacks, load completion/retry, active-state meaning, window+ range/focus policy or performance targets; their module records own them.+- CheckboxInput/Icon/EmptyState visuals, caller cell/detail/footer content,+ product ordering, fetching, caching, routing and stale product responses.+- New targets or corrections of existing target-reachability gaps.- Pagination, filtering, column-management, tree, grouping, sticky-column, orcontext-menu anatomy beyond the stable parts explicitly recorded here.-- The public API, generated columns or other anatomy, internal precedence,- accessibility, migration, performance evidence, or theming decisions of an- independently contractible module. `module:Table/useTableRowStatus` owns those- concerns for `useTableRowStatus`.-- New targets for current untargeted plugin parts, or correction of current- target-reachability gaps.-- New public API, theme target, or alias, beyond `useTableRowExpansion`'s- optional `animatedLayout` option (FR15).+- Tree, grouping, expanded details, arbitrary structural row replacement or+ variable-height content in the fixed-height v1 admission domain.+- A global correction of legacy nonvirtualized paginated ARIA.- TableHeader, TableBody, TableFooter, and TableRow element contracts;`component:TableHeader`, `component:TableBody`, `component:TableFooter`, and`component:TableRow` own them.@@ -121,35 +137,90 @@ Consumer migration instructions belong in consumer docs and release notes.## Public concepts-Table records two aggregate public concepts without duplicating module-local APIs:--| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |-| ----------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------- | -------------------------- | ----------------- | --------- | ------------------------------------------------------------------------------------------------------------- |-| Plugin collection | Named `Record<string, TablePlugin<T>>` or absent | Adds ordered transformations to the data-driven Table pipeline. | Data-driven Table | Absent | `component:Table` | Stable | Development warns for unknown transform keys, non-functions, and empty plugins; unsupported keys are ignored. |-| Plugin transform | Column, element-render-prop, scroll-wrapper, or context transform | Changes one owned pipeline phase while preserving the common `TablePlugin` protocol. | According to the transform method | Omitted methods are no-ops | `component:Table` | Stable | A throwing transform is isolated and the prior accumulated value continues. |--Consumer data, columns, props, module signatures, defaults, and usage remain-documented in `Table.doc.mjs` and the member and module docs.+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |+| -------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- | ---------------------------------------- | --------------------- | --------- | ------------------------------------------------------------------------------------------------------------ |+| Plugin collection | Named record or absent | Ordered `TablePlugin` contributions | Data mode | Absent | Table | Stable | Development warns for unknown transform keys, non-functions and empty plugins; unsupported keys are ignored. |+| Plugin transform | Column, element, wrapper, context | One sequential parent phase | Applicable phase | Omitted is a no-op | Table | Stable | Throw preserves accumulated value |+| Render mode | `data`, `children` | Actual parent rendering branch, including empty data | Render/wrapper context | Parent-derived | Table | Stable | New data-only capability is inert in children mode |+| Canonical key | String or finite number; missing/invalid/duplicate | One resolved identity for callbacks, state and reconciliation | Explicit identity opt-in | Existing `idKey` | Table | Stable | Invalid activation is inert; windowing fully renders with a diagnostic |+| Transform context | `TableRowContext`, `TableRenderContext` | Parent-owned immutable semantic facts and stable viewport reference | Optional fourth row-transform, sixth cell-transform and second wrapper-transform argument | Supplied by Table | Table | Stable | Missing context disables the dependent capability |+| Row model | `flat`, `tree`, `grouped`, `detail`, `custom` | Plugin's declared structural row model | `TablePlugin.rowModel` | No claim for an undeclared body modifier | Table | Stable | Unsupported model disables the new flat-only capabilities |+| Whole-row owner | `activation`, `expansion`, `navigation`, absent | Plugin's declared whole-row interaction, not ordinary analytics/controls | `TablePlugin.wholeRowOwner` | Absent | Table | Stable | Competing claims neutralize activation independent of order |+| Module render-state source | Stable `subscribe`, `getSnapshot`, `getServerSnapshot` with immutable `{isLoading, hasMore?}` | Drives loading-sensitive parent rendering before sections are built | Optional `TablePlugin.renderState` | Absent | Table | Stable | Missing source preserves ordinary empty rendering |+| Windowing capability | Opaque `TableVirtualizationCapability` or absent | Fixed-height pre-cell planning from `useTableRowsVirtualization` | `Table.virtualization` in data mode with explicit `idKey` | Absent | Table/module boundary | Stable | Invalid geometry/content falls back to full rendering |++Public availability is stable from first release; compatibility is additive.++`TableRowContext` supplies canonical `key`, `identityStatus` (`valid`, `missing`,+`invalid`, `duplicate`), row `kind` (`product`, `synthetic`, `unknown`), zero-based+`logicalIndex`, `logicalRowCount`, `headerRowCount` and the render context.+An admitted flat product dataset has `kind=product`; an unsupported structural+model may expose `unknown` rather than inventing a synthetic/product distinction.+The new flat-only capabilities are inactive for that model before row transforms.+`TableRenderContext` supplies `mode`, admitted row model, logical/header counts+and a stable parent-owned viewport reference. Context is semantic output, not a+caller-maintained second data/key/offset bundle; changing a referenced viewport+notifies resource consumers through the shared owner.++A body-row transform keeps its existing props/item/index arguments and may consume+an optional fourth context; a body-cell transform keeps its existing five arguments+and may consume the same context as an optional sixth argument. A wrapper transform+may consume an optional second render context. The row index is the logical index+in the complete input dataset, never renumbered because only a window is mounted.+Default and recognized row-index cell consumers receive that same parent position,+without building a second sliced-data/key lookup. Legacy row-index configuration+continues outside virtual mode; explicit nondefault position overrides conflict with+the virtual sequence and take the full-render fallback. Missing context from a+manual legacy transform call is not fabricated by a module.++`TablePlugin.renderState` optionally supplies a stable external-store source with+`subscribe`, `getSnapshot` and `getServerSnapshot`. Its immutable snapshot contains+`isLoading: boolean` and optional `hasMore: boolean`; the loading module publishes+both from the same controlled configuration and request lifetime. The snapshot is+referentially stable until either value changes; Table consumes it before building+sections. FR20 owns row-count interpretation: an admitted contribution with+`hasMore=true` marks a windowed table's remote total unknown, independently of its+current busy state. Absent `hasMore` makes no incremental-total claim. The source+introduces no caller-owned loading client, total-count prop or extra hook input.+It communicates a plugin's otherwise opaque in-flight latch before parent section+construction; `emptyState` alone accepts caller content but cannot observe that+module-owned request state without duplicating it in the caller. This is a plugin+protocol capability, not a new specialized caller loading prop. Explicit caller+empty content and `false` retain precedence over automatic default-message+suppression. Without a render-state contribution, ordinary EmptyState behavior is+unchanged. Loading and viewport changes+notify their real shared owner, rather than relying on mutations of a ref as the+sole source of rendered output.++Consumer data, columns, props, module signatures and usage remain documented in+`Table.doc.mjs` and the member and module docs.## Behavioral and layout contract-| ID | Invariant | Basis | Evidence state |-| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| FR1 | By default, Styled Table renders one named Scroll region around one observed content box and one semantic Table. The Scroll region takes the Table's own name (its `aria-labelledby`, else its `aria-label`), and a generic table name only when the Table has none. The Scroll region enters the keyboard order and contains inline overscroll only while inline content effectively overflows; fitting content passes scroll gestures to its ancestor. Explicit scroll-wrapper plugin HTML attributes remain authoritative. | `spec:AST-025` FR12, FR14, FR19, FR21; current source, docs, and tests | Verified fitting and inline-overflow transitions through the shared `useScrollableArea` behavior core |-| FR2 | Data-driven mode renders a Body section and a Header section with Column header cells when columns are present. Each data item renders a standard Row and Cells; an empty data array instead renders the configured empty-state row when enabled. It never creates a Footer section. Each Column header cell shows its column's `header`, and the column `key` only when `header` is omitted, `null`, or `undefined`; any other `header` renders as React renders it, so `header: ''`, the blank header of an actions column, renders an empty Column header cell, not the key (`architecture:react-component-runtime` INV16). | Current source, docs, and tests | Verified current behavior; no new behavior decided |-| FR3 | Children mode passes caller composition through to the Table. TableHeader, TableBody, and TableFooter provide the respective sections, and TableRow, TableHeaderCell, and TableCell provide standard rows and cells. | Current source, docs, and tests | Verified current composition; no new API or DOM rule |-| FR4 | `Table.doc.mjs` is the canonical aggregate consumer owner for the eight current targets: `table`, `table-scroll-wrapper`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-cell`, and `table-header-cell`. Member docs retain direct lookup metadata through `subComponentOf: 'Table'`. | Current docs and CLI target tests | Verified parent ownership; focused placement coverage is partial |-| FR5 | For a sortable column, useTableSortable renders a Sort control around the column label, an Icon-owned Sort indicator glyph, and a numeric Sort priority only while multi-sort has more than one active entry. | Current source, docs, and tests | Control and priority are tested; glyph presence is source-inspected only |-| FR6 | useTableSelection renders CheckboxInput-owned Selection controls in the generated selection Column header cell and each selectable body Cell; selection remains row state rather than separate anatomy. | Current source, docs, and tests | Verified stable delegated controls; no target or state change |-| FR7 | For an expandable row, useTableRowExpansion renders an Expansion control with an Icon-owned Expansion glyph and conditionally appends an Expanded detail panel whose cell spans the column count captured by that plugin's `transformColumns` step. | Current source, docs, and tests | Verified stable plugin parts; current target gaps remain |-| FR8 | Empty data renders the default compact EmptyState unless the caller supplies replacement content or disables it. | Current source, docs, and tests | Verified conditional delegation; caller content remains outside ownership |-| FR9 | Table converts the caller's named plugin record into one ordered array after its built-in styling plugin. Known names use the current canonical sequence `columnSettings → sort → tree → selection → pagination`; every other name follows that known set while preserving its record insertion order. | Current source and docs | Current shared ordering; canonical-name coverage is source-inspected |-| FR10 | Every applicable non-context transform runs sequentially in the resolved plugin-array order, so a later plugin receives the value returned by every earlier successful plugin. A throwing transform reports a development error and leaves the prior accumulated value in the pipeline. | Current source and tests | Sequential composition is tested; failure isolation is source-inspected |-| FR11 | `transformColumns` completes before element transforms. Table then applies table, header-cell/header-row, body-cell/body-row, scroll-wrapper, and context phases at their render points. Header-cell contributions use `before`, `content`, `after`, `overlay`, and `below` slots. Context transforms run in reverse so the first plugin becomes the outermost provider. | Current source, types, and tests | Transform application is tested; complete cross-phase order is source-inspected |-| FR12 | When built-in and named plugin references are unchanged, Table reuses the resolved plugin array; unknown/custom plugin value identity and insertion order remain stable inputs to memoization. | Current source and performance tests | Current performance contract; focused named-order coverage is partial |-| FR13 | In data-driven mode, each explicit column whose `width` is omitted keeps one equal flexible share and a 60px readability floor. A column sets its own floor with `proportional(value, {minWidth})`, which replaces the 60px floor for that column; Table has no table-wide floor setting. Resolution is a pure function of the final column definitions: row values, rendered header/body measurement, locale, sorting, filtering, virtualization, and loading state do not change any floor. Explicit pixel and proportional widths retain their authored floors. When the resolved floors exceed available inline space, the existing Scroll region provides horizontal overflow. | `component:Table/DEC-2`; current source and tests | Verified by width-resolution unit coverage and the ResponsiveScroll real-browser geometry fixture |-| FR14 | Wherever Table shows a row divider, including while rows glide and in pinned columns, the divider has the width, style and colour the row's border would have: the theme's tokens and any app override on `tr`, `tbody` or `td` borders, so customizations still show. | `component:Table/DEC-3` | Verified by row-expansion glide unit coverage and real-browser divider checks, pinned cells and an open panel included; a transient 1 px WebKit pinned-cell step is a recorded gap |-| FR15 | `useTableRowExpansion` takes an `animatedLayout` option, the handle `spec:AST-105` FR1 defines: when an Expanded detail row opens, the panel plays in and the rows after it glide to their new places; when one closes, it hides at once and the rows after it glide up into its space (`spec:AST-105` Coverage). The Expansion glyph turns on the same motion; under reduced motion the rows move without travel (`spec:AST-105` FR4). Without the option, rows change at once. A table that draws column lines (`dividers="grid"` or `"columns"`) does not glide yet: with the option its panel and rows change at once, as without it, and the glyph keeps its own turn. | `spec:AST-105` FR1, FR4; owner decision, 2026-10-26 | Opening and closing glides, the case without a handle, the glyph's turn, reduced motion and column lines are tested; the panel's entrance and its hide on close are source-inspected |+| ID | Invariant | Basis | Evidence state |+| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| FR1 | By default, Styled Table renders one named Scroll region around one observed content box and one semantic Table. The Scroll region takes the Table's own name (its `aria-labelledby`, else its `aria-label`), and a generic table name only when the Table has none. Its applicable axis is inline without windowing and both inline/block with admitted windowing. The viewport enters the keyboard order while at least one applicable axis effectively overflows. Inline overscroll is contained only while inline scrolling is effective; block chaining stays allowed, and fitting content passes gestures to its ancestor. Explicit scroll-wrapper plugin HTML attributes remain authoritative. | `spec:AST-025` FR12, FR14, FR19, FR21; current source, docs, and tests | Legacy inline entry/containment verified; both-axis opt-in entry requires implementation evidence |+| FR2 | Data-driven mode renders a Body section and a Header section with Column header cells when columns are present. Without windowing, each data item renders a standard Row and Cells; FR18 limits row/cell construction to the admitted mounted plan. Empty data renders the configured empty-state row when enabled, subject to FR22's default initial-loading suppression. It never creates a Footer section. Each Column header cell shows its column's `header`, and the column `key` only when `header` is omitted, `null`, or `undefined`; any other `header` renders as React renders it, so `header: ''`, the blank header of an actions column, renders an empty Column header cell, not the key (`architecture:react-component-runtime` INV16). | Current source, docs, and tests | Legacy rendering verified; FR18/FR22 exceptions require implementation evidence |+| FR3 | Children mode passes caller composition through to the Table. TableHeader, TableBody, and TableFooter provide the respective sections, and TableRow, TableHeaderCell, and TableCell provide standard rows and cells. | Current source, docs, and tests | Verified current composition; no new API or DOM rule |+| FR4 | `Table.doc.mjs` is the canonical aggregate consumer owner for the eight current targets: `table`, `table-scroll-wrapper`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-cell`, and `table-header-cell`. Member docs retain direct lookup metadata through `subComponentOf: 'Table'`. | Current docs and CLI target tests | Verified parent ownership; focused placement coverage is partial |+| FR5 | For a sortable column, useTableSortable renders a Sort control around the column label, an Icon-owned Sort indicator glyph, and a numeric Sort priority only while multi-sort has more than one active entry. | Current source, docs, and tests | Control and priority are tested; glyph presence is source-inspected only |+| FR6 | useTableSelection renders CheckboxInput-owned Selection controls in the generated selection Column header cell and each selectable body Cell; selection remains row state rather than separate anatomy. | Current source, docs, and tests | Verified stable delegated controls; no target or state change |+| FR7 | For an expandable row, useTableRowExpansion renders an Expansion control with an Icon-owned Expansion glyph and conditionally appends an Expanded detail panel whose cell spans the column count captured by that plugin's `transformColumns` step. | Current source, docs, and tests | Verified stable plugin parts; current target gaps remain |+| FR8 | Empty data renders the default compact EmptyState unless the caller supplies replacement content or disables it, with FR22 suppressing only the default during admitted initial loading. | Current source, docs, and tests | Legacy delegation verified; FR22 loading exception requires implementation evidence |+| FR9 | Table converts the caller's named plugin record into one ordered array after its built-in styling plugin. Known names use the current canonical sequence `columnSettings → sort → tree → selection → pagination`; every other name follows that known set while preserving its record insertion order. | Current source and docs | Current shared ordering; canonical-name coverage is source-inspected |+| FR10 | Every applicable non-context transform runs sequentially in the resolved plugin-array order, so a later plugin receives the value returned by every earlier successful plugin. A throwing transform reports a development error and leaves the prior accumulated value in the pipeline. | Current source and tests | Sequential composition is tested; failure isolation is source-inspected |+| FR11 | `transformColumns` completes before element transforms. Table then applies table, header-cell/header-row, body-cell/body-row, scroll-wrapper, and context phases at their render points. Header-cell contributions use `before`, `content`, `after`, `overlay`, and `below` slots. Context transforms run in reverse so the first plugin becomes the outermost provider. | Current source, types, and tests | Transform application is tested; complete cross-phase order is source-inspected |+| FR12 | When built-in and named plugin references are unchanged, Table reuses the resolved plugin array; unknown/custom plugin value identity and insertion order remain stable inputs to memoization. | Current source and performance tests | Current performance contract; focused named-order coverage is partial |+| FR13 | In data-driven mode, each explicit column whose `width` is omitted keeps one equal flexible share and a 60px readability floor. A column sets its own floor with `proportional(value, {minWidth})`, which replaces the 60px floor for that column; Table has no table-wide floor setting. Resolution is a pure function of the final column definitions: row values, rendered header/body measurement, locale, sorting, filtering, virtualization, and loading state do not change any floor. Explicit pixel and proportional widths retain their authored floors. When the resolved floors exceed available inline space, the existing Scroll region provides horizontal overflow. | `component:Table/DEC-2`; current source and tests | Verified by width-resolution unit coverage and the ResponsiveScroll real-browser geometry fixture |+| FR14 | Wherever Table shows a row divider, including while rows glide and in pinned columns, the divider has the width, style and colour the row's border would have: the theme's tokens and any app override on `tr`, `tbody` or `td` borders, so customizations still show. | `component:Table/DEC-3` | Verified by row-expansion glide unit coverage and real-browser divider checks, pinned cells and an open panel included; a transient 1 px WebKit pinned-cell step is a recorded gap |+| FR15 | `useTableRowExpansion` takes an `animatedLayout` option, the handle `spec:AST-105` FR1 defines: when an Expanded detail row opens, the panel plays in and the rows after it glide to their new places; when one closes, it hides at once and the rows after it glide up into its space (`spec:AST-105` Coverage). The Expansion glyph turns on the same motion; under reduced motion the rows move without travel (`spec:AST-105` FR4). Without the option, rows change at once. A table that draws column lines (`dividers="grid"` or `"columns"`) does not glide yet: with the option its panel and rows change at once, as without it, and the glyph keeps its own turn. | `spec:AST-105` FR1, FR4; owner decision, 2026-10-26 | Opening and closing glides, the case without a handle, the glyph's turn, reduced motion and column lines are tested; the panel's entrance and its hide on close are source-inspected |+| FR16 | Activation and windowing use one explicit canonical `idKey`. Property keys resolve valid strings/finite numbers through the existing string projection; function keys retain string/finite-number type. Missing, null, nonprimitive, nonfinite and duplicate values are invalid for these opt-ins. Table validates the complete logical dataset on data/key changes and supplies status; activation is inert on invalid rows and windowing falls back to full rendering. Internal type-tagged reconciliation keys distinguish numeric `0` from string `"0"` without changing callback equality. Invalid fallback keys are deterministic per record but promise no preserved state under invalid identity. Legacy keys without these opt-ins remain unchanged. | DEC-4; identity and compatibility boundary | Specified; release verification required |+| FR17 | Table supplies immutable `TableRowContext` and `TableRenderContext` rather than requiring module extractors or DOM mode inference. Row model and whole-row owner declarations precede eligibility/element transforms. Flat capability admission excludes tree/grouped/detail/custom structural output and unknown body modifiers without a compatible declaration. First-party `useTableSelection` and `useTableStickyColumns` declare `rowModel: 'flat'`; their selection cells and pinned-cell wrappers preserve flat product-row structure. More than one whole-row owner claim, including repeated activation entries, neutralizes activation in either plugin order, preserves the old owners and non-owning handlers, and emits one development diagnostic. A custom callback that owns a whole-row action must declare it; Table never infers arbitrary callback intent. | DEC-4; shared protocol | Specified; release verification required |+| FR18 | `Table.virtualization` is an opaque geometry capability; runtime admission requires data mode, explicit identity and constrained content together. The optional prop preserves the exported Table props interface; invalid combinations take the diagnostic full-render fallback. Table resolves complete input order, columns and identity, then plans mounted keyed records and inaccessible gaps before cell construction. Only mounted product/focus-island records enter element transforms. Default virtualized cells use existing single-line `textOverflow="truncate"`; explicit wrap, arbitrary row/cell renderers or unsafe structural output falls back to full rendering. Without opt-in, default wrapping and ordinary rendering remain unchanged. | DEC-5; native rendering and bounded work | Specified; release verification required |+| FR19 | Windowing uses the existing Table viewport/content-box composition on both logical axes with a bounded block size. Effective inline overflow contains chaining; block chaining remains allowed. Keyboard access, logical mapping, sticky/header/column behavior and geometry consumers share that owner, stable refs, pooled resize work and at most one scroll subscription/pending frame. No module creates a parallel ScrollableArea, detector or unknown external root. Modules without a Table block viewport may use viewport intersection; absent wrapper/context does not fabricate an after-table surface. | DEC-5; `spec:AST-025` FR12/FR18/FR19 | Specified; release verification required |+| FR20 | In virtualized flat nonempty data, the parent logical sequence assigns header indices 1 through H and product row i index H+i+1. Table owns `aria-rowcount`: it is `-1` while any currently admitted incremental-loading render-state contribution reports `hasMore=true`, including idle, busy and retry-paused states; otherwise it is the complete current count H+N. Loading publishes availability, not a separate total or ARIA writer, and virtualization consumes this same parent rule. Appending while more data remains does not turn the unknown total into a loaded-row count; exhaustion makes the total exact and renewed availability makes it unknown again. Visible numbering derives i+1 from the same zero-based index. Inaccessible gaps are excluded. Logical parity/final-row state, not gap-relative DOM position, controls striping/dividers. Caller legacy offsets/counts conflict with this mode and cause full-render fallback rather than a second source of truth. Empty data uses the existing placeholder/disabled-empty branch without a virtual metadata override. Nonvirtualized paginated metadata remains unchanged. | DEC-5; complete semantic sequence | Specified; release verification required |+| FR21 | Selection and activation publish semantic row state to one parent-coordinated paint resolution path. Selection wash wins while selected with row highlight enabled; otherwise activation's component fallback may apply, and the activation-owned non-colour cue remains independent. `hasRowHighlight=false` removes only selection wash. One effective overlay reaches ordinary/pinned cells and gives the same output for selection-first or activation-first updates; clearing either state restores the other applicable state, hover/striping and focus. No competing module writer removes another module's overlay or changes selection semantics. | Shared row-state ownership; activation presentation boundary | Specified; release verification required |+| FR22 | A loading module's stable render-state source notifies Table before section construction. Table resolves current data-mode, flat-model and wrapper admission first and ignores loading contributions from unsupported or no-chrome configurations. While admitted complete data is empty and effective loading is true, Table suppresses only the default EmptyState; explicitly caller-owned empty/error content remains caller-controlled. Completion/reset restores ordinary empty behavior if appropriate. If exhaustion removes the focused manual command, or virtual-row removal otherwise detaches current focus, the existing focus owner moves focus first to the named Table Scroll region with `preventScroll`, using temporary programmatic-only focusability when it has no sequential stop. No move occurs when the caller already moved focus to a surviving successor or focus already left the removed subtree; the temporary attribute is removed/restored on departure without changing explicit caller attributes. | Loading/render and focus ownership boundary | Specified; release verification required |### Current evidence and gaps@@ -195,16 +266,16 @@ documented in `Table.doc.mjs` and the member and module docs.### Representative states-| State | Required invariant | Allowed variation |-| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |-| Data-driven rows | Scroll region contains Table, Header section when columns exist, Body section, and one standard Row with Cells per data item. | Counts, values, density, dividers, and cell content. |-| Width-less explicit columns | Every omitted-width column remains equally flexible above a 60px floor; combined floors trigger the existing Scroll region only when they no longer fit. | Row values, header nodes, sorting/filtering, virtualization, loading or empty rows, direction, and responsive container width. |-| Empty data | Body section contains default EmptyState unless replaced or disabled. | Caller replacement content or no empty state. |-| Children mode | Caller-supplied sections are passed directly to Table. | Header, Body, and Footer section presence and content. |-| Sortable column | Column header cell contains Sort control and Sort indicator glyph. | Direction and conditional multi-sort priority. |-| Selectable rows | Selection controls occupy generated header and body cells. | Checked, indeterminate, disabled, or absent per row. |-| Expandable row | Expansion control occupies a generated Cell; open state adds the detail panel after its row using the expansion plugin's captured column count. | Expanded state, caller detail content, and later plugin column transforms. |-| Multiple plugins | Built-in styling runs first, then named plugins compose in the resolved order; later transforms receive earlier results. | Supported transform subset, custom names, and omitted phases. |+| State | Required invariant | Allowed variation |+| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |+| Data-driven rows | Scroll region contains Table, Header when columns exist, and Body; one Row with Cells per item without windowing, or only FR18's mounted plan with windowing. | Counts, values, density, dividers, and cell content. |+| Width-less explicit columns | Every omitted-width column remains equally flexible above a 60px floor; combined floors trigger the existing Scroll region only when they no longer fit. | Row values, header nodes, sorting/filtering, virtualization, loading or empty rows, direction, and responsive container width. |+| Empty data | Default EmptyState is present unless replaced/disabled or FR22 suppresses it during admitted initial loading; ordinary empty output resumes on completion. | Caller replacement content or no empty state. |+| Children mode | Caller-supplied sections are passed directly to Table. | Header, Body, and Footer section presence and content. |+| Sortable column | Column header cell contains Sort control and Sort indicator glyph. | Direction and conditional multi-sort priority. |+| Selectable rows | Selection controls occupy generated header and body cells. | Checked, indeterminate, disabled, or absent per row. |+| Expandable row | Expansion control occupies a generated Cell; open state adds the detail panel after its row using the expansion plugin's captured column count. | Expanded state, caller detail content, and later plugin column transforms. |+| Multiple plugins | Built-in styling runs first, then named plugins compose in the resolved order; later transforms receive earlier results. | Supported transform subset, custom names, and omitted phases. |### Transformation and precedence order@@ -221,6 +292,14 @@ documented in `Table.doc.mjs` and the member and module docs.transforms they contribute, but they do not redefine aggregate phase ornamed-plugin ordering.+- **ORD5 - Opt-in preparation.** Resolve declared row-model/whole-row admission and+ canonical identity, consume stable render-state sources, and prepare the logical+ window/gap plan before section/cell construction. Row/cell contexts derive from+ that same plan; wrapper chrome does not privately slice already-built rows.+- **ORD6 - Empty/loading and focus.** FR22 gates effective loading by admitted mode,+ replaces only the default initial empty message, and keeps exhaustion focus+ return with the existing command/Scroll-region owner.+### Performance and resources- **PR1 - Stable plugin array.** Table reuses the resolved plugin array while the@@ -228,7 +307,12 @@ documented in `Table.doc.mjs` and the member and module docs.when the caller recreates the containing record.- **PR2 - Module ownership.** Each module owns any stronger render, allocation,listener, observer, or initialization constraint created by its transforms.- Table owns only the common array and transform pipeline cost.+ Table owns the common array/transform pipeline, opt-in O(N) canonical-identity+ validation on data/key changes, the pre-cell mounted render plan, and its one+ shared viewport/content observation and bounded pending frame. A current-window+ scroll performs no O(N) identity pass. The virtualization module's PR budgets+ constrain its use of that parent path; stronger independent module work remains+ with that module.- **PR3 - Static width resolution.** Explicit-column floors resolve in the existingO(column count) pass without DOM measurement, observers, extra render passes, ordependence on row values. The server and client therefore derive the same inline@@ -236,36 +320,40 @@ documented in `Table.doc.mjs` and the member and module docs.## Accessibility contract-By default, the Scroll region is named as a `group`, enters sequential keyboard-navigation only while inline overflow is effective, and keeps native Arrow/Page-scrolling. A scroll-wrapper plugin may explicitly override its HTML accessibility-attributes. Losing overflow removes future default tab stops without moving current-focus. Effective inline scrolling contains overscroll at its edge; fitting content-leaves page scrolling available. Native table semantics, column-header scope, sort-`aria-sort`, selection `aria-selected`, CheckboxInput labels, and expansion-`aria-expanded` remain unchanged. Each public module owns accessibility introduced-by its transforms; the shared pipeline does not confer correctness on module output.+The Scroll region is named as a `group`. Without windowing, inline is its+applicable axis; admitted windowing makes inline and block applicable. The default+viewport is a sequential keyboard stop while at least one applicable axis can+scroll, so fitting columns never hide a vertically windowed Table's Arrow/Page+scrolling path. A fitting viewport has no default sequential stop. Explicit+scroll-wrapper accessibility props remain authoritative, and removing overflow+does not move or blur existing focus. Effective inline overflow contains+overscroll; block chaining remains allowed. On focused-command or virtual-row+removal, the shared focus owner may use temporary programmatic-only focusability+as FR22 specifies without adding a lasting tab stop or stealing caller-moved+focus. Native Table structure, header scope, sort/selection/expansion semantics+remain independently owned; the shared pipeline never confers correctness on a+module's output.## Design relationships-| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |-| --------------------- | --------------------------------------------------------------------------------- | ------------------------------ | -------------- | ------------------ |-| Table | Groups the semantic table structure. | Current source and public docs | Supporting | FR1-FR4 |-| Scroll region | Provides keyboard-reachable horizontal overflow around Table. | Current source and public docs | Supporting | FR1, FR4 |-| Header section | Groups Column header cells separately from body data. | Current source and public docs | Supporting | FR2-FR4 |-| Column header cell | Identifies one column and hosts optional header controls. | Current source and public docs | Prominent | FR2-FR6 |-| Sort control | Activates sorting for one sortable column. | Current source and public docs | Prominent | FR5 |-| Sort indicator glyph | Shows the current sort direction through Icon. | `component:Icon` | Supporting | FR5 |-| Sort priority | Shows a column's position in active multi-sort order. | Current source and public docs | Supporting | FR5 |-| Selection control | Selects all eligible rows or one eligible row through CheckboxInput. | `component:CheckboxInput` | Prominent | FR6 |-| Body section | Groups data, empty-state, and expanded-detail rows. | Current source and public docs | Supporting | FR2-FR4, FR7, FR8 |-| Row | Groups standard header, body, or footer cells. | Current source and public docs | Supporting | FR2-FR4, FR6 |-| Cell | Contains one value or caller-provided content in a standard body or footer row. | Current source and public docs | Prominent | FR2-FR4, FR6, FR7 |-| Default empty state | Communicates that the current data array has no rows through EmptyState. | `component:EmptyState` | Prominent | FR8 |-| Expansion control | Expands or collapses one eligible row. | Current source and public docs | Prominent | FR7 |-| Expansion glyph | Shows the current expansion direction through Icon. | `component:Icon` | Supporting | FR7 |-| Expanded detail panel | Presents caller-provided detail content in a spanning row below the expanded row. | Current source and public docs | Prominent | FR7 |-| Footer section | Groups caller-supplied summary or total rows below the body. | Current source and public docs | Supporting | FR3, FR4 |+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |+| --------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -------------- | ------------------ |+| Table | Groups the semantic table structure. | Current source and public docs | Supporting | FR1-FR4 |+| Scroll region | Provides keyboard-reachable overflow on applicable axes; inline normally, inline and block with admitted windowing. | Current source and public docs | Supporting | FR1, FR4 |+| Header section | Groups Column header cells separately from body data. | Current source and public docs | Supporting | FR2-FR4 |+| Column header cell | Identifies one column and hosts optional header controls. | Current source and public docs | Prominent | FR2-FR6 |+| Sort control | Activates sorting for one sortable column. | Current source and public docs | Prominent | FR5 |+| Sort indicator glyph | Shows the current sort direction through Icon. | `component:Icon` | Supporting | FR5 |+| Sort priority | Shows a column's position in active multi-sort order. | Current source and public docs | Supporting | FR5 |+| Selection control | Selects all eligible rows or one eligible row through CheckboxInput. | `component:CheckboxInput` | Prominent | FR6 |+| Body section | Groups data, empty-state, and expanded-detail rows. | Current source and public docs | Supporting | FR2-FR4, FR7, FR8 |+| Row | Groups standard header, body, or footer cells. | Current source and public docs | Supporting | FR2-FR4, FR6 |+| Cell | Contains one value or caller-provided content in a standard body or footer row. | Current source and public docs | Prominent | FR2-FR4, FR6, FR7 |+| Default empty state | Communicates that the current data array has no rows through EmptyState. | `component:EmptyState` | Prominent | FR8 |+| Expansion control | Expands or collapses one eligible row. | Current source and public docs | Prominent | FR7 |+| Expansion glyph | Shows the current expansion direction through Icon. | `component:Icon` | Supporting | FR7 |+| Expanded detail panel | Presents caller-provided detail content in a spanning row below the expanded row. | Current source and public docs | Prominent | FR7 |+| Footer section | Groups caller-supplied summary or total rows below the body. | Current source and public docs | Supporting | FR3, FR4 |### Theming anatomy@@ -331,9 +419,11 @@ for this aggregate ownership.`family:layout-regions`.- `architecture:interaction-modality` owns shared keyboard and pointer modality;Table and its plugins retain their current local interactions.-- `architecture:public-component-api` owns the stable props, components, hooks,- exports, and compatibility boundary; this record adds only- `useTableRowExpansion`'s optional `animatedLayout` option (FR15).+- `spec:AST-105` and FR15 retain the independently approved row-expansion animatedLayout decision.+- `architecture:public-component-api` owns stable public compatibility. Table's+ additions are optional transform context, the `rowModel`, `wholeRowOwner` and+ `renderState` plugin fields, and the atomic data-mode windowing opt-in;+ ordinary Table callers do not acquire new required fields.- `module:Table/useTableRowStatus` owns the row-status module's API, generatedanatomy, resolution and warning precedence, accessibility, performance,migration, and evidence. Table owns only the shared plugin protocol and its@@ -341,22 +431,23 @@ for this aggregate ownership.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |-| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |-| FR1-FR3 | `Table.test.tsx` render, structure, fit/overflow transitions, children-mode, section, and target assertions | Fitting and inline-overflowing data-driven tables, empty data, and children composition | Removing Table, Scroll region, observed content box, conditional keyboard access, or effective-axis containment fails existing role, structure, state, class, style, or prop-forwarding assertions; Row and Cell are conditional on rendered data or caller composition. Evidence gap: FR2's column `header` rule (the `key` fallback only when `header` is omitted, `null`, or `undefined`, so `header: ''` renders a blank header) is source-inspected; no test passes `header: ''`. | `audit:Table/anatomy` |-| FR4 | CLI discovery and API target tests plus source inspection | Direct member docs and unfiltered/scoped target output | Duplicating a parent/member target or changing the canonical owner fails parent-aware discovery assertions; section target placement remains source-inspected. | `audit:Table/theming` |-| FR5 | `plugins/sortable/useTableSortable.test.tsx`; the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`, self-tested by `useTableSortable.a11y.test.tsx`), which the Table binding composes onto the base Table contract for its sorted state (`__tests__/Table.a11y.test.tsx`, `__tests__/Table.a11y.chromium.spec.ts`); plus source inspection | Unsorted, ascending, descending, and multi-sort | Removing the Sort control, conditional priority, or ARIA state fails existing assertions. Removing the Sort indicator glyph does not currently fail a focused test; glyph presence and delegated Icon target placement remain source-inspected. | `audit:Table/anatomy` |-| FR6 | `plugins/selection/useTableSelection.test.tsx` | Select all, individual, disabled, and non-selectable | Removing header/body Selection controls or row selection state fails existing structure, label, interaction, and ARIA assertions; delegated CheckboxInput target placement remains source-inspected. | `audit:Table/anatomy` |-| FR7 | `plugins/rowExpansion/useTableRowExpansion.test.tsx` plus source inspection | Collapsed, expanded, and non-expandable rows | Removing the Expansion control, conditional detail panel, captured-count `colSpan`, or ARIA state fails existing assertions in the covered plugin order; later column transforms, delegated Icon target placement, and untargeted panel wrappers remain source-inspected. | `audit:Table/anatomy` |-| FR8 | `Table.test.tsx` empty-state suite plus EmptyState public target metadata | Default, custom, disabled, and non-empty | Removing conditional empty behavior fails existing assertions; default EmptyState delegation remains source-inspected. | `audit:Table/anatomy` |-| FR9-FR11 | `Table.test.tsx`, `types.ts`, `BaseTable.tsx`, and `useBaseTablePlugins.ts` | Built-in plus known and custom named plugins; every transform phase | Sequential composition, base-before-user behavior, transform application, and slot output have focused coverage; complete known-name sorting, phase order, exception continuation, and context nesting remain source-inspected. | `audit:Table/plugins` |-| FR12, PR1 | `Table.perf.test.tsx` plus `useBaseTablePlugins.ts` source inspection | Same plugin references, recreated record, and changed plugin value | Unchanged plugin values must preserve the resolved array and representative no-op row-update budgets; focused named-record identity coverage remains partial. | `audit:Table/performance` |-| FR13, PR3 | `Table.test.tsx`, `plugins/columnResize/useTableColumnResize.test.tsx`, `plugins/stickyColumns/useTableStickyColumns.test.tsx`, and `Table.stories.tsx` ResponsiveScroll play assertions | Width-less columns with empty, short, and long-token rows; mixed explicit widths; pinned columns; narrow and fitting containers | Removing the 60px floor, deriving it from row content, changing explicit width semantics, desynchronizing resize bounds or sticky offsets, or preventing the existing Scroll region from activating fails focused unit or real-browser geometry assertions. | `audit:Table/layout` |-| FR14 | `__tests__/TableRowGlide.a11y.browser.spec.ts` screenshot checks of the divider mid-glide, in pinned columns, and under an open detail panel; `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` for the divider an open panel carries | a theme with a custom divider colour; an app override of a row's border; both mid-glide and on a pinned cell; an open detail panel's divider under the same theme and override | a divider whose width, style or colour differs from the row's border, or that drops a theme or app override, fails | `audit:Table/theming` |-| FR15 | `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` and `__tests__/TableRowGlide.a11y.browser.spec.ts`: row expansion with and without `animatedLayout`, plus source inspection of the panel's entrance and its hide on close | open and close with the handle; without it; reduced motion under a coarse and a fine pointer; a glyph turn beside the glide; a `dividers="grid"` and a `dividers="columns"` table with the option | rows that jump with the handle in a table without column lines, a closing panel that animates or leaves its space empty before the rows arrive, a panel and rows on different motion, a glyph on its own timing beside the glide, travel under reduced motion, or any motion without the handle a table with column lines that glides or animates its panel, or one whose glyph does not keep its own turn, fails | `audit:Table/plugins` |-| Accessibility contract | `__tests__/Table.a11y.test.tsx` and `__tests__/Table.a11y.chromium.spec.ts` bind Table to the base Table contract (`internal/a11y-spec`), composing each module's contract only for the states rendered with that module: the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`) for the sorted state; `__tests__/TableScroll.a11y.chromium.spec.ts` keeps the Scroll region evidence | Labelled data-driven, sorted descending, composed RTL with row headers, and empty data | Losing the table role or declared name, row, header, or cell roles, or a part leaving its row or the table, fails the base binding; a missing or stale `aria-sort` fails the composed sort module contract. | `audit:Table/accessibility` |-| Module backlink | `scripts/check-knowledge.mjs` | Active parent and colocated module record | A missing, duplicate, mis-parented, wrong-kind, misnamed, or undiscovered module record fails knowledge validation. | `audit:Table/modules` |-| Theming anatomy map | `scripts/check-knowledge.mjs`, `themingTargets.test.ts`, and CLI parent-aware target discovery tests | Canonical anatomy and eight current targets | Missing, extra, duplicated, prefixed, stale, or independently owned member mappings fail repository validation or discovery coverage. | `audit:Table/theming` |+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |+| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |+| FR1-FR3 | `Table.test.tsx` render, structure, fit/overflow transitions, children-mode, section, and target assertions | Fitting and inline-overflowing data-driven tables, empty data, and children composition | Removing Table, Scroll region, observed content box, conditional keyboard access, or effective-axis containment fails existing role, structure, state, class, style, or prop-forwarding assertions; Row and Cell are conditional on rendered data or caller composition. Evidence gap: FR2's column `header` rule (the `key` fallback only when `header` is omitted, `null`, or `undefined`, so `header: ''` renders a blank header) is source-inspected; no test passes `header: ''`. | `audit:Table/anatomy` |+| FR4 | CLI discovery and API target tests plus source inspection | Direct member docs and unfiltered/scoped target output | Duplicating a parent/member target or changing the canonical owner fails parent-aware discovery assertions; section target placement remains source-inspected. | `audit:Table/theming` |+| FR5 | `plugins/sortable/useTableSortable.test.tsx`; the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`, self-tested by `useTableSortable.a11y.test.tsx`), which the Table binding composes onto the base Table contract for its sorted state (`__tests__/Table.a11y.test.tsx`, `__tests__/Table.a11y.chromium.spec.ts`); plus source inspection | Unsorted, ascending, descending, and multi-sort | Removing the Sort control, conditional priority, or ARIA state fails existing assertions. Removing the Sort indicator glyph does not currently fail a focused test; glyph presence and delegated Icon target placement remain source-inspected. | `audit:Table/anatomy` |+| FR6 | `plugins/selection/useTableSelection.test.tsx` | Select all, individual, disabled, and non-selectable | Removing header/body Selection controls or row selection state fails existing structure, label, interaction, and ARIA assertions; delegated CheckboxInput target placement remains source-inspected. | `audit:Table/anatomy` |+| FR7 | `plugins/rowExpansion/useTableRowExpansion.test.tsx` plus source inspection | Collapsed, expanded, and non-expandable rows | Removing the Expansion control, conditional detail panel, captured-count `colSpan`, or ARIA state fails existing assertions in the covered plugin order; later column transforms, delegated Icon target placement, and untargeted panel wrappers remain source-inspected. | `audit:Table/anatomy` |+| FR8 | `Table.test.tsx` empty-state suite plus EmptyState public target metadata | Default, custom, disabled, and non-empty | Removing conditional empty behavior fails existing assertions; default EmptyState delegation remains source-inspected. | `audit:Table/anatomy` |+| FR9-FR11 | `Table.test.tsx`, `types.ts`, `BaseTable.tsx`, and `useBaseTablePlugins.ts` | Built-in plus known and custom named plugins; every transform phase | Sequential composition, base-before-user behavior, transform application, and slot output have focused coverage; complete known-name sorting, phase order, exception continuation, and context nesting remain source-inspected. | `audit:Table/plugins` |+| FR12, PR1 | `Table.perf.test.tsx` plus `useBaseTablePlugins.ts` source inspection | Same plugin references, recreated record, and changed plugin value | Unchanged plugin values must preserve the resolved array and representative no-op row-update budgets; focused named-record identity coverage remains partial. | `audit:Table/performance` |+| FR13, PR3 | `Table.test.tsx`, `plugins/columnResize/useTableColumnResize.test.tsx`, `plugins/stickyColumns/useTableStickyColumns.test.tsx`, and `Table.stories.tsx` ResponsiveScroll play assertions | Width-less columns with empty, short, and long-token rows; mixed explicit widths; pinned columns; narrow and fitting containers | Removing the 60px floor, deriving it from row content, changing explicit width semantics, desynchronizing resize bounds or sticky offsets, or preventing the existing Scroll region from activating fails focused unit or real-browser geometry assertions. | `audit:Table/layout` |+| FR14 | `__tests__/TableRowGlide.a11y.browser.spec.ts` screenshot checks of the divider mid-glide, in pinned columns, and under an open detail panel; `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` for the divider an open panel carries | a theme with a custom divider colour; an app override of a row's border; both mid-glide and on a pinned cell; an open detail panel's divider under the same theme and override | a divider whose width, style or colour differs from the row's border, or that drops a theme or app override, fails | `audit:Table/theming` |+| FR15 | `plugins/rowExpansion/useTableRowExpansion.glide.test.tsx` and `__tests__/TableRowGlide.a11y.browser.spec.ts`: row expansion with and without `animatedLayout`, plus source inspection of the panel's entrance and its hide on close | open and close with the handle; without it; reduced motion under a coarse and a fine pointer; a glyph turn beside the glide; a `dividers="grid"` and a `dividers="columns"` table with the option | rows that jump with the handle in a table without column lines, a closing panel that animates or leaves its space empty before the rows arrive, a panel and rows on different motion, a glyph on its own timing beside the glide, travel under reduced motion, or any motion without the handle a table with column lines that glides or animates its panel, or one whose glyph does not keep its own turn, fails | `audit:Table/plugins` |+| Accessibility contract | `__tests__/Table.a11y.test.tsx` and `__tests__/Table.a11y.chromium.spec.ts` bind Table to the base Table contract (`internal/a11y-spec`), composing each module's contract only for the states rendered with that module: the sort module contract (`plugins/sortable/__tests__/useTableSortable.a11y.ts`) for the sorted state; `__tests__/TableScroll.a11y.chromium.spec.ts` keeps the Scroll region evidence | Labelled data-driven, sorted descending, composed RTL with row headers, and empty data | Losing the table role or declared name, row, header, or cell roles, or a part leaving its row or the table, fails the base binding; a missing or stale `aria-sort` fails the composed sort module contract. | `audit:Table/accessibility` |+| FR16-FR22 | Pending parent protocol, render-count, API-compile, lifecycle and browser tests plus the module verification maps | Canonical type/key collisions; first-party flat declarations and diagnostic full-render fallbacks; invalid/unknown modes; both owner orders; optional context arities; full/empty/loading/windowed data; pinned paint; native focus and no-op frames | A second key/offset/renderer, order-selected owner, full cell work before slicing, stale source/ref, empty-loading contradiction, or removed focus destination fails | `audit:Table/plugins` |+| Module backlink | `scripts/check-knowledge.mjs` | Active parent and colocated module record | A missing, duplicate, mis-parented, wrong-kind, misnamed, or undiscovered module record fails knowledge validation. | `audit:Table/modules` |+| Theming anatomy map | `scripts/check-knowledge.mjs`, `themingTargets.test.ts`, and CLI parent-aware target discovery tests | Canonical anatomy and eight current targets | Missing, extra, duplicated, prefixed, stale, or independently owned member mappings fail repository validation or discovery coverage. | `audit:Table/theming` |## Decision log@@ -396,6 +487,37 @@ are pinned.Rejected: a drawn divider with its own fixed look.+### DEC-4 - Canonical identity and declared row ownership++**Reference:** `component:Table/DEC-4`+**Decider:** `humbertovirtudes`, `2026-11-03`++Identity, rendering mode and row classification are parent facts. Opt-in activation+and windowing consume one validated canonical key and immutable context; they do+not derive another key or use plugin names/private data prefixes to classify rows.+Type-tagged internal reconciliation keys preserve distinct valid canonical types.+Whole-row owners declare intent and conflicts neutralize activation independently+of insertion order, while non-owning handlers retain cancellation and side effects.+Legacy rendering is unchanged without these capabilities.++Rejected: inferring action ownership from arbitrary callback code or adding a second product-key extractor.++### DEC-5 - Window planning, logical positions and viewport stay in Table++**Reference:** `component:Table/DEC-5`+**Decider:** `humbertovirtudes`, `2026-11-03`++Table consumes the geometry-only virtualization capability with its complete data,+identity and columns. Admission and logical render planning happen before cells are+constructed; BaseTable remains the single native renderer. Context, full-table+positions, logical appearance and shared viewport/resize ownership are one parent+protocol. Fixed-height opt-in uses constrained truncation and full-render fallback+rather than clipping arbitrary content or silently altering legacy pagination.+The same coordinated row-paint path preserves selection and activation in either+update order.++Rejected: wrapper-only slicing, caller-spread data/offset bundles or a parallel Table/scroll renderer.+## Open questionsNone.diff --git a/docs/specs/components/Table/plugins/activation/useTableActivation.spec.md b/docs/specs/components/Table/plugins/activation/useTableActivation.spec.mdindex b85082aafc..0479eb09c8 100644--- a/docs/specs/components/Table/plugins/activation/useTableActivation.spec.md+++ b/docs/specs/components/Table/plugins/activation/useTableActivation.spec.md@@ -3,11 +3,11 @@ schema_version: 3template_version: 4kind: moduleid: module:Table/useTableActivation-authority: draft+authority: currentarchive_reason: nullsuperseded_by: null-approved_by: null-approved_at: null+approved_by: humbertovirtudes+approved_at: 2026-11-03owners: [cixzhang]review_triggers:[public-api, behavior, layout, theming, accessibility, interaction]@@ -33,222 +33,221 @@ references:## Contract at a glance-| Area | Contract |-| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| Public contract | Candidate `useTableActivation<T>` hook returning one `TablePlugin<T>` from controlled `activeKey`, `onActivate`, and optional row eligibility. V1 has one press interaction model and consumes Table's canonical resolved row key rather than introducing a second extractor. |-| Behavior | Eligible rows request activation from a primary pointer click or Enter/Space after earlier row handlers run. Cancellation, nested or portalled controls, repeated keys, and competing whole-row owners do not trigger duplicate activation; native row semantics remain intact. |-| End-user impact | People can keep one current row visually anchored while it drives adjacent detail or preview content, without losing cell controls or other Table behavior. |-| Builder impact | Builders own the active key and response to activation. The plugin owns row-state reflection and one whole-row activation path; it does not own routing, detail content, or selection. |-| Compatibility/readiness | Additive, unreleased module. This draft is not implementation authority. Canonical row identity, competing activation-owner enforcement, ineligible active-state treatment, and active-state paint require owner decisions before promotion. |-| Review checks | Reject selection coupling, a second row-key extractor, duplicate keys activating multiple rows, implicit navigation, button/link roles on `<tr>`, default `aria-current`, hover activation, non-primary or repeated activation, missing Enter/Space metadata, clobbered or uncancellable handlers, activation from nested/portalled controls or an in-row selection gesture, active paint that fails on pinned cells, and plugin identity churn for stable inputs. |-| Governing rules | `component:Table` FR9-FR12 and ORD1-ORD4 own plugin composition; `architecture:interaction-modality` owns shared input-modality rules; `architecture:public-component-api` and `spec:AST-002` own public caller burden; `spec:AST-009` owns accessibility-evidence escalation. |+| Area | Contract |+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | `useTableActivation<T>` returns one `TablePlugin<T>`; its only configuration fields are controlled `activeKey`, `onActivate`, and optional `getIsItemActivatable`. |+| Behavior | Eligible flat product rows request activation on primary click or Enter/Space after non-owning handlers; canonical identity, cancellation, descendant controls, and intersecting text selection gate the request. |+| End-user impact | One product row anchors adjacent detail or preview state without becoming selection, navigation, or focus ownership. |+| Builder impact | The caller supplies explicit stable unique `idKey`, controls the active key, and owns adjacent content; no second extractor, interaction mode, or theme state is public. |+| Compatibility/readiness | Additive and unreleased. The normative module and parent contracts are complete; implementation and release verification remain separate requirements. |+| Review checks | Reject implicit identity, multiple whole-row owners, non-flat opt-in, nested-control activation, competing paint writers, a colour-only active cue, pinned-cell divergence, or invented approval/evidence. |+| Governing rules | `component:Table` owns composition, including FR16-FR21 and DEC-4/DEC-5; shared modality, public API, theming, and evidence rules retain their owners. |-This table is a review projection; the body below is authoritative.+This table is a review projection; the body below defines the current contract.## Intent-`useTableActivation` gives a data-driven Table one controlled current product-row state-for master-detail, preview, and inspector layouts. It consumes identity through the-parent dependency in OQ6, requests activation, reflects active state, composes with-existing row behavior, and keeps state visually coherent through pinned cells.--Activation means “this row currently drives adjacent product state.” It is not a-selected-set operation, a navigation promise, or focus ownership. Those distinctions-are part of the module contract rather than left to each product implementation.+`useTableActivation` gives a flat data-driven Table one controlled current product row for master-detail, preview, and inspector layouts. It consumes parent-resolved identity, requests activation, and reflects state through existing row anatomy. Activation is neither a selected-set operation, a navigation promise, nor focus.## Compatibility and migration-- Released default preserved: `yes`; Table behavior remains unchanged unless the new plugin is supplied.-- Compatibility class: additive public hook, types, documentation, and examples.-- Migration decision: `module:Table/useTableActivation/DEC-1` after the remaining identity, ownership, eligibility, and active-presentation decisions are approved.+- Released default preserved: `yes`; the capability is opt-in and legacy callbacks retain their existing arguments and behavior.+- Compatibility class: additive unreleased hook; unsupported new-capability combinations are neutralised without disabling legacy plugins.+- Migration decision: `module:Table/useTableActivation/DEC-1` and DEC-5.-Consumer migration instructions belong in consumer docs and release notes.+Consumer signatures, imports, examples, and migration instructions belong in the module's consumer docs. This current record defines the complete normative module contract; implementation and release verification remain separate from owner approval.## Ownership boundary**Owns**-- The public `useTableActivation` hook, its configuration, and the controlled active-row contract.-- Consumption of Table's canonical resolved row key, row eligibility, activation request boundaries, and active-state reflection.-- Composition with existing row handlers and first-party Table plugins, including existing-handler-first cancellation through `preventDefault`.-- Suppression of accidental activation from nested or portalled interactive content, non-primary clicks, repeated key presses, and active text selection.-- Primary-pointer and Enter/Space parity while preserving native row semantics, prior focus ownership, and visible focus.-- One whole-row activation owner; selection, expansion, tree controls, and other non-owning row behavior may compose without duplicate activation.-- Active-row paint, pinned-cell coherence, accessibility, performance, and evidence.+- Controlled activation, product-row eligibility, request boundaries, and module-owned active-state reflection.+- Primary-click and Enter/Space parity, existing-handler-first cancellation, and descendant/portal/text-selection isolation.+- Contributions to the parent row-paint resolver, the active cue, bounded updates, and evidence obligations.**Does not own / non-goals**-- Aggregate `TablePlugin` protocol, transform order, failure isolation, or plugin-array identity — owned by `component:Table`.-- Selection state, checkbox semantics, or `aria-selected` — owned by `useTableSelection` and its caller.-- Routing, URLs, link semantics, or `aria-current="page"` — owned by a navigation surface, not activation.-- Adjacent detail content, preview loading, prefetching, or focus movement — owned by the product or another module.-- Cell controls. Buttons, links, inputs, editable content, and portalled controls remain independently operable and do not activate their row as a side effect.-- Hover-driven activation. Hover may remain a visual enhancement, but v1 never changes controlled active state from pointer movement alone.-- Children-mode rows. The plugin pipeline applies to data-driven rows only.-- A new public theme target. The active row remains part of the existing `table-row` anatomy unless a separate theming decision proves another owner is necessary.+- Aggregate plugin ordering, canonical identity validation, row-kind/admission metadata, whole-row ownership, render planning, viewport, and paint coordination: `component:Table`.+- Selection and `aria-selected` remain selection-owned; navigation-specific `aria-current` values such as `page`, `step` or `location` remain navigation-owned. This module owns only `aria-current="true"` identifying the eligible product row driving adjacent content; detail content and its loading remain caller-owned.+- Tree, grouped, expanded-detail, custom-row, or children-mode activation; hover activation; automatic focus movement or prefetching.+- A new public theme target or theme-authored `active` state in v1.## Public API and concepts-The candidate public shape is:--```ts-export interface UseTableActivationConfig<T extends Record<string, unknown>> {- activeKey: string | number | null;- onActivate: (item: T, key: string | number) => void;- getIsItemActivatable?: (item: T) => boolean;-}--export function useTableActivation<T extends Record<string, unknown>>(- config: UseTableActivationConfig<T>,-): TablePlugin<T>;-```+The public hook returns `TablePlugin<T>`. `activeKey` accepts `string | number | null`; `onActivate(item, key)` returns `void`; optional `getIsItemActivatable(item)` returns `boolean`. There are no other v1 configuration fields. The caller never needs a second key extractor or DOM marker convention.-Consumer docs own final signatures, defaults, imports, and examples after promotion.--| Concept | Closed values or states | Meaning | Default | Owner | Stability |-| -------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | --------------------------------- | ------------------------------ |-| Active key | Stable unique `string`, `number`, or `null` | Matches Table's one validated canonical row key; `null` means no active row. | Controlled `null` | Caller through this module | Candidate |-| Row eligibility | Product row eligible or inert; synthetic group header inert | Distinguishes product activation from grouping controls before applying caller eligibility. | Every product row eligible; group headers excluded | `module:Table/useTableActivation` | Parent distinction pending OQ7 |-| Activation request | `(item, key)` callback | Asks the caller to update controlled state; the plugin never mutates `activeKey`. | No implicit state update | Caller through this module | Candidate |-| Activation inputs | Primary pointer click, Enter, or Space | One press interaction model requests activation; hover and auxiliary clicks never change active state. | All three paths enabled | `module:Table/useTableActivation` | Candidate |-| Active presentation | Inactive or active | Reflects controlled state on the existing row anatomy and through pinned cells. | Inactive | `module:Table/useTableActivation` | Unsettled |-| Selection/navigation | Independent | Activation neither changes selection nor claims a route, destination, or navigation role. | Unchanged | Their respective owners | Required |+| Concept | Closed values or states | Meaning | Default | Owner | Stability |+| ------------ | ----------------------------------------------- | ----------------------------------------------------------- | ---------------------------------- | ---------------------------------- | ----------------------------- |+| Active key | Valid canonical string/finite number, or `null` | Strict equality to the parent key; `null` means inactive. | Controlled | Caller through this module | Unreleased; contract complete |+| Eligibility | Eligible or inert | Valid, admitted product row plus caller predicate. | All admitted product rows eligible | This module and parent admission | Unreleased; contract complete |+| Request | `(item, key)` | Emits the same canonical key without mutating caller state. | No implicit update | Caller through this module | Unreleased; contract complete |+| Input | Primary click, Enter, Space | Press-only activation; no hover or navigation mode. | All three | This module | Unreleased; contract complete |+| Presentation | Inactive or active | Existing anatomy, resolved fill, and non-colour marker. | Inactive | This module; parent paint resolver | Unreleased; contract complete |## Behavioral contract-| ID | Candidate invariant | Basis | Draft review state |-| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------ |-| FR1 | One mounted hook instance returns one stable `TablePlugin`, and each mounted row keeps a stable composed activation handler while controlled keys or current callbacks change. | `component:Table` FR12 and PR1; existing stable-identity plugin evidence | Settled candidate |-| FR2 | `activeKey` is fully controlled. Activation depends on the unapproved parent contract in OQ6: one explicit stable unique `idKey`, its resolved key and validity available to activation, and duplicate-key rows inert in all builds with one deduplicated development warning. Current Table derives keys but does not validate them or pass them to row transforms. The candidate compares `activeKey` with the resolved key using strict equality and emits that same key: a property-name `idKey` resolves `String(item[idKey])`, so `"42"` matches and `42` does not; a function preserves its returned string or number. Without `idKey`, activation is inert with one deduplicated development warning, not keyed by row index. No second extractor or activation-side coercion is added. | One row identity across parent and module | Parent API decision required |-| FR3 | An eligible row whose validated canonical key equals `activeKey` exposes a stable `data-active` state and component-owned active presentation; all other rows remove both. No default `aria-current` or `aria-selected` is inferred. | Activation/selection/navigation boundary | Settled candidate |-| FR4 | An ineligible product row contributes no activation handler, keyboard affordance, active paint, or active-state attribute even if its key equals the controlled key, subject to OQ5. Synthetic `useTableGroupedRows` headers are always ineligible for product activation, including when an eligibility predicate returns true; their existing group toggle and disclosure button remain independent. Safe product/header distinction is an OQ7 parent dependency; grouped composition is not admitted until that boundary is enforceable. | Disabled interaction boundary | Verify whether controlled active state should remain visible |-| FR5 | A primary pointer click, Enter, or Space calls `onActivate(item, key)` once. The module runs each earlier accumulated handler first, preserves its side effects, and stops before activation when that handler calls `preventDefault`; it never replaces a handler already present when its transform runs. | Parent sequential plugin contract; proven interaction composition | Settled candidate |-| FR6 | An event originating in a nested button, link, input, select, textarea, editable surface, equivalent interactive role, or portalled control outside the row does not activate the row. Text selection suppresses activation only when the non-collapsed selection associated with that gesture intersects the activated row. | Accidental-activation prevention | Settled candidate |-| FR7 | Each eligible row is a sequential focus stop by default and activates on Enter or Space while retaining native `<tr>` semantics and visible focus. An earlier plugin's explicit `tabIndex`, including `-1` for roving focus, remains authoritative; a programmatically focused row still activates. The row advertises `Enter Space` through composed `aria-keyshortcuts` metadata. Promotion evidence covers representative large unvirtualized tables because the default sequential path grows with mounted eligible rows. | Proven keyboard model; WCAG 2.2 SC 2.1.1, 2.4.7, and 2.4.11 | Settled candidate |-| FR8 | Only a primary-button click activates; auxiliary clicks remain available to earlier handlers. Keyboard auto-repeat never activates. Repeated Space remains default-prevented so holding it cannot scroll the page, while repeated Enter is ignored without claiming a browser default. Pointer hover never changes `activeKey` in v1. | Proven press boundary; shared modality rules | Settled candidate |-| FR9 | Activation is independent from selection, expansion, tree controls, context menus, sorting, and navigation. Non-owning plugins retain their handlers and controlled state. A product row has at most one whole-row activation owner; expansion configured with `hasRowClickExpansion` and future navigation are competing owners. Synthetic `useTableGroupedRows` headers remain grouping-owned and ineligible under FR4. OQ7 requires parent ownership enforcement and product/header distinction; plugin insertion order must not decide whether a group toggle also calls product `onActivate`. | Module boundary, single ownership, and plugin composition | Parent enforcement decision required |-| FR10 | Active presentation uses a component-owned fallback on existing row anatomy. OQ3 owns the unresolved paint precedence across striping, hover, focus, selection's row wash, `hasRowHighlight`, and active state; no selected-plus-active combination is implementation-ready without that decision. Each admitted combination defines one effective fill/overlay for both normal and pinned cells and a distinguishable active cue independent of colour. `hasRowHighlight=false` continues to disable selection-owned wash, not selection semantics; whether activation replaces the current detail-panel background-reclamation use case remains an OQ3 decision. No theme-authored `active` state is implied. | Current private row overlay and theming-surface boundaries | Human visual decision |-| FR11 | Children mode, empty state, and rows excluded by upstream transforms remain unchanged. Any module-owned resource usage is bounded by mounted rows, fully released when the owning row or Table detaches, and produces no activation or global side effect after release. | Observable resource limits; implementation freedom | Settled candidate |-| FR12 | For valid unique canonical keys, changing only `activeKey` does not replace the plugin array, row handlers, columns, or product data and does not React-rerender unrelated rows. At most the old active and new active mounted rows change their reflected state/presentation. | Bounded-update performance requirement and parent row memoisation | Settled candidate |+| ID | Approved invariant | Basis | Verification obligation |+| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------- |+| FR1 | One mounted hook returns one stable plugin; mounted composed row handlers remain stable while reading current configuration. | Parent identity contract; DEC-1 | Contract complete; implementation evidence pending |+| FR2 | Activation requires explicit stable unique `idKey` and parent-supplied valid canonical identity. Property-name keys convert valid raw strings or finite numbers with `String`; function keys preserve their string/finite-number type. Comparison is strict and the callback emits exactly that key. Missing, invalid, duplicate, or unknown identity is inert in every build, with parent-owned deduplicated development diagnostics. | Parent FR16; DEC-1 | Contract complete; parent review and evidence pending |+| FR3 | Only an eligible row matching `activeKey` exposes module-owned `data-active`, `aria-current="true"` and active presentation. Other rows remove only those module-owned contributions. The current-item state expresses which row drives adjacent content, not selection or navigation; no `aria-selected`, `aria-current="page"` or replacement row role is inferred. A pre-existing incompatible current-state owner makes activation inactive for that row with a development diagnostic rather than overwriting its semantic state. | DEC-1/DEC-3 | Contract complete; evidence pending |+| FR4 | Eligibility governs both interaction and presentation. A matching row that becomes ineligible loses activation handlers, module keyboard affordances, active attributes, fill, and marker; it preserves prior props and never mutates `activeKey`. Synthetic rows remain inert regardless of the predicate. | DEC-1/DEC-5 | Contract complete; evidence pending |+| FR5 | A permitted primary click or non-repeated Enter/Space calls `onActivate` once after every composed non-owning handler. `preventDefault` cancels activation while preserving earlier side effects; accumulated handlers are not replaced. | Parent FR17; DEC-4 | Contract complete; evidence pending |+| FR6 | Nested native controls, including readonly controls, editable content, canonical interactive-role boundaries, and portalled events whose target is outside the row never activate it. A non-collapsed selection suppresses click activation when any selected range intersects this row; an unrelated or standing selection does not suppress Enter or Space. | DEC-4 | Contract complete; evidence pending |+| FR7 | An eligible row defaults to `tabIndex=0` only when earlier props omit it; explicit `-1` or other focus ownership survives. Programmatically focused eligible rows activate. `Enter Space` is composed with existing `aria-keyshortcuts`, without duplicate tokens or a replacement row role. | DEC-2 | Contract complete; evidence pending |+| FR8 | Auxiliary clicks, hover, and repeated Enter never activate. Repeated Space prevents scrolling without activation after the same boundary/cancellation gates. A permitted non-repeated Space prevents its scrolling default. | DEC-4 | Contract complete; evidence pending |+| FR9 | V1 admits only the parent's flat product-row render plan and one declared whole-row owner. Tree/grouped/detail/custom models and competing expansion/navigation ownership neutralise activation in all builds, independent of plugin names or insertion order, with deduplicated development diagnostics. Legacy behavior remains available. | Parent FR17-FR18; DEC-5 | Contract complete; parent review and evidence pending |+| FR10 | One parent row-paint resolver applies the matrix below to normal and pinned cells. Selection wash dominates active fill when selected and `hasRowHighlight=true`; otherwise active fill dominates hover/striping. The active marker and focus indication remain independent. No second imperative background/overlay writer is permitted. | Parent FR21; DEC-3 | Contract complete; parent implementation and evidence pending |+| FR11 | Children mode, empty-state rows, synthetic rows, and excluded rows receive no activation additions. Detaching rows or the hook releases resources and leaves no callbacks or painting on a new row generation. | DEC-5; resource boundary | Contract complete; evidence pending |+| FR12 | With valid unique keys, changing only `activeKey` does not replace plugins, handlers, columns, or product data or React-rerender unrelated rows. Only the old/new active mounted rows change activation reflection; an offscreen row reflects current state when mounted. | Bounded update contract | Contract complete; evidence pending |### Transformation and precedence order-- **ORD1 — Eligibility before state.** Distinguish product rows from synthetic grouped headers through the approved OQ7 parent contract, then resolve product eligibility. Group headers remain ineligible regardless of the caller predicate; ineligible rows return prior accumulated row props unchanged.-- **ORD2 — Controlled state.** The OQ6 dependency supplies one validated canonical key. Compare it with `activeKey` using FR2's strict, type-preserving equality and emit the same key; never derive a second identity or infer active state from focus or a prior event. Missing explicit identity or duplicate-key rows are inert.-- **ORD3 — Existing handler.** Run the accumulated handler for that event before the module's request. A handler that calls `preventDefault` cancels activation without discarding its own side effects.-- **ORD4 — Event boundary.** Nested interactive descendants, portalled events outside the row, and a non-collapsed selection intersecting the activated row suppress the module request without suppressing descendant behavior; an unrelated selection elsewhere does not.-- **ORD5 — Accepted press.** After the prior handler and boundary guards, accept only a primary click or non-repeated Enter/Space. Repeated Space prevents scrolling without activating; hover and auxiliary clicks never activate.-- **ORD6 — Presentation.** Apply inactive or active state after eligibility while preserving prior classes, styles, refs, attributes, and children.-- **ORD7 — Parent pipeline.** Relative order with non-owning plugins remains the order supplied by `component:Table`; this module creates no private second pipeline. Competing whole-row owners follow the OQ7 parent enforcement outcome.+- **ORD1 — Admission and eligibility.** Consume the parent's validated identity, product/synthetic kind, and flat/ownership admission before applying the caller predicate. Unsupported or ineligible rows preserve prior contributions and remove only activation-owned state.+- **ORD2 — Controlled state.** Compare the supplied canonical key strictly; emit that same key. Do not coerce in activation, use index fallback, or infer active state from focus or events.+- **ORD3 — Existing handlers.** Compose non-owning handlers first, preserving their side effects and cancellation regardless of named-plugin order.+- **ORD4 — Event boundary.** Check target containment and shared interactive/editable boundaries before accepting a press. Check selected-range intersection for clicks only; standing text selection does not block Enter or Space. Reuse or extract the canonical shared guard; do not copy a selector catalog or import a complete navigation hook for it.+- **ORD5 — Accepted press.** Accept primary click and non-repeated Enter/Space once; apply FR8's Space default handling only for an otherwise eligible row gesture.+- **ORD6 — Presentation.** Contribute activation state to the parent's sole paint resolver; preserve prior refs, children, classes, styles, attributes, and focus ownership.+- **ORD7 — Parent pipeline.** Declare `rowModel: 'flat'` and `wholeRowOwner: 'activation'`; use parent sequential transforms and declarative ownership/admission, not a private pipeline or plugin-name inspection.++### Active, selection, and focus matrix++| Selection | Activation | `hasRowHighlight` | Effective normal/pinned fill and cue |+| ---------- | ---------- | ----------------- | ------------------------------------------------------------------------------------------- |+| Unselected | Inactive | Either | Existing base, striping, hover, and independent focus treatment. |+| Selected | Inactive | `true` | Existing selection wash; selection semantics remain. |+| Selected | Inactive | `false` | No selection wash; base/striping/hover and selection semantics remain. |+| Unselected | Active | Either | Component-owned active fallback above hover/striping, plus inline-start marker. |+| Selected | Active | `true` | Selection-dominant wash plus inline-start active marker; selection semantics remain. |+| Selected | Active | `false` | Active fallback plus marker; no selection wash is reintroduced; selection semantics remain. |++Every row applies the same result for selection-first and activation-first updates,+including toggling `hasRowHighlight` while both states are present. Focus is always+separate: a focus outline is never the active cue. The marker is a visible+inline-start decoration on existing row/cell anatomy, independent of colour,+with no extra data column, control, or public target. It follows text direction,+survives pinned-cell occlusion, and remains distinguishable in light, dark, and+forced-colors modes. `hasRowHighlight=false` reclaims only selection-owned wash;+it does not disable activation or change any selection semantics.### Performance and resources-- **PR1 — Constant module overhead.** Canonical-key comparison, state reflection, and handler guards add O(1) module-owned work per relevant row update. The module invokes `getIsItemActivatable` at most once when resolving that row update; caller callback complexity is outside the module's guarantee and is measured separately by call count.-- **PR2 — Stable public identities.** The returned plugin object, Table's resolved plugin array, and mounted row activation handlers stay referentially stable across `activeKey`, callback, and eligibility-function changes while still observing their current values.-- **PR3 — Bounded active update.** For valid unique keys, changing only `activeKey` changes reflected state/presentation on at most the old active and new active mounted rows and does not React-rerender unrelated rows.-- **PR4 — Bounded lifetime.** Module-owned retained resources scale no faster than mounted rows, are released when their owning row/Table detaches, and leave no post-release callback or global side effect. Equivalent implementations that meet those observable bounds remain valid.+- **PR1 — Constant local work.** Key comparison, state reflection, and ordinary event guards add O(1) row-local coordination; selected-range checks scale with selected ranges, not dataset size. Resolve eligibility at most once per relevant row update. Parent full-dataset validation is not repeated by activation.+- **PR2 — Stable identities.** Plugin and mounted handlers remain stable across key/callback/predicate changes while observing their current values.+- **PR3 — Bounded active updates.** FR12's old/new-row bound applies to key-only updates; eligibility, data, selection, or theme changes retain their own scopes.+- **PR4 — Bounded lifetime.** Retained resources scale with mounted rows and are completely released on row/hook detach, including virtual row recycling.## Accessibility contract-- **AR1 — Native table semantics.** Body rows retain their native row role; the module does not claim button, link, option, or gridcell semantics it cannot fulfil.-- **AR2 — Keyboard parity.** Eligible rows are focusable by default, preserve an earlier roving-focus `tabIndex`, activate on Enter/Space, compose `aria-keyshortcuts="Enter Space"`, and keep visible unobscured focus without replacing native row semantics (WCAG 2.2 SC 2.1.1, 2.4.7, and 2.4.11).-- **AR3 — Nested and portalled controls.** Interactive descendants and portalled controls remain reachable and operable without activating the row (WCAG 2.2 SC 2.1.1).-- **AR4 — State honesty.** The module does not emit `aria-selected` or default `aria-current`; active presentation alone does not claim selection or navigation semantics.-- **AR5 — Non-colour state.** If active state communicates current position required to use an adjacent view, its focus/current treatment cannot rely on colour alone (WCAG 2.2 SC 1.4.1). The exact representation is blocked on OQ3.-- **AR6 — No hover-only activation.** Hover may enhance row paint, but it never changes active state; pointer, touch, and keyboard users share the press-owned activation outcome (WCAG 2.2 SC 2.1.1 and `architecture:interaction-modality` INV4).-- **AR7 — Proportionate evidence.** Unit, DOM, accessibility-tree, axe, and real-browser keyboard evidence prove static semantics, nested-control isolation, focus, and reflected state. Real AT is added only if an approved outcome depends on announcement, browse/virtual-cursor behavior, or a recorded AT/browser divergence, as required by `spec:AST-009`.+- **AR1 — Native semantics.** Rows retain native table roles; activation adds no button/link role or selection semantics. `aria-current="true"` on the active eligible row exposes its current-item relationship without a navigation-specific value. DOM and computed accessibility-tree checks verify that exposure; no particular spoken phrase or virtual-cursor behavior is promised.+- **AR2 — Keyboard parity.** Default sequential focus, earlier roving/programmatic focus, composed shortcuts, Enter/Space, and visible unobscured focus satisfy the admitted keyboard model. Representative large unvirtualized tables require browser focus-order evidence.+- **AR3 — Independent controls.** Native readonly controls, interactive-role descendants, editable content, and portals remain independently reachable and operable without row activation.+- **AR4 — State honesty.** Ineligible, missing or unmatched rows expose no module-owned current state; at most one eligible uniquely keyed row exposes `aria-current="true"`. Changing the controlled key moves both current-state exposure and the visible marker together; `activeKey=null` removes both. Existing selection/navigation semantics remain independently owned.+- **AR5 — Non-colour state.** The inline-start marker communicates active state independently of fill and focus in light/dark/forced-colors and normal/pinned states (WCAG 2.2 SC 1.4.1).+- **AR6 — Modality parity.** Primary pointer, touch-generated click, and keyboard share press-owned activation; hover never changes active state.+- **AR7 — Evidence layers.** Unit, DOM, accessibility-tree, axe, and browser evidence remain pending. Real AT is required only for an AT-dependent outcome or recorded divergence under `spec:AST-009`; this module introduces no announcement claim.## Design relationships-| Anatomy or state | Design requirement | Representation authority | Module contract |-| -------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------ |-| Activatable row | Communicates availability without replacing native table structure or cell controls. | This module plus `architecture:interaction-modality` | FR5-FR9, AR1-AR3 |-| Active row | Remains visually traceable through normal and pinned cells. | Component-owned fallback; public theme-state admission remains OQ3 | FR3, FR10, AR4-AR5 |-| Focused row | Shows keyboard focus independently from controlled active state. | Shared focus rules and existing row anatomy | FR2, FR7, AR2, AR5 |-| Nested cell control | Keeps its own interaction, focus, and semantic contract. | The nested component | FR6, FR9, AR3 |-| Selection/navigation | Never inferred from activation. | Selection or navigation owner | FR2, FR3, FR9, AR4 |+| Anatomy or state | Design requirement | Representation authority | Module contract |+| ---------------- | ----------------------------------------------------------- | ---------------------------------- | ---------------- |+| Activatable row | Native structure and independent cell controls. | This module; shared modality owner | FR5-FR9, AR1-AR3 |+| Active row | Traceable marker and one coherent normal/pinned fill. | DEC-3; current contract | FR3, FR10, AR5 |+| Focused row | Focus remains distinguishable from controlled active state. | Existing focus owner | FR7, AR2, AR5 |+| Selection | Wash opt-out and semantics remain independent. | Selection owner; parent resolver | FR9-FR10 |++### Design decisions++<!-- design-decisions:v1 -->-The default contract adds no public theme target or theme-authored `active` state. The module owns a component fallback and must propagate its effective overlay to pinned cells. OQ3 may admit an `active` state on the existing `table-row` target only if it defines the fallback, guaranteed paint properties, state precedence, and pinned-overlay projection required by `architecture:component-theming-surface`. A separate direct target still requires another theming decision.+| ID | Decision | Intent or reason | Applies to | Allowed variation |+| --- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------- |+| DD1 | An active row has a visible inline-start marker independent of colour and focus. | Current detail-driving state stays identifiable beside selected rows and pinned cells. | All active eligible rows | Token/pixel tuning within existing anatomy; no extra column, control, target, or public `active` theme state. |## Parent and system relationships-- `component:Table` owns the aggregate `TablePlugin` protocol, canonical ordering, sequential transforms, failure isolation, and stable plugin-array identity. Its current contract does not promise validated canonical identity or key delivery to activation. OQ6 requires a separately approved parent addition for explicit stable unique `idKey` validation, resolved-key equality, and duplicate-key inertness; OQ7 requires a separately approved ownership and product/header distinction contract. This module neither supplies nor approves those missing parent contracts.-- `architecture:interaction-modality` owns cross-component keyboard/pointer modality rules; this module owns only their row-activation projection.-- `architecture:public-component-api` and `spec:AST-002` own additive API discipline and caller burden. The module exposes controlled product state rather than routing or data-fetching dependencies.-- `spec:AST-009` owns accessibility-evidence escalation. This module uses lower-layer semantic and browser evidence unless an approved outcome depends on assistive-technology behavior.-- `useTableSelection`, tree, expansion, context-menu, sticky-column, and future navigation modules retain their independent state and semantics.+- `component:Table` FR16 and DEC-4 own full-dataset identity validation and deduplicated diagnostics. The new-capability path distinguishes function keys `0` and `"0"` with typed internal React keys; activation still emits the original canonical key. Legacy key behavior is unchanged.+- Parent FR17 supplies optional fourth `TableRowContext` to `transformBodyRow`: canonical `key`, `identityStatus`, `kind` (`product`, `synthetic`, `unknown`), `logicalIndex`, `logicalRowCount`, `headerRowCount`, and render context. FR18 owns pre-cell planning/flat admission. Only admitted flat rows have product kind; unsupported structural models disable flat capabilities before transforms and may expose unknown kind. Missing/unknown context or non-product kind leaves activation inert; legacy callbacks remain unchanged.+- Parent optional `rowModel: 'flat' | 'tree' | 'grouped' | 'detail' | 'custom'` and `wholeRowOwner: 'activation' | 'expansion' | 'navigation'` declarations decide admission without names/order. Undeclared custom body modifiers require an explicit parent-compatible declaration. This module does not invent its syntax.+- Parent FR19-FR21 and DEC-5 own the shared both-axis viewport, virtual full logical metadata, and sole paint coordination. Required source changes remain unimplemented evidence targets, not proof from existing parallel selection writers.+- Parent and module contracts define joint flat selection, sorting, filtering, sticky columns, context menus, row indices, loading and windowing admission. Non-flat legacy plugins retain their own behavior outside activation admission.+- Shared modality, public API, theming, and `spec:AST-009` evidence rules retain the owners listed in frontmatter. Parent additions remain owned by `component:Table`.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation |-| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| FR1-FR4, FR11-FR12, PR1-PR4 | Public plugin/handler identity, controlled render/mutation/callback counts, invalid-key fallback, and resource-lifetime tests | Active, inactive, `null`, eligible, ineligible, missing `idKey`, property-key `"42"` versus numeric `42`, function-returned numeric keys, duplicate resolved keys, grouped headers, callback/key changes | Plugin/handlers churn, duplicate-key rows activate, unrelated rows rerender, more than two valid-key rows mutate, callbacks overrun, or resources leak. |-| FR5-FR9, ORD1-ORD7 | Unit/browser interaction tests with earlier handlers and selection, grouped-row headers, control-only expansion, `hasRowClickExpansion`, tree, sticky, context-menu, navigation-owner, and custom plugins | Primary/auxiliary pointer, Enter/Space, auto-repeat, prior `tabIndex`, grouped headers and product rows in both plugin orders, eligibility override, nested/portalled controls, in-row/unrelated text selection, cancellation | Handlers are replaced, callbacks fire twice, auxiliary/repeated/hover input activates, Space repeat scrolls, earlier focus ownership is lost, unrelated selection blocks activation, nested/portalled controls activate rows, or two whole-row owners fire. |-| FR10, AR5-AR6 | Real-browser screenshots in light/dark, striped, hover, pinned-column, keyboard-focus, touch emulation, and forced-colors states | OQ3's complete selection/activation/`hasRowHighlight` matrix, selection-first and activation-first updates, focus/hover, light/dark, and normal/pinned cells | Component fallback or approved theme state disappears under pinned cells, relies on colour alone, loses focus indication, or hover changes active state. |-| AR1-AR7 | Unit/DOM/accessibility-tree tests, axe, and real-browser keyboard automation; real AT only for an adopted AT-dependent outcome | Native traversal in representative small and large unvirtualized tables, default/roving/programmatic focus, Enter/Space metadata and activation, nested link/button/input, portalled control, state update | Row semantics are replaced, Enter/Space is undiscoverable or unavailable, focus order becomes incoherent at representative scale, earlier focus ownership is lost, nested controls activate, or selection/navigation semantics are falsely exposed. |-| Plugin composition | Focused integration matrix plus existing Table selection/tree/expansion/sticky/context-menu suites | Every supported first-party combination and custom row handler order | Enabling activation breaks another plugin, changes column order, or loses accumulated row props. |-| Public API and documentation | Public-subpath compile fixture including required explicit `idKey` and parent-supplied validated canonical row key, generated inventory, `.doc.mjs`, Storybook, and one recipe | Generic row type, controlled update, eligibility, duplicate keys, primary click, Enter/Space | A second extractor or mode switch appears, duplicate behavior is undefined, the hook/types are unavailable, or docs imply hover activation. |-| Performance | Extend `Table.perf.test.tsx` with plugin/handler identity, render and DOM-mutation counts, eligibility-callback counts, stable no-op, and adjacent valid-key changes | Large representative data, same key, adjacent key, callbacks changed | One key change replaces the plugin path, rerenders unrelated rows, mutates more than old/new rows, over-invokes eligibility, or exceeds budgets. |-| Structural ownership | `pnpm check:knowledge` | Draft module and parent backlink | A missing, orphaned, misnamed, wrong-kind, or duplicate module record passes validation. |+Every entry below is a required verification target, not completed implementation+evidence; the frontmatter file list retains those targets without claiming they exist or pass.++| Contract | Verification | Representative states | Mutation or failure expectation |+| --------------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |+| FR1-FR4, FR11-FR12, PR1-PR4 | Pending activation unit suite and `Table.perf.test.tsx`: identities, counts, controlled state, lifetime. | Null/missing/invalid/duplicate keys; property `"42"` versus `42`; function `0` versus `"0"`; eligibility flips; recycle. | Churn, coercion, multiple active duplicates, ineligible presentation, unrelated rerenders, more than two key-only mutations, or leaks fail. |+| FR5-FR9, ORD1-ORD7 | Pending unit/browser composition and shipped interaction-path tests. | Primary/auxiliary click, Enter/Space/repeat; readonly/editable/portal controls; selection ranges anchored outside but intersecting the row; unrelated selection; cancellation. | Replacing handlers, duplicate requests, repeated Space scrolling, nested activation, anchor-only suppression, or lost prior `-1` fails. |+| FR10, DD1, AR5-AR6 | Pending canonical visual coverage and browser evidence. | All six matrix rows, both update orders, highlight toggles, hover/focus, light/dark/forced-colors, LTR/RTL, normal/pinned. | Order-dependent wash, hidden/colour-only marker, focus used as active cue, or pinned mismatch fails. |+| AR1-AR7 | Pending `TableActivation.a11y.chromium.spec.ts`, DOM/tree, axe, browser keyboard/touch. | Small/large flat tables; default, roving, programmatic focus; controls; active/null/ineligible/removed key, single current-state exposure, incompatible pre-existing current-state owner. | False roles/state, unavailable shortcuts, incoherent focus order, or descendant activation fails. |+| Plugin composition | Pending focused integration plus existing selection/sort/filter/sticky/context-menu suites. | Both plugin orders; flat load/window combination; non-flat and custom modifiers; competing owners. | Admission by names/order, unsupported new capability, or lost legacy handlers/props fails. |+| Public API and docs | Pending compile fixture, inventory, `.doc.mjs`, Storybook, and recipe. | Three-field generic controlled config; explicit identity; all press paths. | A second extractor, public mode/theme state, missing export, or hover promise fails. |+| Structural ownership | `pnpm check:knowledge` structural check; implementation evidence is separate. | Current module, parent backlink, schema 3/template 4. | Missing, orphaned, duplicate, wrong-kind, or misnamed record must fail. |## Decision log-### DEC-1 — Activation is controlled and independent+### DEC-1 — Controlled canonical identity and eligibility**Reference:** `module:Table/useTableActivation/DEC-1`-**Decider:** pending owner approval--Activation represents one caller-owned current product row. It depends on OQ6's parent validation and key projection, not a validation guarantee in current Table. The candidate requires explicit stable unique `idKey`, compares the resolved key with `activeKey` as specified in FR2, and emits the same key; missing identity and duplicate-key rows remain inert. Grouped headers do not become product rows under an eligibility override. The module never owns product state, selection, routing, focus, detail content, or prefetching.+**Decider:** `humbertovirtudes`, `2026-11-03`-Rejected: a second activation-specific key extractor, deriving activation from selection or focus, storing an internal fallback key, or combining row navigation and activation into one hook.+One caller-owned active key matches and emits the parent's validated canonical key+strictly. Eligibility controls both requests and presentation without changing the+caller key. Missing, invalid, unknown, and duplicate identity is inert.+Rejected: a second extractor, index fallback, activation-side coercion, or deriving active state from selection/focus.-### DEC-2 — Preserve native row semantics+### DEC-2 — Native rows support press activation**Reference:** `module:Table/useTableActivation/DEC-2`-**Decider:** pending owner approval--Whole-row convenience keeps native semantic table-row structure. Eligible rows are focusable by default, preserve an earlier roving-focus `tabIndex`, advertise Enter/Space through `aria-keyshortcuts`, and activate from primary click, Enter, or Space without claiming button or link semantics.+**Decider:** `humbertovirtudes`, `2026-11-03`-Rejected: `role="button"` or `role="link"` on `<tr>`, pointer-only activation, and-implicit `aria-selected` or `aria-current`.+Eligible rows retain native semantics, default sequential focus only when no earlier+focus owner exists, and composed Enter/Space shortcuts. Focus remains independent.+Rejected: row button/link roles, pointer-only operation, `aria-current="page"`, or inferred selection attributes.-### DEC-3 — Active state uses existing row anatomy+### DEC-3 — Selection-dominant fill and a separate active marker**Reference:** `module:Table/useTableActivation/DEC-3`-**Decider:** pending owner approval+**Decider:** `humbertovirtudes`, `2026-11-03`-The module reflects active state through existing row anatomy, with one effective fill/overlay reaching normal and pinned cells. OQ3 owns the exact representation and precedence, including selection's wash and `hasRowHighlight`; neither selected-plus-active precedence nor a replacement for the detail-panel background-reclamation path is implied. A second target is not justified. Theme-authored `active` state is admitted only if OQ3 defines fallback, properties, precedence, and pinned projection.+The six-state matrix fixes fill precedence; active state has an inline-start+non-colour marker and matching `aria-current="true"` on the native row. The same+controlled key drives both visual and computed semantic exposure, even when+selection wins the fill. One parent resolver coordinates selection, activation and+pinned overlays in either update order. No public `active` theme state is admitted+in v1. Navigation-specific current values and selection state remain independent.+Rejected: competing imperative paint writers, a focus-only active cue, or a new activation target/column.-Rejected: styling only transparent row backgrounds that disappear under pinned cells, implying that the current `table-row` target already accepts an undeclared `active` state, and adding a public `table-row-activation` target without an independent theme-author need.--### DEC-4 — Press owns activation and earlier handlers may cancel+### DEC-4 — Earlier handlers and gesture boundaries precede activation**Reference:** `module:Table/useTableActivation/DEC-4`-**Decider:** pending owner approval+**Decider:** `humbertovirtudes`, `2026-11-03`-The module has one press interaction model. It runs the accumulated handler first, treats `preventDefault` as cancellation, and then accepts only a primary click or non-repeated Enter/Space outside nested or portalled controls and intersecting text selection. Repeated Space prevents page scrolling without activation. A product row has at most one whole-row activation owner; grouped headers remain grouping-owned and ineligible. OQ7 owns the missing parent distinction and enforcement contract.+Non-owning handlers run first and may cancel. Shared interactive guards, portal+containment gate primary-click and Enter/Space. Selected-range intersection+suppresses clicks only; standing selection does not block keyboard activation.+Rejected: hover activation, copied selector catalogs, whole-navigation-hook imports, or anchor-only selection checks.-Rejected: hover activation, replacing earlier handlers, activating after cancellation, and activating from auxiliary clicks or key auto-repeat.+### DEC-5 — Flat admission and declarative ownership-## Open questions+**Reference:** `module:Table/useTableActivation/DEC-5`+**Decider:** `humbertovirtudes`, `2026-11-03`-- **OQ3 — How is required current state communicated?** (`human-design`) Decide the component-owned fallback, focus-versus-active precedence, non-colour cue, and any admitted `active` state on the existing `table-row` target. The decision must specify every state in the matrix below, including whether selected-plus-active uses selection-dominant fill with a distinct active cue or active-dominant fill with a persistent selection cue. `hasRowHighlight=false` removes selection wash while preserving selection semantics; it is not an activation disable flag. Decide whether an active row driving detail content replaces the current background-reclamation use case or needs another explicit caller choice. Each outcome must define the same effective paint on normal and pinned cells, including selection/active changes in either order. No active or selected-plus-active paint is admitted while this question remains open. An opt-in caller-supplied `aria-current` value, if warranted for genuine current-item sets, is a separate decision; default selection/navigation semantics remain forbidden.+The parent context and declarations admit flat product rows with one whole-row+owner. Non-flat, unknown custom-body, and competing-owner combinations neutralise+activation deterministically while preserving legacy plugin behavior.+Rejected: inferring row kind/ownership from plugin names, insertion order, key prefixes, or DOM markers.- | Selection | Activation | `hasRowHighlight` | Required outcome before admission |- | ---------- | ---------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |- | Unselected | Inactive | Either | Existing striping, hover, and focus treatment. |- | Selected | Inactive | `true` | Existing selection wash and selection semantics on normal and pinned cells. |- | Selected | Inactive | `false` | No selection-owned wash; selection semantics remain. |- | Unselected | Active | Either | OQ3 defines active fill, non-colour cue, and focus/hover precedence independently of the selection flag. |- | Selected | Active | `true` | OQ3 chooses selection-versus-active fill precedence and preserves distinguishable selection, active state, and focus on normal and pinned cells. |- | Selected | Active | `false` | OQ3 defines active paint without reintroducing selection wash; selection semantics remain. |+## Open questions-- **OQ5 — Should an ineligible product row matching `activeKey` remain visibly active?** (`human-api`) Decide whether caller eligibility governs interaction only or both interaction and controlled presentation for real product rows. This decision does not relax FR4's exclusion of synthetic grouped headers.-- **OQ6 — How does Table expose validated canonical row identity?** (`human-api`) Approve the missing parent-owned validation and key-delivery contract. Current Table resolves an index when `idKey` is omitted, `String(item[idKey])` for a property name, or the function's returned key; it does not validate uniqueness or deliver the key to `transformBodyRow`. The activation candidate requires explicit stable unique identity, FR2's strict resolved-key equality and same-key callback, inert missing/duplicate identity in all builds, and deduplicated development diagnostics. The approved parent record must own these additions and their compatibility; this module adds no activation-specific extractor or coercion.-- **OQ7 — How does Table enforce whole-row ownership and product eligibility?** (`human-api`) Approve the missing parent contract for distinguishing caller product rows from synthetic `useTableGroupedRows` headers and enforcing FR4's default header ineligibility. Group headers keep their grouping-owned click and disclosure-button paths; `hasRowClickExpansion` and future navigation compete with activation on product rows. Define deterministic rejection or neutralisation, development diagnostics, and production fallback for every admitted combination without making plugin insertion order select an owner. Grouping integration remains unsupported until its distinction and ownership boundary are enforceable; key prefixes or private marker inspection are not caller obligations.+None. The normative contract is complete. Implementation and release verification+remain separate from contract approval.## Content boundary-This record does not duplicate consumer signatures/examples, the parent Table plugin-protocol or ordering, shared input-modality rules, current usage audits, implementation-steps, or navigation/selection/prefetch contracts. It links to their canonical owners.+This record links rather than duplicates consumer examples, parent protocol, shared modality/theming rules, audit results, implementation plans, or product selection/navigation/detail/loading ownership.diff --git a/docs/specs/components/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md b/docs/specs/components/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.mdindex 6fec781f7a..5fdf092b1e 100644--- a/docs/specs/components/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md+++ b/docs/specs/components/Table/plugins/infiniteScroll/useTableInfiniteScroll.spec.md@@ -1,13 +1,13 @@---schema_version: 3-template_version: 3+template_version: 4kind: moduleid: module:Table/useTableInfiniteScroll-authority: draft+authority: currentarchive_reason: nullsuperseded_by: null-approved_by: null-approved_at: null+approved_by: humbertovirtudes+approved_at: 2026-11-03owners: [cixzhang]review_triggers:[public-api, behavior, layout, theming, accessibility, interaction]@@ -28,6 +28,7 @@ references:spec:AST-002,spec:AST-009,spec:AST-020,+ spec:AST-086,]---@@ -35,210 +36,232 @@ references:## Contract at a glance-| Area | Contract |-| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| Public contract | Candidate `useTableInfiniteScroll` hook returning one `TablePlugin` from controlled `hasMore`, controlled `isLoading`, and `onLoadMore`; root, reset, fallback, and look-ahead inputs remain unadmitted until their owner decisions pass. |-| Behavior | One end sentinel requests the next batch as it approaches the relevant block-scroll viewport, never overlaps requests, and rearms when loading completes while more data remains. |-| End-user impact | People can continue through incrementally loaded rows without duplicate requests, focus disruption, inaccessible progress, or a dead end when automatic observation is unavailable. |-| Builder impact | Builders own data, request state, errors, and appended rows. The plugin owns observation, duplicate suppression, progress/fallback presentation, and cleanup. |-| Compatibility/readiness | Additive, unreleased module. This draft is not implementation authority. Scroll-root ownership, request completion/reset, parent rendering-mode seam, fallback policy, loading/error composition, customization, and announcement evidence require owner decisions before promotion. |-| Review checks | Reject viewport assumptions, overlapping loads, stale callbacks, a permanently visible sentinel loop, unexplained focusable sentinels, progress announced on every observer tick, a mouse-only fallback, invalid table DOM, retained observers, or router/data-client dependencies. |-| Governing rules | `component:Table` FR9-FR12 and ORD1-ORD4 own plugin composition; `architecture:react-component-runtime` owns observer lifetime; `architecture:public-component-api` and `spec:AST-002` own public caller burden. |+| Area | Contract |+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | `useTableInfiniteScroll<T>` returns one `TablePlugin<T>` with only controlled `hasMore`, controlled `isLoading`, and `onLoadMore` returning `Promise<void>`. |+| Behavior | One after-table sentinel observes the parent-owned block viewport, or the browser viewport when absent. Requests latch before invocation; completion and committed controlled state gate short-batch rearming. |+| End-user impact | An always-available manual command, coherent progress, preserved focus, and failure-loop suppression keep incremental data loading operable. |+| Builder impact | The caller owns rows, requests, errors, and stale-data suppression. A dataset reset remounts the component owning the hook together with its Table; no reset/root/look-ahead/loading-renderer API exists. |+| Compatibility/readiness | Additive and unreleased. Module and parent contract decisions are complete; implementation and release verification remain separate. |+| Review checks | Reject overlapping/reentrant loads, immediate failure loops, stale-generation rearming, DOM-inferred mode, ancestor discovery, focus loss, duplicate announcements/chrome, or invalid table content. |+| Governing rules | `component:Table` owns wrapper/context, render planning, and viewport. Required FR17-FR20, FR22 and DEC-4/DEC-5 belong to the complete parent contract; runtime, public API, and evidence rules retain their owners. |-This table is a review projection; the body below is authoritative.+This table is a review projection; the body below defines the module contract.## Intent-`useTableInfiniteScroll` connects incremental data loading to a data-driven Table-without making Table own a router, cache, query client, cursor format, or product data.-It owns an end sentinel, observation lifecycle, one-request-at-a-time behavior,-rearming, accessible progress, and a keyboard-operable fallback.--Infinite scroll is distinct from client pagination and virtualization. It appends data;-it does not choose the caller's page/cursor protocol or bound the number of rendered rows.+`useTableInfiniteScroll` coordinates incremental append requests for a flat data-driven Table without owning product data, a router, query client, cache, cursor, or page format. Observation is progressive enhancement; a manual load command is always available while more data exists. Loading does not itself paginate existing rows or bound the number of rendered rows.## Compatibility and migration-- Released default preserved: `yes`; Table behavior remains unchanged unless the new plugin is supplied.-- Compatibility class: additive public hook, types, documentation, and examples.-- Migration decision: `module:Table/useTableInfiniteScroll/DEC-1` after the open ownership decisions are approved.+- Released default preserved: `yes`; absent this opt-in capability, legacy Table and plugin behavior is unchanged.+- Compatibility class: additive unreleased hook; unsupported new-capability combinations are neutralised while legacy plugins remain available.+- Migration decision: `module:Table/useTableInfiniteScroll/DEC-1`, DEC-6, and DEC-7.-Consumer migration instructions belong in consumer docs and release notes.+Consumer signatures, imports, examples, and reset instructions belong in consumer docs. Owner approval establishes the normative module and parent decisions; implementation and release evidence remain separate. Merged code or passing checks alone do not establish approval.## Ownership boundary**Owns**-- The public hook, configuration, sentinel, observer lifecycle, and loading trigger boundary.-- Duplicate-request suppression, rearming after completion, and short-batch behavior.-- Default progress and manual fallback behavior, accessibility, performance, and evidence.-- Composition with Table's scroll wrapper, empty state, loading state, appended rows, other plugins, and the candidate children-mode warning/no-op, blocked on OQ8's parent contract decision.+- The public hook, end sentinel, observation lifecycle, single-request latch, completion gates, and automatic rearming.+- Fixed progress/manual presentation, failure-loop pause, deterministic command-removal focus handoff, and evidence.+- Contributions to the parent's wrapper/render plan and mode/admission handling without changing caller rows or control state.**Does not own / non-goals**-- Aggregate `TablePlugin` protocol, transform order, or scroll-wrapper implementation — owned by `component:Table`.-- Product data, request/cursor/page state, cache policy, retry policy, or error content — owned by the caller or another module.-- Client pagination, server pagination, Relay integration, row virtualization, or column virtualization.-- Scroll restoration, URL state, routing, or prefetching.-- A new public Table theme target unless a separate approved decision establishes a distinct theme-author need.-- Caller-composed children-mode semantics or the parent rendering-mode contract. The candidate warning/no-op depends on OQ8; the module never interprets caller children or infers mode from DOM to append loading UI.+- Parent transform ordering, render-mode/context seam, flat admission, empty-state placement, shared viewport, or virtual logical metadata: `component:Table`.+- Data/cursor/page/cache state, transport cancellation, stale response commits, error content, or the decision to fetch again: the caller.+- Client/server pagination, Relay or router integration, scroll restoration, prefetching, or row/column virtualization.+- Children-mode loading; tree/grouped/detail/custom-row v1 loading; public reset, root-ref, look-ahead, or loading-renderer customization.## Public API and concepts-The candidate minimum shape is:--```ts-export interface UseTableInfiniteScrollConfig {- hasMore: boolean;- isLoading: boolean;- onLoadMore: () => void | Promise<void>;-}--export function useTableInfiniteScroll<T extends Record<string, unknown>>(- config: UseTableInfiniteScrollConfig,-): TablePlugin<T>;-```+`hasMore` and `isLoading` are booleans. `onLoadMore()` returns `Promise<void>` and receives no data-client object. An async wrapper can express synchronous append completion without a required loading-flag cycle. These are the complete v1 configuration fields. The module exposes no `resetKey`, `rootRef`, `lookAhead`, or `loadingRenderer` field and no equivalent renderer/root/mode option.-The final shape is blocked on OQ1-OQ8. Consumer docs own final signatures,-defaults, imports, and examples after promotion.--| Concept | Closed values or states | Meaning | Default | Owner | Stability |-| --------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------ | ------------------------------------- | --------- |-| More-data state | `hasMore` true or false | Whether another load may be requested. | Controlled | Caller through this module | Candidate |-| Loading state | `isLoading` true or false | Whether a request is already in flight. | Controlled | Caller through this module | Candidate |-| Load request | `void` or promise-returning callback | Starts one caller-owned append operation without prescribing its data protocol. | No request while blocked | Caller through this module | Unsettled |-| Look-ahead | Optional non-negative distance, if admitted | Starts loading before the sentinel reaches the visible block-end edge. | Not yet admitted | Caller/module boundary | Unsettled |-| Sentinel | Observed, loading, exhausted, unavailable | Coordinates automatic loading without becoming unexplained table data or an accidental tab stop. | Derived | `module:Table/useTableInfiniteScroll` | Candidate |-| Manual fallback | Available or hidden | Provides an explicit load command when automatic observation is unavailable or unsuitable. | Unsettled | `module:Table/useTableInfiniteScroll` | Unsettled |+| Concept | Closed values or states | Meaning | Default | Owner | Stability |+| ------------------ | ------------------------------------------------ | ---------------------------------------------------------------- | ---------------------- | -------------------------- | ----------------------------- |+| More data | True/false | Permits requests and controls load affordance presence. | Controlled | Caller through this module | Unreleased; contract complete |+| Controlled loading | True/false | Blocks requests and contributes to current loading presentation. | Controlled | Caller through this module | Unreleased; contract complete |+| Request | Idle, in flight, awaiting commit, failure-paused | One shared automatic/manual request lifecycle. | Idle | This module | Unreleased; contract complete |+| Root | Parent block viewport, else browser viewport | Shared geometry, with native ancestor clipping. | Derived | Parent | Unreleased; contract complete |+| Look-ahead | Zero | No ahead-of-viewport loading distance. | Internal zero | This module | Not public |+| Manual command | Ready, busy/nonoperable, absent | Present whenever admitted and `hasMore=true`. | Present with more data | This module | Unreleased; contract complete |## Behavioral contract-| ID | Candidate invariant | Basis | Draft review state |-| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------- |-| FR1 | Stable configuration callbacks and unchanged primitive inputs preserve one stable `TablePlugin`. | Parent plugin identity and runtime architecture | Settled candidate |-| FR2 | The plugin contributes one end sentinel after the semantic `<table>`, inside the Table scroll-wrapper content. It never inserts non-row content inside `<table>`, `<thead>`, `<tbody>`, or `<tr>`. | Valid HTML and parent wrapper contract | Settled candidate |-| FR3 | Automatic loading is armed only when `hasMore` is true and `isLoading` is false. One visibility episode produces at most one active request. | Duplicate suppression | Settled candidate |-| FR4 | While a load is in flight, the module does not call `onLoadMore` again, including through repeated observation, manual activation, or rerender. Completion can make another call eligible only for the current configuration, subject to the controlled inputs and FR14. The caller remains solely responsible for suppressing stale product-data commits. | Controlled state and async ownership | Callback completion contract unsettled |-| FR5 | When a short append leaves the sentinel visible and `hasMore` remains true, completing the prior load can request the next batch without requiring the user to scroll away and back. | Continuous loading behavior | Settled outcome; mechanism free |-| FR6 | `hasMore=false` disconnects observation, removes the manual command, and presents no loading state. Changing back to true can arm a new request. | Exhausted-state boundary | Settled candidate |-| FR7 | An observer-unavailable environment preserves server rendering/hydration and exposes the approved manual fallback rather than throwing or silently dead-ending the user. | Progressive enhancement | Fallback policy unsettled |-| FR8 | Loading progress is shown and announced at most once per state transition, not once per observer callback. Error and retry UI remain caller-owned and do not render duplicate progress chrome. | Accessibility and module boundary | Composition surface unsettled |-| FR9 | The module does not call another plugin's callbacks, mutate selection/activation/expansion/sort/filter state, replace product rows, or reset scroll position. Preservation of caller-controlled state follows from that non-interference; caller data updates remain caller-owned. | Plugin independence | Settled candidate |-| FR10 | Empty data may still load when `hasMore=true`; default EmptyState and load affordance do not obscure each other or communicate contradictory states. | Empty/loading composition | Human layout decision |-| FR11 | Approved scroll-root or look-ahead changes reconnect observation without leaking the old observer or triggering from a detached sentinel. Unmount and node replacement release every observer and retained node. | `architecture:react-component-runtime` | Settled candidate |-| FR12 | The plugin remains data-protocol agnostic. `onLoadMore` receives no Table-owned page, cursor, Relay, router, cache, or request-client object. | Public ownership boundary | Settled candidate |-| FR13 | In children mode the module is a no-op and emits at most one deduplicated development warning. This candidate outcome depends on OQ8's missing parent contract; it does not establish a rendering-mode signal on the current Table wrapper transform or permit mode inference from DOM. | Missing `component:Table` dependency, OQ8 | Hold: parent contract decision required |-| FR14 | Reconfiguration during a load follows one approved caller-visible reset or React remount boundary. Settlement from a load started before that boundary neither calls `onLoadMore`, makes a call eligible, nor changes loading presentation for the current configuration. Caller response ownership remains unchanged. | Caller-visible reset and stale-completion safety | Human API decision |+| ID | Approved invariant | Basis | Verification obligation |+| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------- |+| FR1 | One mounted hook returns one stable plugin and reads current callbacks/configuration without restarting its request generation. Callback identity changes do not clear a latch or failure pause. | DEC-1; parent identity contract | Contract complete; evidence pending |+| FR2 | One sentinel and one load/progress surface append to accumulated `afterTable` inside the parent scroll-wrapper content box, outside the semantic table. Prior props, refs, styles, before/after content, and chrome survive. No non-row content enters table sections or rows. | Parent wrapper contract; DEC-2 | Contract complete; evidence pending |+| FR3 | Automatic requests require admitted data mode, `hasMore=true`, committed `isLoading=false`, no outstanding latch, no failure pause, and a currently intersecting sentinel. The latch is set before calling the current callback; observer/manual/reentrant paths share it. | DEC-1 | Contract complete; evidence pending |+| FR4 | A fulfilled Promise completes after settlement and the first subsequent commit observing current `isLoading=false`; no true phase is required. Invocation never rearms from a pre-call false snapshot. A non-Promise result is invalid configuration: release the invocation latch, pause automatic loading, emit one development diagnostic and restore the manual command once controlled loading is false. An invalid callback cannot create a permanent inferred-busy state. | DEC-1 | Contract complete; evidence pending |+| FR5 | After a successful current request reaches FR4's gate, a still-visible sentinel with `hasMore=true` rearms after commit without needing an exit/re-entry gesture. Each following batch uses a fresh latch, never a recursive same-stack callback loop. | DEC-1 | Contract complete; evidence pending |+| FR6 | `hasMore=false` disconnects observation and removes command/progress without an unsolicited exhaustion announcement. When exhaustion removes a focused command, focus moves to the parent's programmatic Scroll-region destination with `preventScroll`; other focus is untouched. False-to-true may rearm only under current completion/pause gates. | DEC-3 | Contract complete; parent review and evidence pending |+| FR7 | Missing IntersectionObserver disables automatic observation without throwing or breaking SSR/hydration. The same manual Button remains available; unsupported observation never creates a silent dead end. | DEC-3 | Contract complete; evidence pending |+| FR8 | One fixed progress presentation uses the mounted Load more Button's `isLoading` state for current effective loading. Button's persistent polite loading region is the sole announcement owner under `spec:AST-086` FR3/FR4/FR8; its Spinner is silent. The module does not announce the same loading message through `useAnnounce` or add another live region. Latch/controlled updates coalesce into one busy transition, without observer-event or appended-row announcements. No module-owned error chrome or public progress renderer exists. | DEC-4/DEC-5 | Contract complete; implementation/AT evidence pending |+| FR9 | Loading does not call other plugin callbacks, mutate selection/activation/sort/filter state, replace rows, or reset scroll. Caller data updates remain caller-owned. | Ownership boundary | Contract complete; evidence pending |+| FR10 | Empty data can load. The stable plugin publishes its effective loading snapshot through `TablePlugin.renderState` before sections are constructed, together with immutable `hasMore` availability from the same controlled configuration: a current outstanding latch or controlled loading contributes true while `hasMore` is true, and exhaustion contributes false. Parent FR22 gates that contribution by current mode/model/wrapper admission before suppressing only the default initial EmptyState. Completion without rows restores ordinary empty behavior; caller empty/error content remains caller-owned. | Parent FR22; DEC-4 | Contract complete; parent implementation and evidence pending |+| FR11 | The root is the parent-owned Table block viewport when present, otherwise the browser viewport. Native IntersectionObserver ancestor clipping handles outer nested scrolling; no nearest-scroll-ancestor discovery or second viewport exists. Root/sentinel replacement disconnects obsolete resources before acquisition. | Parent FR19; DEC-2 | Contract complete; parent review and evidence pending |+| FR12 | The module stays data-protocol agnostic and adds no cursor, page, router, cache, request-client, reset, root-ref, look-ahead, or loading-renderer API. Internal look-ahead is zero. | DEC-6 | Contract complete; evidence pending |+| FR13 | The parent's mode/admission context drives children-mode no-op and one deduplicated development warning. Missing/unknown mode or non-flat/unsupported custom body modifiers disable the new capability in all builds with deduplicated diagnostics, preserving legacy props and plugins. Mode is never inferred from DOM. | Parent FR17-FR18; DEC-7 | Contract complete; parent review and evidence pending |+| FR14 | A reset remounts the component owning this hook and its Table together. Settlements from a prior generation cannot invoke, rearm, announce, or paint the new generation. Remounting only the Table child is not a reset. Ordinary callback/config changes do not reset outstanding work or failure pause. | DEC-6 | Contract complete; evidence pending |### Transformation and precedence order-- **ORD1 — Exhausted/loading gate.** Resolve `hasMore` and `isLoading` before observing or exposing a manual command.-- **ORD2 — Current configuration.** Calls use the current `onLoadMore` and respect the approved reset/remount boundary; changing callback identity alone does not end an in-flight load or silently redefine product-data ownership.-- **ORD3 — One load at a time.** From invocation of `onLoadMore` until the approved completion condition, no observation or manual activation invokes it again, including reentrant activation from caller code. Synchronous throws and asynchronous settlement follow OQ2's completion rule.-- **ORD4 — Completion after reset.** FR14 excludes settlement from before a reset/remount from invoking or enabling a call or changing current loading presentation. Completion of a current-configuration load follows OQ2/OQ5 and the controlled inputs; the plugin never commits or rejects caller data.-- **ORD5 — Rearm.** Controlled completion and continued `hasMore` rearm the current sentinel, including when it remains visible.-- **ORD6 — Presentation.** Exhausted, loading, automatic, fallback, and error-adjacent states render one coherent after-table surface.-- **ORD7 — Parent pipeline.** In data mode the module appends to accumulated `afterTable` content and preserves prior wrapper props, styles, refs, and chrome; children mode returns prior props unchanged, subject to OQ8's parent contract dependency.+- **ORD1 — Parent mode and admission.** Consume optional second context to `transformScrollWrapper` before adding resources/chrome; children, missing context, and unsupported row models retain prior props unchanged.+- **ORD2 — Gates and current values.** Resolve `hasMore`, committed `isLoading`, outstanding latch, failure pause, and current generation before every automatic/manual attempt.+- **ORD3 — One invocation.** Set the latch before the current callback; reentrant/manual/observer attempts see it immediately. Callback identity never resets it.+- **ORD4 — Completion barrier.** Apply FR4's Promise completion or invalid-result recovery and the current generation check. Rearming happens after commit, not synchronously inside callback settlement.+- **ORD5 — Failure.** Throws/rejections pause automatic loading under DEC-5. Manual retry is the only in-place recovery; owning-hook remount starts a new generation. More-data toggles and observer churn do not clear a pause.+- **ORD6 — Presentation and focus.** Apply the surface states below, suppress conflicting initial empty state through parent render planning, and transfer focus when exhaustion removes a focused command.+- **ORD7 — Parent pipeline.** Declare `rowModel: 'flat'` without claiming `wholeRowOwner`; append after existing `afterTable` and preserve prior wrapper contributions. Use the one parent viewport, not a private scroll layer.++### Completion, failure, and surface states++A Promise remains latched through settlement and a subsequent current false commit, including a synchronously fulfilled Promise without a true loading phase. A still-pending Promise or caller-controlled `isLoading=true` remains busy because a known owner reports loading, not because a cycle is missing. A non-Promise result releases the invocation latch and pauses automatic requests; after a false commit the same manual command is operable again, without requiring a remount.+A throw/rejection ends the invocation and pauses automatic loading. Once settled and committed false, manual retry starts a fresh latch; success resumes rearming and failure retains the pause. Errors/stale data remain caller-owned, without duplicate error chrome or visible-sentinel retries.++| State | Surface and request behavior |+| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |+| Admitted, more data, ready | One localized Load more Button, including when observation works; visible sentinel can request automatically. |+| Current loading or outstanding completion latch | Same mounted/focusable Button, visibly busy and nonoperable for click/Enter/Space; one fixed progress presentation. |+| Initial loading with no rows | Loading surface rather than the default empty-state message; no prefilled or duplicated live region. |+| Failure-paused and committed not loading | Same operable manual Button retries; no automatic loop and no module-owned error chrome. |+| Exhausted | No command/progress/observer; hand off focus only if the removed command owns it. |+| Unsupported observation | Same manual/loading/exhausted states; automatic observation is absent. |+| Children/unsupported admission | No module sentinel, loading chrome, requests, or empty-state changes; deduplicated development diagnostic. |++The shared Button receives effective loading through `isLoading`, owning its+`aria-busy`, Spinner and persistent polite loading region; request guards preserve+focus and block repeated activation without native disabling. Its localized+loading region alone announces the busy transition, including an initially busy+mount under Button's empty-before-content rule. The module contributes no channel+call, live role or second loading message. Coalesced latch/controlled updates and+StrictMode replay must not create another busy occasion. The sentinel is not a tab+stop. A focused command's exhaustion successor follows parent FR22; fitting content+uses temporary programmatic focusability while explicit caller attributes remain+intact. No focus moves merely because loading settles or observation churns.### Performance and resources-- **PR1 — One observer.** At most one `IntersectionObserver` and one observed sentinel exist per mounted plugin instance.-- **PR2 — No scroll listener.** Native observation, not a per-frame or per-scroll JavaScript listener, drives automatic loading.-- **PR3 — Stable resources.** Callback updates do not recreate observation when the approved root/look-ahead geometry and sentinel are unchanged.-- **PR4 — Complete cleanup.** Unmount, sentinel replacement, root replacement, exhaustion, and loading transitions release obsolete observation.-- **PR5 — Constant callback work.** An observer entry performs constant coordination work and never scans rows or columns.+- **PR1 — One observer.** At most one IntersectionObserver and one observed sentinel exist per mounted hook; there is no row/column scan in an entry callback.+- **PR2 — Native observation.** No per-scroll/per-frame JavaScript listener drives loading; unsupported IO uses manual operation.+- **PR3 — Stable resources.** Current callback updates and no-op rerenders do not reconnect unchanged root/sentinel geometry; internal look-ahead remains zero.+- **PR4 — Closed cleanup cases.** Loading, exhaustion, children/unsupported mode, root/sentinel replacement, unmount, and StrictMode replay release obsolete observation. Loading-to-ready and exhausted-to-more acquire at most one current observer after gates pass; queued obsolete entries are ignored.+- **PR5 — Generation isolation.** Cleanup invalidates old node/async/announcement work without cancelling or committing caller data; settlement cannot touch a new mounted generation.## Accessibility contract-- **AR1 — Valid structure.** Sentinel, progress, and fallback UI stay outside the semantic table and do not appear as data rows or cells (WCAG 2.2 SC 1.3.1; DOM/accessibility-tree and browser evidence).-- **AR2 — Progress announcement.** Loading transitions use a non-interruptive status that does not repeat for observer churn or every appended row (WCAG 2.2 SC 4.1.3). Deterministic transition tests prove event count/order, and the approved implementation requires NVDA + Chrome on Windows and VoiceOver + Safari on macOS to prove spoken announcement timing under `spec:AST-009` FR4 and FR12.-- **AR3 — Operable fallback.** The approved fallback is a real keyboard-operable control with a localized name and visible focus; the sentinel itself is not an unexplained tab stop (WCAG 2.2 SC 2.1.1, 2.4.7, and 4.1.2; DOM/axe/real-browser evidence).-- **AR4 — Focus stability.** Appending rows does not move focus, reset focused descendants, or make the fallback disappear while it owns focus without a deterministic successor (WCAG 2.2 SC 2.4.3 and 2.4.7; real-browser keyboard evidence).-- **AR5 — Reduced motion.** Progress presentation does not require motion to communicate loading state and respects platform motion settings; real-browser visual evidence proves the supported states.-- **AR6 — Touch and zoom.** Automatic loading and fallback remain available without hover, precision pointing, or a fixed viewport size (WCAG 2.2 SC 1.4.10 and 2.1.1; responsive/touch real-browser evidence).-- **AR7 — Evidence boundaries.** Real AT evidence is limited to AR2's announcement claim or any later approved AT-dependent outcome; it supplements rather than replaces deterministic state, DOM, keyboard, and browser coverage.+- **AR1 — Valid structure.** Sentinel/progress/Button remain outside the semantic table and never become announced data rows/cells (WCAG 2.2 SC 1.3.1).+- **AR2 — Progress timing.** The mounted Load more Button's persistent polite loading region is the sole owner of each current busy-start message; the composed Spinner is silent and the module adds no channel call or live region (`spec:AST-086` FR3/FR4/FR6/FR8). Deterministic ownership/count tests verify one delivery per coalesced busy transition. Cross-platform spoken timing is recommended follow-up under `spec:AST-009`, not a fabricated completed test or extra owner.+- **AR3 — Manual operation.** A shared Button with localized name and visible focus exists whenever admitted and `hasMore=true`, independent of IO. Busy state preserves focus while blocking pointer and keyboard requests (SC 2.1.1, 2.4.7, 4.1.2).+- **AR4 — Focus stability.** Appending/loading do not move focus or remount the command. Exhaustion returns only the removed command's owned focus to the parent destination with `preventScroll`, never stealing unrelated focus (SC 2.4.3, 2.4.7).+- **AR5 — Motion.** Progress stays understandable without motion and respects reduced motion.+- **AR6 — Touch and zoom.** Manual and automatic paths require neither hover nor precise pointing and remain usable under touch, zoom, and responsive layout (SC 1.4.10).+- **AR7 — Evidence layers.** DOM/accessibility-tree and deterministic tests prove the single Button-region route, silent Spinner, state/keyboard/focus and cleanup. Spoken timing on NVDA + Chrome or VoiceOver + Safari follows the recommended `spec:AST-009` follow-up; no new virtual-cursor or precise speech claim is added by this module.## Design relationships-| Anatomy or state | Design requirement | Representation authority | Module contract |-| ------------------- | ------------------------------------------------------------------------------------- | ------------------------- | ----------------- |-| End sentinel | Supplies observation geometry without masquerading as table data or a control. | This module | FR2-FR7, AR1 |-| Loading progress | Communicates one active append operation without duplicating caller-owned chrome. | Unsettled pending OQ4 | FR3-FR8, AR2, AR5 |-| Manual load command | Provides an explicit fallback with normal control semantics and focus treatment. | Unsettled pending OQ3/OQ4 | FR7-FR10, AR3-AR4 |-| Exhausted state | Stops requesting and removes load affordances without adding an unsolicited message. | This module | FR6, ORD1, ORD5 |-| Error/retry | Remains outside the module unless a later loading/error composition contract owns it. | Caller or another module | FR8, non-goal |+| Anatomy or state | Design requirement | Representation authority | Module contract |+| ---------------- | --------------------------------------------------------------------- | -------------------------------------------- | ------------------- |+| Sentinel | Geometry only; no false row or control semantics. | Internal, no public target | FR2, FR11, AR1 |+| Manual command | Always present with more data; mounted focus-preserving busy state. | `component:Button`, existing `button` target | FR6-FR8, AR3-AR4 |+| Progress | One fixed localized presentation, not duplicate loading/error chrome. | DEC-4; shared primitives; no module target | FR8, FR10, AR2, AR5 |+| Exhaustion | No unsolicited message; deterministic focus successor. | DEC-3; parent Scroll region | FR6, AR4 |+| Error | Caller-owned content and request decision. | Caller | DEC-5 |-The module adds no direct theme target. OQ3/OQ4 must select any progress/fallback component and then name its exact existing target or record a classified `none`; no delegation is promised yet. Sentinel geometry is implementation detail rather than theme API.+No new Table/module theme target or state is public. Button retains its existing delegated target; sentinel/supporting status text is internal and non-customizable. The module retains Button's delegated target and defines no additional public anatomy target. Target verification remains an implementation obligation.## Parent and system relationships-- `component:Table` owns the scroll-wrapper phase and accumulated `afterTable` slot. **Missing parent dependency (OQ8):** its current contract does not establish a data/children mode signal at that phase. The module remains on hold until the parent contract records the approved mode distinction or makes the invalid combination unrepresentable; FR13 then cites that owning claim. This draft neither supplies a field nor approves a parent API change.-- `architecture:react-component-runtime` owns observer acquisition, current-value synchronization, node replacement, StrictMode replay, and cleanup boundaries.-- `architecture:public-component-api` and `spec:AST-002` require a protocol-agnostic API whose inputs express caller-owned state rather than implementation clients.-- `spec:AST-009` and `spec:AST-020` own announcement evidence and the WCAG/evidence-layer boundary; AR2 is the only current real-AT-dependent claim.-- Pagination and virtualization remain separate modules. Infinite loading can compose with them only where their current contracts explicitly permit it.+- `component:Table` FR17 and DEC-4 supply optional second `TableRenderContext` to `transformScrollWrapper`, with `mode`, admitted row model, logical/header counts, and a stable shared viewport reference; per-row `key`, `identityStatus`, and product/synthetic/unknown `kind` belong to `TableRowContext`, not wrapper inference. Unsupported structural models disable flat capabilities before transforms. FR18 owns pre-cell admission; FR19/DEC-5 own the both-axis viewport with inline containment and block allowance. The stable `renderState` source feeds effective loading into FR22 before section construction; parent mode/model/wrapper admission gates consumption, default empty suppression and exhaustion-focus ownership.+- Parent optional `rowModel` and `wholeRowOwner` declarations, not names/order/DOM, decide new-capability compatibility. V1 admits flat data only; tree/grouped/detail/custom-row models and undeclared custom body modifiers are unsupported opt-ins while legacy plugins retain their behavior.+- Flat selection, sorting, filtering, sticky columns, context menus, and row indices compose. Infinite loading and windowing share the parent viewport/render plan jointly after relevant module and parent approval; parent FR20 alone owns full virtual row metadata and totals. This module publishes `hasMore` through its render-state snapshot, preserving snapshot identity until loading or availability changes: `hasMore=true` makes the admitted nonempty windowed total unknown (`aria-rowcount=-1`), independently of busy/failure-pause state; exhaustion restores the parent H+N total. No module sets or infers a second count from mounted/loaded rows. Nonwindowed legacy caller counts and empty-table metadata remain unchanged.+- Runtime architecture owns observer acquisition, current-value synchronization, node replacement and StrictMode cleanup; public API rules keep the hook protocol-agnostic. Button owns its persistent loading-region machinery under `spec:AST-086`; the module supplies effective loading and does not duplicate its announcement.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation |-| ----------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| FR1, FR3-FR7, FR14, ORD1-ORD5 | Deterministic observer events, callback count/order assertions, and controlled rerenders | Visible/hidden, loading, exhausted, short batch, reentrant activation, throw, async settle, reset/remount | Calls overlap, pre-reset completion invokes or enables a call or changes current loading presentation, short batches dead-end, observation throws, or rearm fails. |-| FR2, FR8-FR10, FR12-FR13, ORD6-ORD7 | Table render and plugin-composition tests against the parent rendering-mode contract once OQ8 is resolved | Data/children mode, empty/non-empty, wrapper chrome, loading, exhausted, caller error UI | Invalid DOM appears, children mode renders a sentinel, warning repeats, prior chrome is lost, caller state is mutated, or states contradict; absent parent authority keeps OQ8 on hold. |-| FR11, PR1-PR5 | Observer lifecycle tests under StrictMode, root/sentinel/look-ahead change, unmount, and no-op rerender | Every approved acquisition, replacement, and release path | More than one observer survives, detached nodes remain observed, or stable inputs churn resources. |-| AR1, AR3-AR7 | DOM/accessibility-tree assertions, axe, and real-browser keyboard/touch/zoom/reduced-motion/focus flows | Automatic, fallback, loading, append, exhaustion, observer unavailable | Sentinel becomes a row/tab stop, focus is lost, fallback is inoperable, or responsive/motion behavior carries required meaning. |-| AR2 | Deterministic status-transition count/order tests plus NVDA + Chrome on Windows and VoiceOver + Safari on macOS | Initial load, repeated observer entries, short batches, completion, exhaustion | Status repeats, arrives out of order, is skipped, or announces observer churn/appended rows instead of loading transitions. |-| Public API and docs | Public-subpath compile fixture, `.doc.mjs`, generated inventory, Storybook, and one generic async-cache recipe | Controlled state, promise/void callback, approved reset/root/fallback/look-ahead inputs | API leaks a client, exposes look-ahead without admission, cannot express the approved reset boundary, promises unsettled behavior, or permits contradictions. |-| Performance | Extend Table performance coverage with stable no-op, observer callback, and repeated append budgets | Large representative data and repeated batches | Stable rerenders recreate resources, callbacks scan rows, or appends exceed recorded budgets. |-| Structural ownership | `pnpm check:knowledge` | Draft module and parent backlink | A missing, orphaned, misnamed, wrong-kind, or duplicate module record passes validation. |+Required implementation checks remain pending; recommended spoken-timing follow-up+is identified separately and is not a second announcement owner or release gate.+Frontmatter paths are verification targets, not assertions that files exist or pass.++| Contract | Verification | Representative states | Mutation or failure expectation |+| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |+| FR1, FR3-FR7, FR14, ORD1-ORD5 | Pending deterministic observer/manual events and controlled-commit tests in the module unit suite. | Reentry; Promise pending/fulfilled/rejected with controlled true/false; synchronous fulfillment without a true phase; invalid non-Promise result and operable manual recovery; visible short batches; callback replacement; hook-owning reset versus child-only remount. | Overlap, stale-false rearm, same-stack recursion, immediate failure loop, dead-ended short batches, or prior-generation request/paint fails. |+| FR2, FR8-FR10, FR12-FR13, ORD6-ORD7 | Pending render/composition tests through the parent mode/render plan. | Data/children/unknown context; flat/non-flat/custom; empty initial loading; chrome/refs; caller errors. | Invalid DOM, children sentinel, repeated warning, replaced chrome, contradictory empty/progress, or duplicated error UI fails. |+| FR11, PR1-PR5 | Pending lifecycle and geometry tests under StrictMode. | Parent block root/viewport fallback/nested ancestor clipping; root/node replacement; ready/loading/exhausted/false-to-true; absent IO; unmount. | Ancestor discovery, leaked/multiple observers, stale entries, callback churn, or new-generation effects fails. |+| AR1, AR3-AR7 | Pending `TableInfiniteScroll.a11y.chromium.spec.ts`, DOM/tree, axe, browser keyboard/touch/zoom/motion/focus flows. | Ready/busy/manual/unsupported IO, append, focused and unrelated-focus exhaustion, fitting Scroll region. | Native disabling loses focus, busy requests fire, missing manual command, false row semantics, or focus handoff scroll/steal fails. |+| AR2 | Pending DOM/accessibility-tree and transition-count checks of the single Button region and silent Spinner; spoken timing is recommended follow-up. | Initial load, latch/controlled updates, repeated entries, short batches, completion/failure/exhaustion, replay, reset. | Duplicate/skipped/out-of-order or stale-generation progress, prefilled regions, and churn announcements fail. |+| Public API and docs | Pending compile fixture, inventory, `.doc.mjs`, Storybook, and generic async recipe. | Three fields; Promise completion and invalid void-result diagnostics/recovery; owning-hook React key reset; manual fallback. | Client/root/reset/look-ahead/renderer API leaks, wrong reset owner, or undocumented completion obligations fails. |+| Performance | Pending extensions to `Table.perf.test.tsx` for stable identities, callback work, and repeated appends. | No-op rerender, many batches, flat load/window composition. | Resource churn, row scans, or recorded budget regressions fails. |+| Structural ownership | `pnpm check:knowledge` structural check; implementation evidence is separate. | Current module/backlink, schema 3/template 4. | Missing, duplicate, wrong-kind, misnamed, or orphaned records must fail. |## Decision log-### DEC-1 — Infinite scroll owns loading coordination, not data+### DEC-1 — Latch before request and complete after commit**Reference:** `module:Table/useTableInfiniteScroll/DEC-1`-**Decider:** pending owner approval--The module observes the end of rendered Table content and asks the caller for another batch. It owns at-most-one-in-flight loading, callback eligibility after completion/reset, rearming, and presentation under FR4/FR14 and ORD2-ORD5, not an internal coordination mechanism. The caller remains the sole owner of rows, request protocol, cache, cursor/page, stale-response suppression, errors, and retry policy.+**Decider:** `humbertovirtudes`, `2026-11-03`-Rejected: importing a router/query client, mutating Table data, or combining cursor,-server-pagination, Relay, and infinite-loading contracts.+All paths share a pre-invocation latch and require a Promise. Settlement plus a subsequent committed false snapshot completes a valid request without requiring a true phase. Invalid non-Promise results release the invocation latch, pause automatic attempts, and preserve operable manual recovery once controlled loading is false. Successful short batches rearm after commit.+Rejected: unobservable void completion, a mandatory true-to-false cycle, or treating invalid callback output as permanently pending.-### DEC-2 — The sentinel is after the table+### DEC-2 — Parent geometry and after-table placement**Reference:** `module:Table/useTableInfiniteScroll/DEC-2`-**Decider:** pending owner approval+**Decider:** `humbertovirtudes`, `2026-11-03`-Observation and progress UI use the parent scroll wrapper's `afterTable` slot. They never-insert non-row elements into semantic table structure or synthesize a fake data row.+The parent's block viewport is the root when present, otherwise the browser viewport. Native ancestor clipping handles nesting. One surface appends outside the table.-Rejected: a `<div>` inside `<tbody>`, a sentinel `<tr>` announced as data, and a focusable-sentinel with no user command.--### DEC-3 — Automatic loading requires an operable fallback+### DEC-3 — Always-operable manual path and deterministic focus**Reference:** `module:Table/useTableInfiniteScroll/DEC-3`-**Decider:** pending owner approval+**Decider:** `humbertovirtudes`, `2026-11-03`++A Load more Button exists with more data, stays mounted/focusable while busy, and is nonoperable until completion. Exhaustion transfers only the removed command's owned focus to the parent Scroll region with `preventScroll`.+Rejected: IO-only loading, hiding the command during loading, or stealing unrelated focus on exhaustion.++### DEC-4 — The Load more Button owns loading announcements++**Reference:** `module:Table/useTableInfiniteScroll/DEC-4`+**Decider:** `humbertovirtudes`, `2026-11-03`++Shared Button primitives render one fixed loading surface. Its persistent polite+loading region is the sole busy-message owner; the module supplies coalesced+loading state and adds no channel call. Initial loading suppresses only the default+empty message. Required verification checks routing and ownership deterministically;+real spoken timing remains recommended follow-up.+Rejected: a public loading renderer, a second channel/region for Button's loading message, or duplicate error/progress chrome.++### DEC-5 — Failure pauses automatic loading++**Reference:** `module:Table/useTableInfiniteScroll/DEC-5`+**Decider:** `humbertovirtudes`, `2026-11-03`++Throws/rejections pause automatic loading until gated manual retry or owning-hook remount. Manual success resumes rearming. Caller-owned errors/stale data, more-data toggles, and callback changes never silently reset failure.+Rejected: immediately retrying a visible failed sentinel or module-owned error/retry panels.++### DEC-6 — Zero look-ahead and hook-owning remount reset++**Reference:** `module:Table/useTableInfiniteScroll/DEC-6`+**Decider:** `humbertovirtudes`, `2026-11-03`++Look-ahead is internal zero. Dataset reset keys the component owning both hook and Table; old settlements cannot affect the new generation. The caller still suppresses stale product-data commits.+Rejected: public look-ahead/reset APIs, Table-child-only remount as reset, or module cancellation of caller data.++### DEC-7 — Parent mode and flat admission-Automatic observation is progressive enhancement. An approved fallback prevents a dead-end when observation is unsupported, disabled, or unsuitable and gives keyboard users an-explicit command without making the sentinel itself interactive.+**Reference:** `module:Table/useTableInfiniteScroll/DEC-7`+**Decider:** `humbertovirtudes`, `2026-11-03`-Rejected: silently doing nothing without IntersectionObserver and making automatic loading-the only path.+Parent context/declarations admit flat data loading and the shared viewport. Children mode is a deduplicated-warning no-op; unknown/non-flat/custom-body incompatibility neutralises the capability while preserving legacy plugins.## Open questions-- **OQ1 — Who owns the block-scroll root?** (`human-api`) Decide viewport default versus an explicit caller root/ref, and how Table nested in a vertical `ScrollableArea` identifies the correct root without brittle ancestor discovery.-- **OQ2 — What observable event completes a load?** (`human-api`) Decide whether controlled `isLoading`, a returned promise, or both permit another `onLoadMore` call after synchronous throw and asynchronous settlement.-- **OQ3 — When is manual fallback shown?** (`human-design`) Decide always-visible, observer-unavailable-only, user-selected, or another policy; define focus behavior when loading/exhaustion removes it.-- **OQ4 — What loading customization is public?** (`human-api`) Decide whether the module renders one fixed default, accepts `renderLoadingIndicator`, composes an existing loading-state module, or stays behavior-only while still meeting progress requirements.-- **OQ5 — How do error and retry compose?** (`human-api`) Keep error content caller-owned, but define how a failed request rearms automatic loading and avoids immediate retry loops or duplicate loading/error chrome.-- **OQ6 — Is caller-configurable look-ahead admitted?** (`human-api`) First prove a non-derivable caller distinction under `spec:AST-002`; if admitted, choose an intent-named distance API with explicit units/default rather than reusing browser `threshold` terminology, which conventionally means an intersection ratio. Keep it out of the candidate interface until then.-- **OQ7 — What is the caller-visible reset boundary?** (`human-api`) Decide an explicit caller-owned reset identity versus a documented React remount/key boundary when dataset/query configuration changes during a load. Pre-reset settlement neither invokes nor enables a call nor changes loading presentation for the current configuration; stale product-data suppression remains the caller's job.-- **OQ8 — Which parent contract distinguishes data from children mode?** (`human-api`) Decide a parent-owned rendering-mode signal at the wrapper transform versus making the invalid combination unrepresentable, preserving FR13's warning/no-op outcome for children mode. The chosen behavior belongs in `component:Table`, and FR13 must cite its approved owning claim before this module is promoted. This missing dependency remains on hold; no parent field or approval is assumed.+None. The normative contract is complete. Implementation and release verification+remain separate from contract approval.## Content boundary-This record does not duplicate consumer signatures/examples, the parent Table wrapper-protocol, general observer mechanics, current usage audits, implementation steps, or-pagination/virtualization/data-client contracts. It links to their canonical owners.+This record links rather than duplicates consumer examples, parent protocol, observer/live-region machinery, audit results, implementation plans, or caller data/error and pagination/virtualization contracts.diff --git a/docs/specs/components/Table/plugins/virtualization/useTableRowsVirtualization.spec.md b/docs/specs/components/Table/plugins/virtualization/useTableRowsVirtualization.spec.mdnew file mode 100644index 0000000000..8197dcc93a--- /dev/null+++ b/docs/specs/components/Table/plugins/virtualization/useTableRowsVirtualization.spec.md@@ -0,0 +1,251 @@+---+schema_version: 3+template_version: 4+kind: module+id: module:Table/useTableRowsVirtualization+authority: current+archive_reason: null+superseded_by: null+approved_by: humbertovirtudes+approved_at: 2026-11-03+owners: [cixzhang]+review_triggers:+ [+ public-api,+ behavior,+ layout,+ theming,+ accessibility,+ interaction,+ performance,+ react-runtime,+ ]+verified_by:+ [+ packages/core/src/Table/plugins/virtualization/useTableRowsVirtualization.test.tsx,+ packages/core/src/Table/__tests__/TableVirtualization.a11y.chromium.spec.ts,+ packages/core/src/Table/Table.perf.test.tsx,+ scripts/check-knowledge.mjs,+ ]+parent_component: component:Table+references:+ [+ architecture:component-theming-surface,+ architecture:interaction-modality,+ architecture:public-component-api,+ architecture:react-component-runtime,+ spec:AST-002,+ spec:AST-009,+ spec:AST-020,+ spec:AST-025,+ ]+---++# useTableRowsVirtualization module contract++## Contract at a glance++| Area | Contract |+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | `useTableRowsVirtualization({rowHeight, viewportHeight})` returns an opaque `TableVirtualizationCapability` for `Table.virtualization`; Table retains data, columns, explicit stable identity and plugins. |+| Behavior | Fixed-height flat-row windowing with four internal overscan rows per side, at most one retained focused row, native table semantics and parent-owned pre-cell planning. |+| End-user impact | Mounted rows preserve selection, controls, focus and truthful full-table positions; unmounted rows are not promised virtual-cursor discovery. |+| Builder impact | Callers choose total row pitch and bounded viewport height in CSS pixels and accept constrained single-line content; unsupported content falls back to full rendering. |+| Compatibility/readiness | Additive, unreleased capability; legacy output remains unchanged without opt-in. Module and parent contract decisions are complete; implementation and numerical verification remain separate release requirements. |+| Review checks | Reject render-then-hide, independent keys or scroll owners, invalid native structure, silent clipping/drift, lost focus, unbounded retention, window-relative metadata and unmeasured budget claims. |+| Governing rules | `component:Table` owns identity, context, admission, render planning, viewport and logical appearance. `spec:AST-025` FR18/FR19 constrain scrolling; `spec:AST-002` and runtime/accessibility architecture constrain API and evidence. |++This table is a review projection; the body below is authoritative.++## Intent++`useTableRowsVirtualization` bounds mounted body rows for caller-owned flat Table data.+Its capability describes fixed geometry; Table owns the semantic rendering pipeline.+Virtualization limits DOM, not product data, fetching, pagination or cache lifetime.++## Compatibility and migration++- Released default preserved: `yes`; absent `Table.virtualization`, rendering, identity and nonvirtualized paginated `rowIndexStart`/`rowCount` output remain unchanged.+- Compatibility class: additive hook, opaque capability and parent opt-in. Virtualized data mode requires valid explicit identity and constrained content; conflicting legacy offset/count inputs use full-render fallback.+- Migration decision: `module:Table/useTableRowsVirtualization/DEC-1` and `component:Table/DEC-4`/`DEC-5`. The normative module and parent contracts are complete; implementation and release verification remain separate.++Consumer migration instructions belong in consumer docs and release notes.++## Ownership boundary++**Owns**++- Fixed-height capability, visible range, internal overscan and gap geometry.+- Bounded retained-focus participation, anchor policy and virtualized accessibility outcomes.+- Supported flat-row composition, fixed-height admission and performance targets.++**Does not own / non-goals**++- Data, columns, canonical identity, rendering mode, row kind, whole-row ownership, pre-cell render plan, viewport and logical appearance metadata: `component:Table`.+- Fetching, loading presentation, selection, activation, sort/filter state, navigation, route restoration or arbitrary imperative row navigation: their module or product owners.+- Tree/grouped/detail rows, expanded panels, custom row anatomy, paginated global-offset data, variable-height or column virtualization in v1.+- A new theme target, public ScrollableArea wrapper, external-root mode, overscan setting or `scrollToRow` API.++## Public API and concepts++The hook returns an opaque `TableVirtualizationCapability` from `rowHeight` and+`viewportHeight`, never data or identity. Table consumes it with its existing+`data`, `columns`, `idKey` and `plugins` and owns types/runtime admission.++| Concept | Values or states | Meaning | Default | Owner | Stability |+| ------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | --------------------- | --------------------------------- | ------------------ |+| Geometry | Positive finite CSS-pixel `rowHeight` and `viewportHeight` | Total body-row pitch and bounded Table viewport height | Both required | This module | Stable; unreleased |+| Capability | Opaque Table-compatible value | Carries geometry intent, not sliced props or an engine handle | Absent without opt-in | This module; parent consumption | Stable; unreleased |+| Identity/data | Ordered mutable-compatible `T[]`; valid explicit `idKey` | One complete logical dataset and parent-resolved key source | Required for opt-in | `component:Table` | Parent dependency |+| Range | Half-open contiguous logical interval | Viewport-intersecting rows before overscan | Derived | This module | Stable; unreleased |+| Focus island | Absent or one retained product-row subtree | Preserves the focused row outside the ordinary window | Absent | This module; existing focus owner | Stable; unreleased |+| Metadata | Logical index/count, header count, parity and final-row state | One source for distinct ARIA and visible numbering | Derived | `component:Table` | Parent dependency |++## Behavioral contract++These requirements define the complete normative contract. Implementation,+browser, accessibility and performance verification remain release requirements.++| ID | Invariant | Basis | Verification state |+| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------- | -------------------- |+| FR1 | Unchanged geometry preserves capability identity. Unchanged logical data, keys, columns, plugins and effective mounted set preserve output identities and do not invoke product renderers again. | Parent memoization; runtime identity | Required for release |+| FR2 | Mounted data is one contiguous visible window with four overscan rows per side plus at most one discontiguous focused product row. The island is never duplicated inside the window. Empty data mounts no data, spacer or island row. | DEC-4; bounded DOM | Required for release |+| FR3 | Mounted row pitch plus at most three nonzero gap segments equals `logicalDataRowCount * rowHeight`. Gaps use omitted-row count, not DOM-relative indices. Invalid arithmetic or an unrepresentable browser extent disables virtualization rather than compressing geometry. | Fixed geometry; native scrolling | Required for release |+| FR4 | Table retains native table/section/row/cell elements. Each gap is an inaccessible native spacer row/cell with final-column span and no content, padding, border, theme target, state, focus stop or product transform. Structural elements are neither block-rewritten nor absolutely positioned. | Native HTML; DEC-2 | Required for release |+| FR5 | For nonempty flat data, headers have indices `1..H`, data row `i` has `aria-rowindex=H+i+1`, and Table exposes the parent's FR20 row total: `-1` while admitted incremental loading reports more data, otherwise H+N. Spacers count as neither. Visible row numbering derives `i+1` from the same parent logical source. Empty data preserves the parent empty-state branch without virtual metadata. | Parent FR20; full-table semantics | Required for release |+| FR6 | Table validates explicit identity across the complete logical dataset and supplies its canonical key and validity to virtualization and row transforms. Function keys preserve string/finite-number type; valid property keys use the parent's string projection. Internal React keys distinguish canonical numeric and string keys. Invalid/duplicate/missing identity disables virtualization in all builds. | Parent FR16; DEC-3 | Required for release |+| FR7 | A focused row leaving the window remains in the same keyed body-child sequence with its original subtree. Real focus departure, removal or return releases the island; focus transfer replaces it without retaining a second row. Scrolling alone never moves focus or reveals the island. | Existing focus owner; DEC-4 | Required for release |+| FR8 | Order/data/height changes preserve the first-visible canonical key and fractional row offset, not the active or focused key. A removed anchor resolves to the first surviving successor in old order, then predecessor, then start; the result clamps to the new extent. Appending does not follow the tail. | Controlled data; DEC-4 | Required for release |+| FR9 | Flat selection, sort/filter controls, sticky columns, context menus and row indexing preserve their existing owners. Activation and infinite loading compose only with joint parent/module admission and verification; active state does not retain rows, and loading uses an after-table sentinel beyond the full loaded extent. | Parent FR17/FR18; independent modules | Required for release |+| FR10 | Server and first client use the same seed `[0, min(N, ceil(viewportHeight/rowHeight)+4))` and gaps from the same validated inputs. There is no initial-count API, full-render-then-collapse or empty-then-repair. Unmeasurable client geometry retains the seed or last valid range. | SSR; runtime architecture | Required for release |+| FR11 | Viewport and content invalidation use the parent's both-axis geometry/pooled resize path with inline `contain`, block `allow`, one viewport scroll subscription and at most one pending range frame. Stable no-op renders do not reconnect resources or reset scroll; replaced nodes and stale work cannot publish geometry. | Parent FR19; runtime lifetime | Required for release |+| FR12 | V1 has no public imperative scrolling API. Internal anchor or focus coordination remains distinct from activation, navigation and fetching; native viewport scrolling remains available. | Public responsibility; DEC-1 | Required for release |+| FR13 | Bounded renderer/DOM counts and the PR targets gate completion. Offscreen content is not constructed and then hidden, discarded or sliced; identity validation is not counted as offscreen cell rendering. | Parent FR18; performance | Required for release |+| FR14 | Accepted fixed mode defaults unspecified `textOverflow` to existing single-line truncation; explicit `wrap` disables virtualization. Default cells and recognized height-safe plugin cells preserve font size, control targets, density/theme padding and collapsed-border contribution within the total declared pitch. Arbitrary custom renderers, wrapping, media/editor/detail content or custom spans fall back. Overflow or pitch violations remove fixed constraints and render fully; a numeric native row height alone is insufficient. | Fixed-height enforceability; DEC-2 | Required for release |+| FR15 | Striping and all `rows`, `columns`, `grid`, `none` divider modes derive parity/final-row paint from parent metadata in virtual mode only. Ordinary CSS remains unchanged. Selection/hover and pinned-cell overlay projection retain their canonical precedence; disappearing final-row paint does not change pitch. | Parent FR20/FR21; logical appearance | Required for release |+| FR16 | Accessibility claims cover truthful positions of mounted rows, not virtual-cursor discovery of unmounted rows. Scrolling does not add live-region announcements or an ARIA-grid/roving-row contract. | Accessibility evidence boundary | Required for release |++### Transformation and precedence order++- **ORD1 — Logical inputs.** Caller sort/filter owners establish Table data; parent identity, rendering mode, row kind and ownership resolve before windowing.+- **ORD2 — Admission.** Parent validates capability geometry, identity, flat compatibility and fixed content before invoking product cell renderers. Children mode remains an unchanged no-op.+- **ORD3 — Range.** Body-relative scroll geometry accounts for headers/chrome and sticky occlusion once; range intersection is clamped, expanded by four rows per side and combined with one focus island.+- **ORD4 — Rendering.** Parent BaseTable performs the pre-cell plan, renders gaps and keyed product rows in logical order, and runs existing sequential element transforms only on mounted product rows.+- **ORD5 — Metadata/paint.** Parent logical indices/counts drive ARIA, row numbering, parity and final-row appearance before paint; selection and activation retain their respective state owners.+- **ORD6 — Change/fallback.** Anchor reconciliation and range publication use the same current inputs; disabled virtualization releases resources/gaps/constraints, preserves unrelated plugins and fully renders compatible content with one deduplicated development diagnostic per condition. Recovery requires a changed valid admission input, not repeated retry of a violating configuration.++### Performance and resources++- **PR1 — Structural bound.** With unobscured body viewport `V`, mounted product rows are at most `ceil(V/rowHeight)+1+8+1`; the final one is the optional island. SSR rows are bounded by FR10's seed. There are at most three nonzero gaps; cells and element work scale with mounted rows/columns, never total data length.+- **PR2 — Geometry.** Range arithmetic uses declared pitch, not a variable-size cache or offscreen measurement. Bounded mounted-content diagnostics verify pitch/overflow after mount and font/theme/zoom/geometry invalidation through shared observation; they create no per-row observer fan-out.+- **PR3 — Stable work.** A no-op/current-window scroll invokes zero product renderers. A changed mounted item updates one row. Parent identity/order-map validation may be O(N) on changed data or identity but never per scroll; caller sort/filter cost is recorded separately.+- **PR4 — Shared lifetime.** Parent shared viewport/content observation also serves sticky state; no independent virtualizer detector or second viewport is installed. Unmount, disablement and node replacement release owned subscriptions, queued frames, island elements and obsolete snapshots without silencing shared subscribers.+- **PR5 — Timing targets.** The p95 range-plus-commit target is 4 ms; p95 no-op is 2 ms. At 60 Hz, p95 whole-frame work is at most 16.7 ms with at most 1% missed frames and no persistent blank windows. Core cold render at 100k rows, including key validation, is at most 250 ms. Supported-plugin incremental p95 scroll overhead is at most 2 ms.+- **PR6 — Memory targets.** Additional identity bookkeeping is at most 32 MiB at 100k rows, excluding caller data. Fixed-viewport mounted heap at 100k is at most the 1k case plus 8 MiB. After 20 mount/unmount and viewport-replacement cycles, controlled-GC retained growth plateaus within 1 MiB and no instance node, listener or frame survives.+- **PR7 — Evidence.** Targets are release requirements, not measured results. Verification records environment/build/browser versions, corpus, viewport/pitch/column count, p50/p95/max and operation counts at 1k/10k/100k, core and supported combinations; timing and memory results remain outside this record.++## Accessibility contract++- **AR1 — Native semantics.** Header/cell associations and full-table row metadata follow FR4/FR5; gaps have no accessible names, roles as data, controls or state.+- **AR2 — Keyboard access.** The parent's named effective viewport preserves native Arrow/Page scrolling and Tab/Shift+Tab through mounted controls. Tab does not claim traversal of unmounted rows or transfer navigation-key ownership from nested controls.+- **AR3 — Focus retention.** One keyed row persists while it or its recognized owned menu subtree holds focus. Existing menu/layer owners preserve dismissal and focus return, including portalled controls through parent ownership coordination; DOM containment alone does not establish portal ownership.+- **AR4 — Removal.** If row removal otherwise detaches current focus, focus returns to the parent's named viewport with `preventScroll` through shared modality-aware focus. FR22 supplies temporary programmatic-only focusability when fitting content has no sequential viewport stop, preserving explicit caller attributes and restoring the temporary attribute on departure. A caller-selected surviving successor is not stolen. Returning focus to a retained row uses the existing focus owner, not an independent overlay/focus manager.+- **AR5 — Content admission.** Zoom, text reflow and theme/density changes preserve required content and interactive target sizes or trigger full-render fallback, not silent clipping. Default single-line truncation preserves the existing text semantics and overflow affordance.+- **AR6 — Evidence limits.** DOM/accessibility-tree and real-browser keyboard evidence prove structure, indices, control operation and focus. Real AT is required only for an admitted AT-dependent outcome or recorded divergence under `spec:AST-009`; infinite-loading announcement evidence remains with that module.++## Design relationships++| Anatomy/state | Design requirement | Representation authority | Module contract |+| ------------------- | ---------------------------------------------------- | ------------------------------------------- | --------------- |+| Product row/cell | Equivalent logical-row appearance and controls | Existing Table targets and state owners | FR14/FR15 |+| Gap segments | Geometry only; inaccessible and unpainted | This module; no theme target | FR3/FR4 |+| Viewport | One coordinated Table-owned scroll region | Parent FR19/DEC-5; `spec:AST-025` FR18/FR19 | FR11; PR4 |+| Focus island | Same keyed row, not another visual component | Existing row and focus/menu owners | FR7; AR3/AR4 |+| Overflowing content | Full-render fallback; no reduced font or target size | Parent fixed-content admission | FR14; AR5 |++The module adds no theme target. Spacer sizing is internal geometry; logical-row+paint and pinned overlay coordination remain parent-owned.++## Parent and system relationships++- `component:Table` FR16 owns canonical identity; FR17 owns optional row-transform and wrapper context, rendering mode, row kind and whole-row ownership. The parent owns optional `rowModel: 'flat' | 'tree' | 'grouped' | 'detail' | 'custom'` and `wholeRowOwner: 'activation' | 'expansion' | 'navigation'` declarations and compatibility, not this module.+- Parent FR18 owns pre-cell planning and flat admission. Missing compatibility for an unknown custom body modifier disables virtual opt-in; it does not invalidate ordinary legacy usage. Tree/grouped/detail/custom-row combinations fall back without name/order or private-marker inference.+- Parent FR19/DEC-5 owns the existing both-axis viewport, inline containment/block chaining, shared geometry and pooled resize. `spec:AST-025` FR18/FR19 prohibit incidental same-axis nesting and uncoordinated external owners.+- Parent FR20 owns logical metadata and the virtualized-only ARIA path; FR21 owns one coordinated row/pinned paint outcome. DEC-4 owns identity/interaction ownership and DEC-5 owns render-plan/viewport integration.+- `architecture:react-component-runtime` owns current geometry, rendered-state/resource separation, node replacement, StrictMode replay and cleanup. `architecture:public-component-api` and `spec:AST-002` own capability reachability and caller burden.+- Activation, infinite loading and virtualization require joint current parent/module admission before supported composition is released. The loading sentinel follows the full loaded extent outside semantic table data; the parent FR20 owns row totals, including `-1` while admitted loading reports more data. Loading owns availability, announcements and reset semantics, not a second row-count writer. Activation neither supplies identity nor makes active state a focus/scroll owner.++## Verification map++Implementation verification is a separate release requirement; structural checks+alone are not runtime evidence.++| Contract | Verification | Representative states | Mutation/failure expectation |+| ----------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |+| FR1-FR6; PR1-PR3 | Actual Table renderer-count, native DOM, geometry/identity tests | Empty/short/first/middle/end, fractional pitch, 0/'0', duplicates, invalid keys, one island/three gaps | Removing pre-cell slice, typed keys, validation or correct gaps fails bounded-work/geometry assertions. |+| FR7/FR8; AR2-AR4 | Real-browser focus and anchor integration | Scroll focused row/menu out/in, portal focus, transfer/removal, caller successor, sort/filter/insert/delete/replace/append | Remount, second island, lost focus, stolen successor, stale anchor or tail-follow fails. |+| FR9/FR14/FR15 | Plugin and canonical visual regression matrix | Selection/sort/filter/sticky/context-menu/index; joint activation/loading; striping/all dividers, density/theme/direction/zoom | Unsupported combinations appear valid, pitch drifts, controls clip, or middle-window/pinned paint differs. |+| FR10 | SSR/first-client/hydration fixtures | Derived seed, smaller/larger viewport, hidden/reveal, empty state, unchanged legacy pages | Full-render intermediate output, mismatch, empty repair or legacy metadata change fails. |+| FR11; PR4 | Shared-observation StrictMode/replacement lifecycle tests | No-op, rapid scroll, resize/font/content, fitting/overflowing, same/orthogonal axes, disable/unmount | Duplicate listener, stale commit, ref churn, leaked resource, shared-subscriber loss or chaining failure fails. |+| FR13; PR1-PR7 | Table performance suite and browser frame/heap traces | 1k/10k/100k, cold/no-op/update/scroll, 20 lifetime cycles, supported combinations | Counts scale with N per scroll, persistent gaps, frame/heap targets fail or evidence is missing. |+| FR16; AR1-AR6 | DOM/accessibility-tree, axe and real-browser keyboard; AT where required | Full header/data positions, hidden spacers, mounted controls, focus, zoom; loading announcement separately | Wrong totals/indices, grid-role rewrite, announcement noise or unmounted-discovery claim fails. |+| API/compatibility | Public-subpath compile, consumer docs/inventory and knowledge checks | Opaque capability, data-mode valid-key opt-in, unsupported content/mode fallback, legacy fixtures | Capability leaks data/engine knobs, permits contradictory opt-in, or structural ownership is missing. |++## Decision log++### DEC-1 — Capability configures parent-owned rendering++**Reference:** `module:Table/useTableRowsVirtualization/DEC-1`+**Decider:** `humbertovirtudes`, `2026-11-03`++The geometry-only opaque capability leaves data/rendering with Table. Its SSR seed+derives from declared sizes; four-row overscan and row-scroll coordination are internal.+Rejected: sliced-props bundles, duplicate Table renderers and public engine/overscan/scroll handles.++### DEC-2 — Flat fixed-content mode has a full-render fail-safe++**Reference:** `module:Table/useTableRowsVirtualization/DEC-2`+**Decider:** `humbertovirtudes`, `2026-11-03`++Fixed single-line content preserves pitch, fonts and controls. Invalid geometry,+identity, content or extent disables virtualization in all builds. Native gaps+preserve structure; variable-height/tree/grouped/detail/custom rows remain outside v1.+Rejected: numeric row minimums as enforcement, average-height repair, silent clipping and hidden full DOM.++### DEC-3 — Identity and metadata stay canonical++**Reference:** `module:Table/useTableRowsVirtualization/DEC-3`+**Decider:** `humbertovirtudes`, `2026-11-03`++Parent keys prevent cross-row recycling and distinguish numeric/string identity.+Parent positions count headers for ARIA, not visible numbering; virtual paint uses+logical positions without changing legacy output.+Rejected: secondary extractors, window-local identity and global legacy ARIA correction by this module.++### DEC-4 — One focus island and a first-visible-key anchor++**Reference:** `module:Table/useTableRowsVirtualization/DEC-4`+**Decider:** `humbertovirtudes`, `2026-11-03`++One keyed island retains focus; first-visible key/fractional offset anchors scroll+with successor/predecessor/start fallback. Table remount, not activation/append, resets it.+Rejected: stretching a contiguous window to remote focus or using active state as scroll ownership.++### DEC-5 — Shared viewport and objective budgets gate completion++**Reference:** `module:Table/useTableRowsVirtualization/DEC-5`+**Decider:** `humbertovirtudes`, `2026-11-03`++Table/shared scrolling owns both axes, per-axis chaining and pooled geometry.+Structural bounds and PR5/PR6 targets gate completion; targets are not results.+Rejected: a parallel public scroll wrapper/detector or a subjective smoothness verdict.++## Open questions++None. The normative contract is complete. Implementation and release verification+remain separate from contract approval.++## Content boundary++This record does not duplicate consumer signatures/examples, parent protocol,+research, measured results, implementation steps or general virtualizer algorithms.diff --git a/docs/specs/components/Table/plugins/virtualization/useTableVirtualization.spec.md b/docs/specs/components/Table/plugins/virtualization/useTableVirtualization.spec.mddeleted file mode 100644index 55e1b7a116..0000000000--- a/docs/specs/components/Table/plugins/virtualization/useTableVirtualization.spec.md+++ /dev/null@@ -1,266 +0,0 @@-----schema_version: 3-template_version: 3-kind: module-id: module:Table/useTableVirtualization-authority: draft-archive_reason: null-superseded_by: null-approved_by: null-approved_at: null-owners: [cixzhang]-review_triggers:- [- public-api,- behavior,- layout,- theming,- accessibility,- interaction,- performance,- react-runtime,- ]-verified_by:- [- packages/core/src/Table/plugins/virtualization/useTableVirtualization.test.tsx,- packages/core/src/Table/__tests__/TableVirtualization.a11y.chromium.spec.ts,- packages/core/src/Table/Table.perf.test.tsx,- scripts/check-knowledge.mjs,- ]-parent_component: component:Table-references:- [- architecture:component-theming-surface,- architecture:interaction-modality,- architecture:public-component-api,- architecture:react-component-runtime,- spec:AST-002,- spec:AST-009,- spec:AST-020,- spec:AST-025,- ]------# useTableVirtualization module contract--## Contract at a glance--| Area | Contract |-| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| Public contract | Candidate fixed-height row-windowing module with caller-owned data, one validated stable unique Table row identity, a vertical viewport, row height, and an explicit server-rendered initial range. OQ1 keeps parent-owned phases, a dedicated component, and an atomic props bundle open. Caller-configurable overscan is not admitted unless OQ12 proves a semantic need. |-| Behavior | Render one contiguous visible row window plus an internally bounded overscan and, when necessary, one separately bounded retained-focus row subtree, while preserving native table structure, full-table row metadata, scroll geometry, stable identity, and supported plugin/core appearance. |-| End-user impact | Large tables keep bounded DOM and responsive scrolling while preserving supported row state and keyboard focus. The accessibility tree exposes truthful full-table positions for mounted rows; this contract does not claim virtual-cursor discovery of unmounted rows. |-| Builder impact | Builders opt into a fixed-height contract, identify the vertical viewport, and supply stable row keys. Variable-height content and unsupported plugin combinations remain explicit rather than silently degrading. |-| Compatibility/readiness | Additive, unreleased virtualization capability; no automatic correction to existing nonvirtualized paginated rowIndexStart/rowCount callers. Any shared correction needs a separately approved Table authority/compatibility decision under OQ9. This draft is not implementation authority; parent integration, viewport, fixed height, SSR, focus, anchoring, plugin/appearance compatibility, and budgets remain owner decisions. |-| Review checks | Reject invalid table DOM, block rewrites of semantic elements, render-then-hide, mismatched/duplicate/index keys, incomplete full-table ARIA totals or positions, unenforceable fixed height, silent clipping/drift, lost focus, unbounded focus retention, spacer-relative striping/dividers, recycled uncontrolled state, scroll jumps, unsupported combinations that appear to work, or unmeasured performance claims. |-| Governing rules | `component:Table` owns shared plugin phases and row rendering; its DEC-1 and [`spec:AST-025`](../../../../AST-025/spec.md) FR18/FR19 constrain shared viewport ownership. `architecture:react-component-runtime` owns measurement/resource lifetime; `architecture:public-component-api` and `spec:AST-002` own public caller burden. |--This table is a review projection; the body below is authoritative.--## Intent--`useTableVirtualization` bounds the number of mounted body rows in a large data-driven-Table while preserving semantic table structure and the caller's row identities. It owns-visible-range calculation, overscan, spacer geometry, absolute row-position metadata,-focus retention, supported-plugin composition, resize/scroll coordination, performance-budgets, and implementation evidence.--Row virtualization is distinct from infinite loading and pagination. It limits mounted DOM-for data the caller already owns; it does not fetch, page, cache, or discard product data.-Column virtualization is a separate contract.--## Compatibility and migration--- Released default preserved: `yes` for the additive virtualization capability; absent opt-in, Table renders every supplied row and this module does not change existing nonvirtualized paginated `rowIndexStart`/`rowCount` output.-- Compatibility class: additive public capability plus the smallest approved parent integration. Full-table metadata is required for virtualized mode. Any shared correction affecting existing nonvirtualized callers requires a separately approved `component:Table` authority/compatibility decision; this module does not automatically authorize a global correction.-- Migration decision: `module:Table/useTableVirtualization/DEC-1` after the protocol and interaction questions are approved. OQ9 keeps the metadata integration and public compatibility scope explicit; any migration for existing callers belongs to the separately approved Table decision.--Consumer migration instructions belong in consumer docs and release notes.--## Ownership boundary--**Owns**--- The public virtualization capability and its fixed-height row-window contract, independent of the API shape chosen in OQ1.-- Visible-range and overscan calculation, top/bottom spacer geometry, and vertical viewport coordination.-- Stable row identity through window changes and explicit DOM-recycling policy.-- Virtualized full-table `aria-rowindex`/`aria-rowcount`, focus retention, keyboard/assistive-technology behavior, and evidence; admitted detail-row representation remains with the parent/detail owner.-- Compatibility declarations for selection, sorting, filtering, activation, expansion/tree/grouping, sticky columns, context menus, and infinite loading.-- Resize/scroll resource lifetime and measurable performance budgets.--**Does not own / non-goals**--- Aggregate plugin protocol and shared render phases — owned by `component:Table`.-- A global correction or migration of existing nonvirtualized paginated `rowIndexStart`/`rowCount` callers; OQ9 requires a separate Table authority/compatibility decision for any such shared change.-- Expanded detail representation or expansion admission; the parent/detail owner owns the shape, and OQ6 must admit the combination before it is supported.-- Product data, fetching, caching, pagination, infinite loading, or server cursors.-- Column virtualization.-- Variable-height row measurement in v1 unless owner evidence admits it explicitly.-- Product scroll restoration, route state, or imperative navigation to arbitrary data not owned by the caller.-- Cell renderer correctness for unstable keys or content that violates the declared fixed-height contract.-- A new theme target. Spacer geometry is not theme anatomy, and visible rows use existing Table targets.--## Public API and concepts--No TypeScript shape is admitted yet. OQ1 chooses parent-owned phases, a dedicated-component, or one atomic Table-compatible props bundle. Whichever shape is approved,-the integration MUST:--- accept mutable-compatible `T[]` data supported by current `TableProps<T>`;-- keep data and the exact validated stable unique `idKey` together for window identity and Table reconciliation, so callers cannot accidentally omit or disagree with it;-- provide one canonical logical offset/count source from which ARIA metadata and `useTableRowIndex` derive their respective positions rather than requiring duplicate caller-maintained offsets; and-- define duplicate/invalid-key behavior before exposing the capability.--The current parent protocol cannot safely express data windowing, semantic spacer rows,-identity, and full-table metadata without an approved integration; OQ1 owns that boundary.--| Concept | Closed values or states | Meaning | Default | Owner | Stability |-| ------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------- | --------- |-| Data ownership | Complete caller-owned ordered `T[]` | Supplies the logical dataset from which mounted rows are derived. | Required | Caller through this module | Candidate |-| Row identity | Validated stable unique `string` or `number` key | Drives both window identity and Table reconciliation; duplicate/invalid keys follow one fail-safe policy. | Required | Parent/module boundary | Unsettled |-| Row measurement | Positive finite total row block size in CSS pixels | Defines deterministic geometry under an enforceable fixed-height content/appearance mode. | Required in v1 | `module:Table/useTableVirtualization` | Unsettled |-| Visible range | Contiguous half-open logical index interval | Names the rows intersecting the viewport before internal overscan. | Derived | `module:Table/useTableVirtualization` | Candidate |-| Focus island | Absent or one separately bounded retained row subtree | Keeps the currently focused row and, only if OQ6 admits it, owned detail mounted without stretching the visible range across the dataset. | Absent without remote focus | `module:Table/useTableVirtualization` | Unsettled |-| Overscan | Internally bounded non-negative row count | Absorbs ordinary scroll/keyboard movement without becoming a caller tuning API unless OQ12 admits it. | Internal | `module:Table/useTableVirtualization` | Unsettled |-| Spacer geometry | One or more inaccessible logical-space segments | Preserves full scroll extent around the visible range and optional focus island. | Derived | `module:Table/useTableVirtualization` | Candidate |-| Initial range | Explicit positive row count or other approved seed | Provides deterministic server/hydration output before a client viewport is measurable. | Unsettled | Caller/module boundary | Unsettled |-| Recycling policy | Stable keyed mount/unmount; no cross-key DOM reuse | Avoids moving uncontrolled/focused state between logical rows. | No cross-key recycling | `module:Table/useTableVirtualization` | Candidate |-| Appearance metadata | Absolute logical parity and logical-final-row state | Preserves striping/dividers independently of spacer/window DOM position. | Derived | Parent/module boundary | Unsettled |--## Behavioral contract--| ID | Candidate invariant | Basis | Draft review state |-| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------- |-| FR1 | Stable callbacks, data identity, viewport, valid row height, initial-range inputs, and unchanged internal overscan preserve stable module output where their observable result is unchanged. | Parent identity and runtime architecture | Settled candidate |-| FR2 | Mounted data consists of one contiguous visible range plus internally bounded overscan and, when focus would otherwise unmount, at most one separately bounded retained-focus row subtree. Empty data mounts no data/spacer/focus-island row. | Window and focus bounds | Human interaction decision |-| FR3 | Spacer segments plus mounted row heights equal the full logical body height, including around an optional focus island. The same logical offset before/after a no-op render produces the same visible range without a jump. | Scroll continuity | Settled candidate |-| FR4 | Native `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, and `<td>` semantics remain valid. Spacer representation is absent from accessibility semantics and does not require block/absolute/role rewrites of structural table elements. | HTML and accessibility boundary | Architecture decision pending |-| FR5 | Virtualized full-table metadata counts the complete logical table, not just mounted rows, and absolutely indexes represented header/data rows and, if OQ6 admits expansion, every represented semantic detail row. Inaccessible spacers count as neither. The parent/detail owner defines the logical sequence and detail positions; semantic detail rows cannot be silently omitted. Without detail rows, data indices are `headerRowCount + logicalDataIndex + 1` and the total is `headerRowCount + logicalDataRowCount`; these formulas cannot omit admitted semantic detail rows. OQ9 governs integration and any separately approved shared compatibility correction. | WAI-ARIA row metadata; parent/detail ownership and compatibility | Parent API and detail admission decisions pending |-| FR6 | One validated stable unique canonical key drives both window identity and Table reconciliation. The approved integration makes that key inseparable from its data regardless of API shape. Duplicate/invalid keys disable virtualization and fall back to full rendering in all builds, with one development warning. | React identity and fail-safe behavior | Parent/API decision required |-| FR7 | A focused row that leaves the ordinary window becomes the one bounded focus island rather than stretching the contiguous range or moving focus to the document body. A focused owned detail subtree participates only if OQ6 admits its representation, metadata, and focus behavior. The island is released on blur, removal, or return to the ordinary range. | Keyboard/focus correctness | Human interaction and detail admission decisions |-| FR8 | Sorting/filtering/data replacement recompute current logical order and reconcile scroll/focus anchors according to one explicit policy. Stale geometry or prior indices cannot expose another row under a retained key. | Controlled data and identity | Scroll-anchor policy unsettled |-| FR9 | Sticky columns, selection, sorting, filtering, context menus, and `useTableRowIndex` preserve state/meaning for mounted rows. One parent logical-offset source drives ARIA and visible row numbering. Activation, expansion, tree, grouping, infinite loading, and custom rows are explicit compatibility decisions in OQ6; an unapproved activation contract is not an existing Table capability or a promise of supported composition. | Plugin composition | Compatibility matrix decision pending |-| FR10 | Server and first client render the same explicit initial range. Hydration does not render the full dataset then collapse it or render an empty body and repair it in an Effect. | SSR/hydration and runtime architecture | Initial-range policy unsettled |-| FR11 | Viewport resize, row-height/data-length change, and scroll events update the range without synchronous layout read/write loops. Stable no-op renders do not reconnect resources or reset scroll. | Runtime/performance boundary | Settled candidate |-| FR12 | Imperative scrolling, if admitted, targets a logical canonical key/index with defined alignment and unavailable-row behavior. It remains separate from activation, focus, navigation, and fetching. | Public responsibility boundary | Human API decision |-| FR13 | Completion proves bounded mounted data rows and recorded frame/render/memory budgets. Hiding offscreen mounted rows or rendering all rows before slicing is not virtualization. | Performance outcome | Settled candidate |-| FR14 | V1 accepts only a positive finite total row block size and an owner-approved fixed-height Table mode that defines text overflow, density/theme padding, custom cell content, interactive controls, plugin output, precedence, overflow detection, and explicit rejection/fallback. Invalid height disables virtualization and falls back to full rendering. | Enforceable geometry contract | Human API/design decision |-| FR15 | If striping or row dividers are supported, their parity/final-row treatment derives from absolute logical row metadata, not spacer-relative `:nth-child`/`:last-child`; middle windows match the equivalent full Table. Otherwise the options are explicitly rejected. | Core Table appearance compatibility | Parent appearance decision |-| FR16 | Accessibility-tree claims cover truthful metadata for mounted rows only. This contract does not claim that virtual-cursor users can discover unmounted rows; any admitted AT navigation/announcement outcome requires its own interaction and `spec:AST-009` matrix. | Evidence boundary | Settled limitation |--### Transformation and precedence order--- **ORD1 — Logical data and identity.** Approved sorting/filtering/data-order owners establish the logical `T[]`; the parent validates one canonical stable unique key and exposes one logical offset/count source. Any admitted semantic detail rows follow the parent/detail owner's sequence and position contract in FR5.-- **ORD2 — Admission inputs.** Validate viewport, positive finite row block size, approved fixed-height mode/content, dataset length, initial range, and internal overscan before calculating a window. Invalid identity/height falls back to full rendering.-- **ORD3 — Mounted set.** Derive the contiguous visible range from current scroll geometry, expand by internal overscan, and add at most one separately bounded focus island when required.-- **ORD4 — Semantic body.** Render inaccessible spacer segments, keyed data rows, any admitted semantic detail rows, and any focus island with FR5 full-table indices through the approved parent integration, regardless of API shape. Preserve valid table semantics and exclude spacers, not semantic detail rows, from row counts.-- **ORD5 — Element plugins.** Existing row/cell transforms run only for mounted logical data/focus-island rows unless their current contracts explicitly include spacer anatomy; `useTableRowIndex` consumes the same logical offset as ARIA metadata.-- **ORD6 — Core appearance.** Virtualized row rendering receives absolute logical parity/final-row metadata before striping/divider styles resolve, so spacers and window edges do not alter appearance.-- **ORD7 — State changes.** Data/order/height/viewport changes apply the approved anchor policy before exposing the next range; stale work cannot overwrite current geometry.-- **ORD8 — Parent protocol.** The module does not privately bypass BaseTable. Any new data/body/identity/appearance phase belongs to `component:Table` and must be approved before implementation; OQ1 does not require a phase-shaped API.--### Performance and resources--- **PR1 — Bounded DOM.** Mounted data is bounded by visible rows plus internal overscan and at most one separately bounded focus-retained row subtree, independent of total dataset length.-- **PR2 — Fixed-height arithmetic.** Correct range/geometry behavior uses the validated declared block size and viewport geometry and does not require per-row measurement or observer fan-out; diagnostics/fallback for contract violations remain an OQ10 outcome.-- **PR3 — One viewport subscription.** At most one scroll subscription and one resize/viewport observer exist per mounted instance; updates are scheduled without more than one pending frame of range work.-- **PR4 — Stable no-op.** Unchanged inputs and a scroll offset that remains within the current effective range do not rebuild every row or reset stable module output identity.-- **PR5 — Measured budgets.** Implementation records mounted row count, initial render cost, no-op rerender cost, scroll-frame work, memory trend, and supported-plugin overhead at representative 1k, 10k, and 100k logical rows.-- **PR6 — Cleanup.** Unmount and viewport replacement release listeners, observers, animation-frame work, retained elements, and stale geometry.--## Accessibility contract--- **AR1 — Semantic table.** Native table structure and header/cell associations remain intact; virtualization does not convert Table into an ARIA grid or generic block list.-- **AR2 — Full-table position exposure.** The browser accessibility tree exposes each represented semantic row's absolute full-table `aria-rowindex` and full-table `aria-rowcount` under FR5, including represented detail rows only if OQ6 admits expansion. Positions never use window-relative ordinals, and inaccessible spacers count as neither. This is a computed-semantics claim, not a promise that unmounted rows are discoverable by virtual cursor.-- **AR3 — Hidden spacers.** Spacer geometry has no accessible row/cell content, name, selection, current state, or focus stop.-- **AR4 — Focus retention.** One focused row may remain as the separately bounded focus island through range shifts; an owned detail subtree participates only under OQ6's admitted representation, counts, indices, positions, and focus contract. The island is released on blur/removal/return and never causes an unbounded range or silent focus move to the document body.-- **AR5 — Keyboard traversal.** Supported Table controls and row interactions remain reachable without requiring pointer scrolling or exposing thousands of tab stops.-- **AR6 — Announcements.** Scrolling does not generate live-region noise. Any explicit “row X of Y” claim uses the semantic row metadata rather than repeated status messages.-- **AR7 — Zoom, reflow, and fixed-height admission.** At supported zoom/text settings, the approved fixed-height mode cannot silently clip required content. Content or plugin output outside that mode follows the explicit rejection/full-render fallback chosen in OQ10.-- **AR8 — Evidence boundary.** DOM/accessibility-tree and real-browser keyboard tests prove static semantics, focus, and computed full-table metadata. Real AT is added only if an approved outcome depends on announcement, virtual-cursor advancement/discovery, or a recorded divergence under `spec:AST-009`; no such unmounted-row discovery claim exists in this draft.--## Design relationships--| Anatomy or state | Design requirement | Representation authority | Module contract |-| ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------- |-| Mounted data row | Looks and behaves like the same logical row in a non-virtualized Table. | Existing row/cell targets and supported plugins | FR2-FR16, AR1-AR8 |-| Spacer segments | Preserve geometry without becoming visible/accessibility data anatomy. | This module; not a public theme target | FR3-FR5, AR1-AR3 |-| Vertical viewport | Preserves Table's shared scroll owner; nested owners obey nearest-effective-axis ownership and default chaining. | `component:Table/DEC-1` and [`spec:AST-025`](../../../../AST-025/spec.md) FR18/FR19; integration pending OQ2 | FR3, FR11, PR3 |-| Focus island | Keeps at most one focused row subtree mounted outside the ordinary window; detail participates only if OQ6 admits it. | This module plus the focused descendant/detail owner | FR2, FR5, FR7, AR2, AR4-AR5 |-| Logical row appearance | Preserves striping parity and final-row dividers from absolute logical metadata. | Parent Table appearance plus this module | FR15, ORD6 |-| Unsupported tall row | Uses the explicit rejection/full-render fallback rather than clipping under a fixed-height promise. | Parent/module boundary pending OQ10 | FR14, AR7 |--The module adds no new theming target. Data rows retain current Table targets. Spacer geometry-is structural implementation detail and cannot accept arbitrary theme paint or sizing.--## Parent and system relationships--- `component:Table` owns BaseTable's data/render phases, semantic body/header construction, canonical key reconciliation, row memoization, plugin ordering, core striping/divider appearance, existing body-relative `rowIndexStart`/`rowCount` behavior, and stable expansion/detail representation. This module requires an approved window/spacer/identity/appearance integration with FR5 full-table metadata. OQ9 keeps any shared correction for existing nonvirtualized paginated callers outside the additive module until a separate Table authority/compatibility decision approves it.-- `component:Table/DEC-1` keeps one Table-owned viewport with shared scroll behavior on the existing Scroll region and a private observed content box. [`spec:AST-025`](../../../../AST-025/spec.md) FR18 makes the nearest effective owner on the applicable axis win, permits orthogonal nesting, and requires deliberate same-axis nesting with chaining by default. FR19 lets Table integrate on its existing wrapper so column sizing, keyboard access, scroll shadows, sticky columns, and sticky headers share one viewport; it does not require a separate public ScrollableArea. An external owner is valid only when Table explicitly accepts and coordinates it. OQ2 chooses integration within these constraints, not a parallel scroll owner or overflow detector.-- `architecture:react-component-runtime` owns scroll/resize resource lifetime, current values, scheduling, node replacement, StrictMode replay, and cleanup.-- `architecture:public-component-api` and `spec:AST-002` require intent-named inputs and reject leaking an internal virtualizer or tuning knob without proven caller need.-- `spec:AST-009` and `spec:AST-020` own the evidence boundary. This draft claims computed accessibility-tree metadata for mounted rows, not AT discovery of unmounted rows.-- `useTableRowIndex` and every supported state plugin consume the same parent-owned canonical identity/logical offset rather than a caller-maintained duplicate. Expansion/tree/grouping/infinite-loading/custom-row behavior composes only if its owning current contract and OQ6 explicitly admit it; semantic detail rows then participate in FR5 counts/indices/positions without transferring representation ownership to virtualization.--## Verification map--| Contract | Verification | Representative states | Mutation or failure expectation |-| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| FR1-FR6, FR14-FR15, ORD1-ORD6 | Deterministic range/geometry/identity/appearance tests plus Table renders inspecting native DOM, keys, spacer semantics, full-table ARIA, striping, and dividers | Empty; first/middle/last window; focus island; duplicate keys; invalid height; striped/divided; admitted detail rows | Visible rows drop, geometry drifts, DOM is invalid, keys recycle, ARIA excludes represented headers/detail rows, fallback fails, or appearance shifts. |-| FR7-FR9, FR12, FR16, AR1-AR8 | Real-browser keyboard/accessibility-tree tests for scrolling, focus island, data replacement, zoom, controls, row index, and approved plugins | Focus in row/control; detail only if admitted; offscreen scroll; sort/filter; sticky/selection/activation/index | Focus/body/semantics/state/numbering fail, admitted detail counts/indices/positions are wrong, unmounted discovery is overclaimed, clipping is silent, or unsupported combos appear valid. |-| FR10, SSR/hydration | Server markup plus hydration tests at explicit initial ranges and viewport changes | Empty, smaller/larger than initial, changed client viewport | Full data renders then collapses, markup mismatches, initial rows disappear, or an Effect repairs known-wrong output. |-| FR11, PR2-PR4, PR6; OQ2 | Fake viewport/scroll/resize harness under StrictMode, no-op rerenders, viewport replacement, unmount, and rapid scroll, plus real-browser shared-owner and chaining integration | Stable, changed and detached viewport; repeated scroll events; orthogonal/deliberate same-axis nesting; sticky columns/headers | Resources leak/churn, stale work commits, scroll resets, synchronous layout loops occur, owners diverge, an uncoordinated external owner is accepted, or chaining fails. |-| FR13, PR1, PR5 | Performance suite and browser trace recording visible/overscan/focus-island DOM, commits, frame work, and memory at 1k/10k/100k logical rows | Core-only and every supported plugin/appearance combination | Mounted rows scale with total data, focus retention is unbounded, budgets regress, or claimed support adds unbounded work. |-| Public API and docs | Public-subpath compile/contract fixtures for the OQ1-approved phases, component, or atomic props bundle; `.doc.mjs`, generated inventory, Storybook, and fixed-height recipes | Mutable-compatible `T[]`, unique key, viewport, initial range, fixed-height mode, support matrix | Caller can omit/disagree on identity, readonly data mismatches Table, tuning leaks without admission, or docs imply unsupported behavior. |-| Compatibility scope; OQ9 | Representative nonvirtualized paginated `rowIndexStart`/`rowCount` fixtures alongside virtualized full-table metadata fixtures | Existing first/later pages and unknown totals; virtualized header/data and any admitted detail sequence | Additive virtualization silently changes existing callers or a shared correction proceeds without separate Table authority/compatibility approval. |-| Structural ownership | `pnpm check:knowledge` | Draft module and parent backlink | A missing, orphaned, misnamed, wrong-kind, or duplicate module record passes validation. |--## Decision log--### DEC-1 — V1 is fixed-height row virtualization--**Reference:** `module:Table/useTableVirtualization/DEC-1`-**Decider:** pending owner approval--V1 must prove bounded DOM and semantic correctness from one positive finite total row block size under an owner-approved fixed-height Table mode. That mode defines text overflow, density/theme padding, custom content/controls, plugin output, precedence, diagnostics, and full-render fallback. Variable-height measurement remains a separate contract.--Rejected: silently measuring some rows, assuming an average height, clipping arbitrary Table content without an admitted mode, and calling hidden or `content-visibility` rows virtualized while they remain mounted.--### DEC-2 — Preserve native table semantics--**Reference:** `module:Table/useTableVirtualization/DEC-2`-**Decider:** pending owner approval--Virtualization must use valid semantic table structure and FR5 full-table metadata: represented headers and data are counted/indexed, as are represented semantic detail rows if OQ6 admits expansion; inaccessible spacers are excluded. The parent/detail owner defines detail shape and positions. Reuse of existing body-relative `rowIndexStart`/`rowCount` is unresolved in OQ9; any shared correction affecting nonvirtualized paginated callers requires separate Table authority/compatibility approval, not automatic correction by this additive module. Structural elements remain native rather than block-positioned or role-replaced.--Rejected: incomplete full-table totals, `display:block` on `<table>/<tbody>/<tr>`, absolutely positioned generic row divs, and spacer rows announced as data.--### DEC-3 — Stable keys; no cross-row DOM recycling--**Reference:** `module:Table/useTableVirtualization/DEC-3`-**Decider:** pending owner approval--V1 uses one validated stable unique canonical key for both window identity and Table reconciliation. The approved integration makes that key inseparable from its data whether OQ1 selects parent-owned phases, a dedicated component, or an atomic props bundle. Duplicate/invalid keys disable virtualization and fall back to normal full rendering in every build, with one development warning. Rows outside the approved mounted set may unmount, but no keyed DOM/component instance is reused for another logical key.--Rejected: separate window/Table extractors, optional identity that falls back to window-local indices, duplicate keys that recycle multiple rows, and recycling uncontrolled input, focus, or component state across logical rows.--## Open questions--- **OQ1 — Which parent integration represents windowing, identity, metadata, and spacers?** (`human-api`) Choose parent-owned phases, a dedicated component, or one atomic Table-compatible props bundle. Whichever shape is chosen must keep mutable-compatible `T[]`, the exact validated unique `idKey`, logical offset/count, and semantic spacer ownership together so callers cannot omit or disagree with identity/metadata. No hook or return-object shape is admitted by this question.-- **OQ2 — Who owns the vertical viewport?** (`human-api`) Decide a Table-owned block viewport versus a caller-supplied ref explicitly accepted and coordinated by Table, subject to `component:Table/DEC-1` and [`spec:AST-025`](../../../../AST-025/spec.md) FR18/FR19. Preserve the shared scroll owner for column sizing, keyboard access, scroll shadows, sticky columns, and sticky headers; no separate public ScrollableArea is required. The nearest effective owner on the applicable axis wins; orthogonal nesting may coexist, and any same-axis nesting is deliberate in Table's contract and preserves chaining by default. An arbitrary external wrapper does not satisfy ownership without explicit Table coordination; do not create a parallel owner or overflow detector.-- **OQ3 — What is the initial SSR range?** (`human-api`) Decide whether an initial row count is required, has a documented default, or derives from explicit server-known geometry. Full-render-then-collapse and empty-then-repair are rejected.-- **OQ4 — How is the bounded focus island represented?** (`human-design`) Define at most one discontiguous retained row and, only if OQ6 admits it, its owner-defined detail subtree, spacer segmentation, release on blur/removal/return, scroll/focus behavior, and what happens when another off-window row receives focus. Detail shape remains the parent/detail owner's, not virtualization's.-- **OQ5 — What happens when data order changes?** (`human-api`) Decide start-offset, focused/active-key, first-visible-key, or another scroll-anchor policy for sorting, filtering, insertion, deletion, and replacement.-- **OQ6 — Which plugins and core appearance modes compose in v1?** (`human-api`) Confirm sticky columns, selection, sorting, filtering, context menus, and `useTableRowIndex` with one logical offset. Decide whether activation, expansion, tree, grouped rows, infinite loading, custom rows, striping, and each divider mode are supported, constrained, or rejected with dedicated evidence. Activation requires its own approved current module contract before composition can be admitted; an open draft supplies neither capability nor authority. Expansion admission requires the parent/detail owner to define detail representation, full-table row counts, absolute indices and positions for every represented semantic detail row, fixed-height geometry compatibility, and bounded focus-island behavior under OQ4. Neither silently omitting semantic detail rows nor mentioning retained detail admits expansion.-- **OQ7 — Is imperative `scrollToRow` public in v1?** (`human-api`) Admit it only if callers need an operation beyond setting scroll position, and define canonical key/index, alignment, unavailable-row, focus, and data-not-loaded behavior.-- **OQ8 — What objective budgets gate completion?** (`human-api`) Approve mounted-row, focus-island, render, frame, and memory budgets at representative data sizes so “smooth” cannot substitute for evidence.-- **OQ9 — How does the parent integrate full-table ARIA metadata, and what is the public compatibility scope?** (`human-api`) Define represented header indices/count, data offsets, any OQ6-admitted semantic detail counts/indices/positions, and spacer exclusion. Decide whether a virtualized-only metadata path is sufficient or a shared correction is necessary before reusing body-relative `rowIndexStart`/`rowCount`. Any shared correction affecting existing nonvirtualized paginated callers requires a separately approved Table authority/compatibility decision that defines their output, docs, and migration. This additive module does not choose or authorize that global correction.-- **OQ10 — What exactly constitutes fixed-height mode?** (`human-api`) Define positive-finite validation, total block-size semantics, `textOverflow`, density/theme padding precedence, allowed custom renderers/interactive content/plugins, overflow diagnostics, and the explicit rejection or full-render fallback. Native row height is a minimum, so a numeric prop alone is insufficient.-- **OQ11 — How are striping and dividers made logical-position-aware?** (`human-design`) If supported, replace spacer-relative `:nth-child`/`:last-child` meaning with parent-supplied absolute parity/final-data-row state while preserving ordinary non-virtualized CSS behavior and middle-window pixels.-- **OQ12 — Is caller-configurable overscan admitted?** (`human-api`) Keep overscan internal unless two non-derivable caller situations prove an API need under `spec:AST-002`; if admitted, define semantic outcome, bounds, invalid values, default, and decision burden rather than exposing an engine-tuning knob.--## Content boundary--This record does not duplicate consumer signatures/examples, the parent Table pipeline,-general virtualizer algorithms, current usage audits, implementation steps, data-fetching,-column virtualization, or variable-height contracts. It links to their canonical owners.