Context
A rendering owner can maintain an ordered Neo.collection.Base of existing records without introducing a second Store. Neo.grid.RowGeometry already consumes that Collection-shaped input, but documents its store config and change hook as Neo.data.Store. This leaf makes the supported input contract explicit and guards it beside the existing geometry tests.
Parent: #20667. Separate from #20681's extra-height capability.
The Problem
At be8d0b0340c8671d488a3dfe5e12d111c72cee38, src/grid/RowGeometry.mjs reads count, items, and Observable on/un. It listens for mutate, sort, filter, and load, but does not call a Store-only accessor. A plain Collection supports the required order events; a Store additionally emits load.
The current type permits a future Store-only dependency without exposing that an ordered-Collection consumer would break. Existing geometry tests use Stores, so that compatibility boundary has no direct regression.
Design authority: this is an additive documented compatibility contract. Existing grid behavior and the Collection's mutation semantics are preserved.
The Architectural Reality
RowGeometry.afterSetStore owns subscription replacement, early event ordering and height-cache reset on source replacement.
rebuild reads the input's ordered items; getRecordId is supplied by the consumer and stays authoritative for keyed heights.
Collection emits mutate/sort/filter; data.Store extends it. An unlinked Collection owns its ordered list, not a writable link to another source.
test/playwright/unit/grid/RowGeometry.spec.mjs already covers offsets, lookup, invalidation and the grid consumers.
Prescription checked: document and test the existing owner. No extraction or new geometry class is needed.
The Fix
Type the input and hook arguments as Neo.collection.Base|null. State the read/subscription contract and that source mutation remains the caller's responsibility. Add a focused test using an actual plain Collection and explicit record-key resolver; drive splice, sort, filter/clear and source replacement through real events, then verify geometry reads without calling its invalidator manually.
Contract Ledger
| Surface |
Authority |
Behavior |
Edge |
Docs |
Evidence |
| RowGeometry store config / afterSetStore |
Existing implementation, explicitly supported here |
Accept ordered Collection or Store through items/count/on/un; follow emitted order events |
null is empty; replacing the input clears known heights |
JSDoc |
Plain-Collection and existing Store tests |
| Keyed height reads |
Existing getRecordId/setHeights/offsetAt/indexAt contract |
Heights follow record keys through order/filter changes |
Unmeasured records use estimate; source replacement starts fresh |
Existing JSDoc |
Numeric assertions after each real event |
Decision Record: Optional. Decision Record impact: none; no algorithm, ownership or event-law change.
Acceptance Criteria
Out of Scope
Extra heights (#20681), a new geometry service, independent editable record truth, automatic record-field filtering, rendering/measurement/scroll correction, and package module loading.
Avoided Traps
Copying prefix arrays; relabeling a mock as Collection support; forcing callers to construct a Store solely for geometry; calling onStoreChange from the test; changing linked-Collection write-through semantics.
Ownership and sweep
Sophie self-selects this bounded compatibility dependency. No contributor claim is displaced. Structural placement: existing source and spec; no new directory. Agent OS structure map: N/A.
Live latest-open + closed sweep: all 38 open issues read (orange band), latest20 refreshed immediately before filing, plus closed RowGeometry Collection search. Closed #9486 concerns multi-body grid architecture and excludes no ordered-input contract; open #20681 covers extra heights, not this boundary. Latest30 all-read-state A2A scan found no competing geometry claim. Own assignments: #20185, unrelated video work. Memory sweeps recovered the prior geometry source/Collection probes; KB did not retrieve the specific class, so exact source governs. No equivalent leaf or prior exclusion found.
Origin Session ID: 9bf9ac41-3a89-436f-9bdb-2e38327937eb
Retrieval Hint: "RowGeometry Store type ordered Collection input items count order events compatibility"
Context
A rendering owner can maintain an ordered
Neo.collection.Baseof existing records without introducing a second Store.Neo.grid.RowGeometryalready consumes that Collection-shaped input, but documents itsstoreconfig and change hook asNeo.data.Store. This leaf makes the supported input contract explicit and guards it beside the existing geometry tests.Parent: #20667. Separate from #20681's extra-height capability.
The Problem
At
be8d0b0340c8671d488a3dfe5e12d111c72cee38,src/grid/RowGeometry.mjsreadscount,items, and Observableon/un. It listens formutate,sort,filter, andload, but does not call a Store-only accessor. A plain Collection supports the required order events; a Store additionally emits load.The current type permits a future Store-only dependency without exposing that an ordered-Collection consumer would break. Existing geometry tests use Stores, so that compatibility boundary has no direct regression.
Design authority: this is an additive documented compatibility contract. Existing grid behavior and the Collection's mutation semantics are preserved.
The Architectural Reality
RowGeometry.afterSetStoreowns subscription replacement, early event ordering and height-cache reset on source replacement.rebuildreads the input's ordereditems;getRecordIdis supplied by the consumer and stays authoritative for keyed heights.Collectionemits mutate/sort/filter;data.Storeextends it. An unlinked Collection owns its ordered list, not a writable link to another source.test/playwright/unit/grid/RowGeometry.spec.mjsalready covers offsets, lookup, invalidation and the grid consumers.Prescription checked: document and test the existing owner. No extraction or new geometry class is needed.
The Fix
Type the input and hook arguments as
Neo.collection.Base|null. State the read/subscription contract and that source mutation remains the caller's responsibility. Add a focused test using an actual plain Collection and explicit record-key resolver; drive splice, sort, filter/clear and source replacement through real events, then verify geometry reads without calling its invalidator manually.Contract Ledger
Decision Record: Optional. Decision Record impact: none; no algorithm, ownership or event-law change.
Acceptance Criteria
Out of Scope
Extra heights (#20681), a new geometry service, independent editable record truth, automatic record-field filtering, rendering/measurement/scroll correction, and package module loading.
Avoided Traps
Copying prefix arrays; relabeling a mock as Collection support; forcing callers to construct a Store solely for geometry; calling onStoreChange from the test; changing linked-Collection write-through semantics.
Ownership and sweep
Sophie self-selects this bounded compatibility dependency. No contributor claim is displaced. Structural placement: existing source and spec; no new directory. Agent OS structure map: N/A.
Live latest-open + closed sweep: all 38 open issues read (orange band), latest20 refreshed immediately before filing, plus closed
RowGeometry Collectionsearch. Closed #9486 concerns multi-body grid architecture and excludes no ordered-input contract; open #20681 covers extra heights, not this boundary. Latest30 all-read-state A2A scan found no competing geometry claim. Own assignments: #20185, unrelated video work. Memory sweeps recovered the prior geometry source/Collection probes; KB did not retrieve the specific class, so exact source governs. No equivalent leaf or prior exclusion found.Origin Session ID: 9bf9ac41-3a89-436f-9bdb-2e38327937eb
Retrieval Hint: "RowGeometry Store type ordered Collection input items count order events compatibility"