Context
Two grids on the same selection-model class share one selection today. Measured 2026-09-13 in the engine's unit runtime (Playwright unit project, dev-equivalent source at agent/18626-view-owned-selection@8d8799643e, src/selection/grid/BaseModel.mjs unchanged from dev): Neo.create(RowModel).selectedRows === Neo.create(RowModel).selectedRows is true; after modelA.selectedRows.push(3) a fresh Neo.create(RowModel).selectedRows reads [3]; RowModel.config.selectedRows is that same array. CellRowModel, CellModel and ColumnModel each share their own copy per class; the table family declares the same kind of static arrays under its own names. CI surfaced it first: unit job 103741193182 (PR #18661, head 8d8799643e) ran two grid arms in one worker in file order — a RowModel grid selected record 3 and was destroyed, the next RowModel grid adopted records 2 and 4 from its own store and read [3, 2, 4]; the retry ran alone and passed. In an app: a Workstation with two grids on the default RowModel and colliding business ids paints a row in the second grid the moment the first selects it, and the second grid's singleSelect deselects the first's row.
The Problem
src/selection/grid/BaseModel.mjs:21 and :27 declare selectedColumns: [] and selectedRows: [] as NON-reactive static configs. core.Base#mergeConfig (src/core/Base.mjs:764, {...staticConfig, ...config}) copies a static default by reference and setFields assigns it as the instance's own property — so a mutable default is one object per class, and NeoArray.add(me.selectedRows, recordId) / NeoArray.remove (BaseModel.mjs:238, 363) mutate the class's array in place. BaseModel#unregister (:394) assigns the DESTROYED instance a fresh [] and leaves the class array populated for the next instance. The table family repeats the pattern: selectedRowIds: [] (src/selection/table/CellRowModel.mjs:29) and selectedColumnCellIds: [] (src/selection/table/CellColumnModel.mjs:34, src/selection/table/CellColumnRowModel.mjs:34) — five static arrays across the selection family. Neo.selection.Model#items_ (src/selection/Model.mjs) already carries the per-instance descriptor; the subclasses' arrays never got it.
The Architectural Reality
This is the #18198 class — grid.Body's row and column windows were the same static-array default, fixed with config descriptors after the maintainer's ruling there (descriptors are the Neo-native shape; a construct() copy and instance fields were dropped). The config-system side (why a static reference default is not cloned per instance) is D#18195 / #18192 and stays there.
The Fix
The five arrays — grid selectedColumns_ / selectedRows_, table selectedRowIds_ / selectedColumnCellIds_ (twice) — become reactive configs with the Neo.selection.Model#items_ / grid.Body#mountedRows_ descriptor: {[isDescriptor]: true, clone: 'shallow', cloneOnGet: 'none', value: []} — clone makes the default per instance, cloneOnGet: 'none' keeps the in-place NeoArray.add / remove writes landing (the engine's default copies arrays on every read, so a write would land in a discarded copy). Every reader and writer keeps its name (me.selectedRows, me.selectedColumns = [...], me.selectedRowIds, toJSON). The full invariant closes in one commit — a partial fix of a shared-state invariant burns the next review cycle (#14153).
Contract Ledger
Not applicable: no public surface changes shape — all five members keep their names, types and semantics; only their per-instance identity is repaired.
Acceptance Criteria
Out of Scope
The config-system gap (D#18195 / #18192); Neo.selection.Model#items_ (already a descriptor); the add: [] literals in GalleryModel / HelixModel (method-local update payloads, not defaults).
Avoided Traps
- Instance fields (
selectedRows = []) or a construct() copy — dropped in #18198 by the maintainer; descriptors are the shape.
- A descriptor without
cloneOnGet: 'none' — the default read copy would swallow every in-place write (#18198's second finding).
- Reading the leak as a test-ordering flake and re-keying the spec's records per arm — that hides the defect the arm just measured.
Related
#18198 (the same class in grid.Body, the ruling) · #18626 / PR #18661 (where the CI-admitted arms surfaced it; the fix ships there) · D#18195 / #18192 (config-system side) · #9839 (the retired Peer State Adoption, which had copied selectedRows between models by reference on purpose).
Live latest-open sweep: the latest 20 open issues at 2026-09-13T15:10Z — none equivalent (#18666 is a benchmark bound, unrelated); search "selectedRows shared" → #18198 (closed, sibling class) and the multi-body tickets. A2A in-flight claim sweep: the grid-selection lane is mine (#18626). Memory Core rationale sweep: no prior decision on per-instance selection arrays; the 2026-06 peer-state-adoption design copied them by reference on purpose, retired with the View-owned model. Own-assignment sweep: #18626, #18604 (different defects). Sweep of src/selection/** for non-reactive array defaults (grep -rn '^\s*[a-zA-Z]\+\s*:\s*\[\]'): the five configs above; the three other hits are the items_ descriptor's value and two method-local add: [] payloads.
Origin Session ID: a1d12cdc-a975-4f69-a14e-50cc28343691
Retrieval Hint: "selection grid BaseModel selectedRows shared across instances static config array clone descriptor"
📜 Clio · @neo-fable-clio · Claude Fable 5.1 · Claude Code · session a1d12cdc-a975-4f69-a14e-50cc28343691
Context
Two grids on the same selection-model class share one selection today. Measured 2026-09-13 in the engine's unit runtime (Playwright
unitproject, dev-equivalent source atagent/18626-view-owned-selection@8d8799643e,src/selection/grid/BaseModel.mjsunchanged from dev):Neo.create(RowModel).selectedRows === Neo.create(RowModel).selectedRowsistrue; aftermodelA.selectedRows.push(3)a freshNeo.create(RowModel).selectedRowsreads[3];RowModel.config.selectedRowsis that same array. CellRowModel, CellModel and ColumnModel each share their own copy per class; the table family declares the same kind of static arrays under its own names. CI surfaced it first: unit job 103741193182 (PR #18661, head8d8799643e) ran two grid arms in one worker in file order — a RowModel grid selected record 3 and was destroyed, the next RowModel grid adopted records 2 and 4 from its own store and read[3, 2, 4]; the retry ran alone and passed. In an app: a Workstation with two grids on the defaultRowModeland colliding business ids paints a row in the second grid the moment the first selects it, and the second grid'ssingleSelectdeselects the first's row.The Problem
src/selection/grid/BaseModel.mjs:21and:27declareselectedColumns: []andselectedRows: []as NON-reactive static configs.core.Base#mergeConfig(src/core/Base.mjs:764,{...staticConfig, ...config}) copies a static default by reference andsetFieldsassigns it as the instance's own property — so a mutable default is one object per class, andNeoArray.add(me.selectedRows, recordId)/NeoArray.remove(BaseModel.mjs:238, 363) mutate the class's array in place.BaseModel#unregister(:394) assigns the DESTROYED instance a fresh[]and leaves the class array populated for the next instance. The table family repeats the pattern:selectedRowIds: [](src/selection/table/CellRowModel.mjs:29) andselectedColumnCellIds: [](src/selection/table/CellColumnModel.mjs:34,src/selection/table/CellColumnRowModel.mjs:34) — five static arrays across the selection family.Neo.selection.Model#items_(src/selection/Model.mjs) already carries the per-instance descriptor; the subclasses' arrays never got it.The Architectural Reality
This is the #18198 class —
grid.Body's row and column windows were the same static-array default, fixed with config descriptors after the maintainer's ruling there (descriptors are the Neo-native shape; aconstruct()copy and instance fields were dropped). The config-system side (why a static reference default is not cloned per instance) is D#18195 / #18192 and stays there.The Fix
The five arrays — grid
selectedColumns_/selectedRows_, tableselectedRowIds_/selectedColumnCellIds_(twice) — become reactive configs with theNeo.selection.Model#items_/grid.Body#mountedRows_descriptor:{[isDescriptor]: true, clone: 'shallow', cloneOnGet: 'none', value: []}—clonemakes the default per instance,cloneOnGet: 'none'keeps the in-placeNeoArray.add/removewrites landing (the engine's default copies arrays on every read, so a write would land in a discarded copy). Every reader and writer keeps its name (me.selectedRows,me.selectedColumns = [...],me.selectedRowIds,toJSON). The full invariant closes in one commit — a partial fix of a shared-state invariant burns the next review cycle (#14153).Contract Ledger
Not applicable: no public surface changes shape — all five members keep their names, types and semantics; only their per-instance identity is repaired.
Acceptance Criteria
selectedRowsandselectedColumnsarrays; a row selected in the first is not held or painted by the second.selectedRows,selectedColumns,selectedRowIds,selectedColumnCellIdsdistinct per instance, an in-place push on one instance invisible to a fresh one) — red on the current source.unit/grid,unit/selection, e2eSelectionMultiBody,BigDataMultiBodyNL) stay green;unit/grid/ViewOwnedSelectionModel.spec.mjsis deterministic in any worker order (AC-1 / AC-2 are red on the current source too).Out of Scope
The config-system gap (D#18195 / #18192);
Neo.selection.Model#items_(already a descriptor); theadd: []literals inGalleryModel/HelixModel(method-local update payloads, not defaults).Avoided Traps
selectedRows = []) or aconstruct()copy — dropped in #18198 by the maintainer; descriptors are the shape.cloneOnGet: 'none'— the default read copy would swallow every in-place write (#18198's second finding).Related
#18198 (the same class in
grid.Body, the ruling) · #18626 / PR #18661 (where the CI-admitted arms surfaced it; the fix ships there) · D#18195 / #18192 (config-system side) · #9839 (the retired Peer State Adoption, which had copiedselectedRowsbetween models by reference on purpose).Live latest-open sweep: the latest 20 open issues at 2026-09-13T15:10Z — none equivalent (#18666 is a benchmark bound, unrelated); search "selectedRows shared" → #18198 (closed, sibling class) and the multi-body tickets. A2A in-flight claim sweep: the grid-selection lane is mine (#18626). Memory Core rationale sweep: no prior decision on per-instance selection arrays; the 2026-06 peer-state-adoption design copied them by reference on purpose, retired with the View-owned model. Own-assignment sweep: #18626, #18604 (different defects). Sweep of
src/selection/**for non-reactive array defaults (grep -rn '^\s*[a-zA-Z]\+\s*:\s*\[\]'): the five configs above; the three other hits are theitems_descriptor'svalueand two method-localadd: []payloads.Origin Session ID: a1d12cdc-a975-4f69-a14e-50cc28343691 Retrieval Hint: "selection grid BaseModel selectedRows shared across instances static config array clone descriptor"
📜 Clio · @neo-fable-clio · Claude Fable 5.1 · Claude Code · session a1d12cdc-a975-4f69-a14e-50cc28343691