Context
#19356 / PR #19357 gave Neo.grid.Body the scrollEdge event: announced once when the visible window reaches the store's last bufferRowRange rows, latched on the store's count (#scrollEdgeAnnouncedFor), re-armed when the count changes or the window leaves the edge. #19359 / PR #19360 added total and the hidden-only-append rule.
Its second consumer, the Fleet Manager's memories pane (neomjs/neo-agent-institution#429 / PR #434), hides its summary grid while a drill-in owns the zone. @neo-gpt-sophie's review of that PR traced what the latch does there, at engine 93769448934166a8c98b4d99eccda4c3d347caeb and unchanged on dev: a store load reaching a hidden body still runs onStoreLoad → createViewData → updateMountedAndVisibleRows, the body keeps the geometry it last measured (afterSetAvailableHeight ignores a non-positive value, nothing resets availableRows or the latch on unmount), so the edge for the NEW count is announced into a hidden grid and latched. When the grid is shown again at that same count, nothing announces: the operator stands at an edge the engine believes it has already reported.
The Problem
A one-shot event delivered while nobody can act on it is consumed, not deferred. The consumer in PR #434 carries a replay (summaryEdgeDeferred: remember the refused edge, replay it once on return), which is the right interim and the wrong permanent home: every consumer that ever hides a grid with a growing store would need the same bookkeeping, and the engine already knows the one fact that matters — whether the body is mounted.
The Architectural Reality
src/grid/Body.mjs updateMountedAndVisibleRows(): the edge block reads store.count, endIndex, bufferRowRange and the private latch; it does not read mounted.
src/grid/Body.mjs afterSetMounted(value, oldValue): propagates mounted to the row items; touches no geometry and no latch.
src/grid/Body.mjs afterSetAvailableHeight(value): if (value > 0) — a hidden body keeps its last availableRows.
src/grid/Body.mjs createViewData(): the early return is !store || store.isLoading || availableRows < 1 || _containerWidth < 1 || …; there is no mounted gate, by design (a body may build its view data before mount).
test/playwright/unit/grid/BodyScrollEdge.spec.mjs drives updateMountedAndVisibleRows() on bodies that are never mounted — any fix that gates the announcement on mounted turns that spec and the Institution's edge arms silent.
The Fix
Re-arm, do not gate: afterSetMounted(true, false) clears the latch (#scrollEdgeAnnouncedFor = null), so a body shown again at its edge announces on its next layout, whatever was announced into it while hidden. The hidden announcement itself stays (a consumer may act on it; the engine does not know that it cannot), and unmounted bodies in unit tests behave exactly as today. Consumers that absorbed a hidden announcement and acted on it meet the re-announcement with their own in-flight gate, as the Fleet panes already do.
Contract Ledger
| Target surface |
Source of authority |
Behavior |
Fallback |
Docs |
Evidence |
scrollEdge on Neo.grid.Body |
src/grid/Body.mjs |
A body that becomes mounted re-arms its edge latch: if it is at its edge on the next layout, it announces, even when that count was announced while it was hidden. |
unchanged elsewhere |
the @event scrollEdge block gains one sentence |
BodyScrollEdge.spec.mjs: announce at count N unmounted; a further layout stays quiet (control); body.mounted = true; the next layout at the same count announces again |
Acceptance Criteria
Out of Scope
- The edge predicate, the count key and the hidden-only-append rule (#19359).
- The consumer's replay (lands with neomjs/neo-agent-institution#434 as the interim).
Related
#19356 / PR #19357 · #19359 / PR #19360 · neomjs/neo-agent-institution#429 / PR #434 (the finding, @neo-gpt-sophie's review packet of 2026-10-02 12:30Z, and the interim replay)
Claimable; first refusal Vega after PR #434 lands.
Live latest-open sweep: the 20 newest open neo issues at 12:40Z carry nothing on grid bodies or scrollEdge; gh search issues --repo neomjs/neo "scrollEdge" returns only the closed #19356 and #19359; query_raw_memories on the hidden-body latch surfaced the unrelated createViewData early-return diagnosis from #9872, no prior decision.
Origin Session ID: 60d9be31-4233-40fd-9b07-6ee6a9ebf6cf
Retrieval Hint: "grid Body scrollEdge latch unmounted hidden store load re-arm afterSetMounted"
Context
#19356 / PR #19357 gave
Neo.grid.BodythescrollEdgeevent: announced once when the visible window reaches the store's lastbufferRowRangerows, latched on the store's count (#scrollEdgeAnnouncedFor), re-armed when the count changes or the window leaves the edge. #19359 / PR #19360 addedtotaland the hidden-only-append rule.Its second consumer, the Fleet Manager's memories pane (neomjs/neo-agent-institution#429 / PR #434), hides its summary grid while a drill-in owns the zone. @neo-gpt-sophie's review of that PR traced what the latch does there, at engine
93769448934166a8c98b4d99eccda4c3d347caeband unchanged ondev: a store load reaching a hidden body still runsonStoreLoad → createViewData → updateMountedAndVisibleRows, the body keeps the geometry it last measured (afterSetAvailableHeightignores a non-positive value, nothing resetsavailableRowsor the latch on unmount), so the edge for the NEW count is announced into a hidden grid and latched. When the grid is shown again at that same count, nothing announces: the operator stands at an edge the engine believes it has already reported.The Problem
A one-shot event delivered while nobody can act on it is consumed, not deferred. The consumer in PR #434 carries a replay (
summaryEdgeDeferred: remember the refused edge, replay it once on return), which is the right interim and the wrong permanent home: every consumer that ever hides a grid with a growing store would need the same bookkeeping, and the engine already knows the one fact that matters — whether the body is mounted.The Architectural Reality
src/grid/Body.mjsupdateMountedAndVisibleRows(): the edge block readsstore.count,endIndex,bufferRowRangeand the private latch; it does not readmounted.src/grid/Body.mjsafterSetMounted(value, oldValue): propagatesmountedto the row items; touches no geometry and no latch.src/grid/Body.mjsafterSetAvailableHeight(value):if (value > 0)— a hidden body keeps its lastavailableRows.src/grid/Body.mjscreateViewData(): the early return is!store || store.isLoading || availableRows < 1 || _containerWidth < 1 || …; there is no mounted gate, by design (a body may build its view data before mount).test/playwright/unit/grid/BodyScrollEdge.spec.mjsdrivesupdateMountedAndVisibleRows()on bodies that are never mounted — any fix that gates the announcement onmountedturns that spec and the Institution's edge arms silent.The Fix
Re-arm, do not gate:
afterSetMounted(true, false)clears the latch (#scrollEdgeAnnouncedFor = null), so a body shown again at its edge announces on its next layout, whatever was announced into it while hidden. The hidden announcement itself stays (a consumer may act on it; the engine does not know that it cannot), and unmounted bodies in unit tests behave exactly as today. Consumers that absorbed a hidden announcement and acted on it meet the re-announcement with their own in-flight gate, as the Fleet panes already do.Contract Ledger
scrollEdgeonNeo.grid.Bodysrc/grid/Body.mjs@event scrollEdgeblock gains one sentenceBodyScrollEdge.spec.mjs: announce at count N unmounted; a further layout stays quiet (control);body.mounted = true; the next layout at the same count announces againAcceptance Criteria
BodyScrollEdge.spec.mjsgains the arm above, red first: at enginedevthe layout aftermounted = truestays quiet.@event scrollEdgedoc names the re-arm on mount.memories/Container.mjs#summaryEdgeDeferredand its replay retire (the drill arms inmemories/container.spec.mjskeep passing through the engine's re-announcement).Out of Scope
Related
#19356 / PR #19357 · #19359 / PR #19360 · neomjs/neo-agent-institution#429 / PR #434 (the finding, @neo-gpt-sophie's review packet of 2026-10-02 12:30Z, and the interim replay)
Claimable; first refusal Vega after PR #434 lands.
Live latest-open sweep: the 20 newest open neo issues at 12:40Z carry nothing on grid bodies or
scrollEdge;gh search issues --repo neomjs/neo "scrollEdge"returns only the closed #19356 and #19359;query_raw_memorieson the hidden-body latch surfaced the unrelatedcreateViewDataearly-return diagnosis from #9872, no prior decision.Origin Session ID: 60d9be31-4233-40fd-9b07-6ee6a9ebf6cf Retrieval Hint: "grid Body scrollEdge latch unmounted hidden store load re-arm afterSetMounted"