Context
The operator-reported symptom from #18186 is still live: on the Workstation's 100k Matrix, +1 pulse increments the record and never repaints the cell, for every row below the sixth.
#18186 was dropped as Drop+Supersede because it was scoped as a grid bug when the mechanism sits in the config system, and two fixes of mine were dropped with it — a construct() copy (#18190) and a move to instance fields (#18191). @tobiu's ruling on the shape: "if the [config system] does not honor NEO BEST PRACTISES, like core.Config and config descriptors ... it is a failure. using config descriptors e.g. inside grid body => that is fine."
So: the config-system gap is D#18195 / #18192. This ticket is the consumer fix, done the Neo-native way — with descriptors, not with a hand-rolled copy and not by leaving the config system.
The Problem
src/grid/Body.mjs declares mountedRows, visibleRows and visibleColumns in static config as non-reactive array literals, and both window calculators write through them by index (me.mountedRows[0] = mountedStart — the source says // update the array inline).
A non-reactive key has no clone path, so every grid body on a page holds the same array. The Workstation renders two grids: the feed grid (availableRows 1, bufferRowRange 2) writes a 5-row window into the array the scale grid (availableRows 7, bufferRowRange 10) is reading, so the scale grid believes 6 of its 27 painted rows are mounted.
Both repaint paths gate on that window and treat anything outside it as nothing to do — onStoreRecordChange() skips the row, getRow() returns null, and AnimatedChange no-ops under its if (row). Nothing warns. The store stays correct, so only the paint is missing.
Measured on the running app: calling updateMountedAndVisibleRows() on the scale body alone moved the feed body's window from [0,5] to [0,27] — a window its own geometry cannot produce.
The Fix
Declare the three as reactive configs carrying a descriptor:
mountedRows_: {
[isDescriptor]: true,
clone : 'shallow',
cloneOnGet : 'none',
value : [0, 0]
},Both keys of the descriptor are load-bearing, and the pairing was measured at core.Base before being applied here:
| descriptor |
same-instance identity |
two instances |
after a[0] = 99 |
clone:'none', cloneOnGet:'none' |
stable |
shared |
sibling [99,0], class default [99,0] |
clone:'deep', cloneOnGet:'none' |
stable |
isolated |
sibling [0,0] |
clone:'shallow', cloneOnGet:'none' |
stable |
isolated |
a [99,0], sibling [0,0], default clean |
clone: 'shallow' copies the declared default on set, so each body gets its own two-element array. 'deep' would work identically for an array of numbers and costs more; 'none' reproduces the defect exactly.
cloneOnGet: 'none' is what makes an index-write land. Without it the getter copies arrays on every read — the engine's default for reactive array configs — so me.mountedRows[0] = x would write into a discarded copy and the window would never move at all. This is a behaviour-critical pairing, not a performance tweak.
mountedColumns_ is already reactive in this class, so the shape has precedent three lines away.
Acceptance Criteria
Out of Scope
- The config-system defect — that a
clone descriptor is silently inert on a non-reactive key. That is #18192, diverging in D#18195, and this ticket must not be used to pressure that fork toward whichever option unblocks the grid. This fix works under every option on that matrix, because it moves the keys onto the reactive path where descriptors already work.
- A sweep of the other in-place-mutated non-reactive configs. 38 candidates surfaced; each needs per-class confirmation that the key has no reactive ancestor and the class is genuinely multi-instance. Separate lane.
Avoided Traps
- Reassigning instead of writing through.
src/grid/Container.mjs destructures {mountedColumns, visibleColumns} off the body and mutates through the reference; switching to reassignment would strand that consumer on a stale array. Caught by @neo-opus-grace on #18190.
- Omitting
cloneOnGet: 'none'. The most likely way to get this wrong, and it fails silently in the same direction as the original bug.
- Instance fields. They work, and @tobiu ruled the descriptor route is the one that honours the config system.
Related
- #18192 / D#18195 — the config-system fork this deliberately does not depend on
- #18186, #18190, #18191 — the dropped predecessors
src/grid/Body.mjs, src/grid/column/AnimatedChange.mjs, src/grid/Container.mjs
Origin Session ID: 7596538d-5324-419a-b043-95c585d833ea
Retrieval Hint: grid body mountedRows visibleRows visibleColumns clone shallow cloneOnGet none descriptor two grids share window repaint
Context
The operator-reported symptom from #18186 is still live: on the Workstation's 100k Matrix,
+1 pulseincrements the record and never repaints the cell, for every row below the sixth.#18186 was dropped as Drop+Supersede because it was scoped as a grid bug when the mechanism sits in the config system, and two fixes of mine were dropped with it — a
construct()copy (#18190) and a move to instance fields (#18191). @tobiu's ruling on the shape: "if the [config system] does not honor NEO BEST PRACTISES, like core.Config and config descriptors ... it is a failure. using config descriptors e.g. inside grid body => that is fine."So: the config-system gap is D#18195 / #18192. This ticket is the consumer fix, done the Neo-native way — with descriptors, not with a hand-rolled copy and not by leaving the config system.
The Problem
src/grid/Body.mjsdeclaresmountedRows,visibleRowsandvisibleColumnsinstatic configas non-reactive array literals, and both window calculators write through them by index (me.mountedRows[0] = mountedStart— the source says// update the array inline).A non-reactive key has no clone path, so every grid body on a page holds the same array. The Workstation renders two grids: the feed grid (
availableRows 1,bufferRowRange 2) writes a 5-row window into the array the scale grid (availableRows 7,bufferRowRange 10) is reading, so the scale grid believes 6 of its 27 painted rows are mounted.Both repaint paths gate on that window and treat anything outside it as nothing to do —
onStoreRecordChange()skips the row,getRow()returnsnull, andAnimatedChangeno-ops under itsif (row). Nothing warns. The store stays correct, so only the paint is missing.Measured on the running app: calling
updateMountedAndVisibleRows()on the scale body alone moved the feed body's window from[0,5]to[0,27]— a window its own geometry cannot produce.The Fix
Declare the three as reactive configs carrying a descriptor:
mountedRows_: { [isDescriptor]: true, clone : 'shallow', cloneOnGet : 'none', value : [0, 0] },Both keys of the descriptor are load-bearing, and the pairing was measured at
core.Basebefore being applied here:a[0] = 99clone:'none', cloneOnGet:'none'[99,0], class default[99,0]clone:'deep', cloneOnGet:'none'[0,0]clone:'shallow', cloneOnGet:'none'a[99,0], sibling[0,0], default cleanclone: 'shallow'copies the declared default on set, so each body gets its own two-element array.'deep'would work identically for an array of numbers and costs more;'none'reproduces the defect exactly.cloneOnGet: 'none'is what makes an index-write land. Without it the getter copies arrays on every read — the engine's default for reactive array configs — some.mountedRows[0] = xwould write into a discarded copy and the window would never move at all. This is a behaviour-critical pairing, not a performance tweak.mountedColumns_is already reactive in this class, so the shape has precedent three lines away.Acceptance Criteria
grep), not assumed from agit stash.me.mountedRows[0]is still observable on the instance after the change. This is whatcloneOnGet: 'none'buys and it must have its own arm: a getter that copies silently reverts every window update.NEO_TEST_SKIP_CIguard on the new arms. Theunitjob sets it, so a guarded regression arm is green in CI by not running.Out of Scope
clonedescriptor is silently inert on a non-reactive key. That is #18192, diverging in D#18195, and this ticket must not be used to pressure that fork toward whichever option unblocks the grid. This fix works under every option on that matrix, because it moves the keys onto the reactive path where descriptors already work.Avoided Traps
src/grid/Container.mjsdestructures{mountedColumns, visibleColumns}off the body and mutates through the reference; switching to reassignment would strand that consumer on a stale array. Caught by @neo-opus-grace on #18190.cloneOnGet: 'none'. The most likely way to get this wrong, and it fails silently in the same direction as the original bug.Related
src/grid/Body.mjs,src/grid/column/AnimatedChange.mjs,src/grid/Container.mjsOrigin Session ID: 7596538d-5324-419a-b043-95c585d833ea
Retrieval Hint:
grid body mountedRows visibleRows visibleColumns clone shallow cloneOnGet none descriptor two grids share window repaint