Context
Captured during 2D big-data scroll benchmarking (defect-note: src/grid/ScrollManager.mjs is wrong in MESSAGE:8cf6fe49-e406-4675-bbde-08d9db41499e): on both scroll start (ScrollManager#onContainerScroll) and scroll end (ScrollManager#onScrollEnd), setting body.isScrolling before me.syncGridBody() launches an independent depth-1 VDOM flight on each grid body (bodyStart, bodyEnd, body) right before View#syncBodies calls view.update().
- Live latest-open sweep: checked latest 20 open issues in
neomjs/neo at 2026-10-26T14:09:53Z (#20114..#19139); no equivalent found
- A2A in-flight claim sweep: checked latest 30 messages (
status: 'all') at 2026-10-26T14:09:48Z; no overlapping claim found
- MC sweep:
"ScrollManager onContainerScroll isScrolling syncGridBody syncBodies ScrollFlightMerge 18439 18719", 6 results, no prior decision found (#18439 / #18719 fixed sparse pruning when a body update merges into an already-in-flight View update via denseUpdate, leaving the idle-View child-before-parent collision on scroll start and scroll end untouched)
- Own-assignment sweep: 0 open in
neomjs/neo, none overlapping
The Problem
When a grid begins scrolling from rest (view.isVdomUpdating === false && view.needsVdomUpdate === false) or settles in ScrollManager#onScrollEnd (150 ms after the last scroll event, when view.isVdomUpdating === false):
ScrollManager#onContainerScroll (src/grid/ScrollManager.mjs:203-205, 225-227) and ScrollManager#onScrollEnd (src/grid/ScrollManager.mjs:245-247) assign isScrolling = true / false directly on container.bodyStart, container.bodyEnd, and container.body before calling me.syncGridBody().
Body#afterSetIsScrolling (src/grid/Body.mjs:526-529) calls this.toggleCls('neo-is-scrolling', value), which mutates cls non-silently and calls body.update().
- Furthermore, even if
isScrolling is updated via setSilent (setting body.needsVdomUpdate = true), View#syncBodies (src/grid/View.mjs:1252) calls _body.set({scrollLeft, scrollTop}) without silent = true; Abstract#set (src/component/Abstract.mjs:532) checks if (!silent && me.needsVdomUpdate) return me.promiseUpdate(), which immediately launches a depth-1 flight on _body before _body.createViewData(true, force) and view.update().
- Because
view.isVdomUpdating and view.needsVdomUpdate are both false at that instant, body.mergeIntoParentUpdate() returns false and body.executeVdomUpdate() starts immediately at default updateDepth = 1, setting body.isVdomUpdating = true and registering body.id in VDomUpdate.descendantInFlightMap.get(view.id).
- Microseconds later in the same synchronous call stack,
View#syncBodies (src/grid/View.mjs:1240-1297) proceeds:
_body.createViewData(true, force) hits if (me.isVdomUpdating) at src/grid/Body.mjs:799, aborts synchronous row projection, and defers createViewData(true, force) into VDomUpdate.preUpdateMap!
view.update() hits view.isChildUpdating() at src/mixin/VdomLifecycle.mjs:1400, detects the in-flight body descendant, and parks view.update() in VDomUpdate.postUpdateQueueMap behind body's depth-1 class-only flight!
- As a result, the first scroll frame and
onScrollEnd split into two serialized VDOM flights: a depth-1 flight carrying only neo-is-scrolling on body (0 row deltas), followed a full macrotask + worker round-trip later by the deferred createViewData and view.update() row repaint.
The Architectural Reality
Design authority: "The scroll repaints a row's subtree as one silent transaction, so the depth has to reach the cell CONTENTS, not the cell." (src/grid/View.mjs:1278-1279)
Neo.grid.View#syncBodies (src/grid/View.mjs:1240-1297) is the single VDOM transaction owner for scroll steps across body, bodyStart, and bodyEnd. It suppresses body-level createViewData during scrollLeft/scrollTop/startIndex updates (_body.skipCreateViewData = true), runs _body.createViewData(true, force) with silent = true, and ships View + all Body instances + all Row and Cell subtrees in one dense update (me.updateDepth = ROW_DISTANCE + me.maxCellDepth, me.denseUpdate = true).
- When
ScrollManager#onContainerScroll and ScrollManager#onScrollEnd update isScrolling via setSilent({isScrolling: true}) / setSilent({isScrolling: false}) on bodyStart, bodyEnd, and body, and View#syncBodies updates scrollLeft/scrollTop via _body.setSilent({scrollLeft, scrollTop}):
Abstract#setSilent (src/component/Abstract.mjs:549-553) sets silentVdomUpdate = true around super.set(...).
Body#afterSetIsScrolling still runs synchronously, updating cls / vdom.cls via toggleCls('neo-is-scrolling', value) and firing isScrollingChange for listeners (Neo.grid.plugin.AnimateRows), while VdomLifecycle#updateVdom (src/mixin/VdomLifecycle.mjs:1375) records body.needsVdomUpdate = true without launching a colliding depth-1 flight on body.
- Immediately afterward,
me.syncGridBody() -> View#syncBodies updates scrollLeft/scrollTop silently, executes _body.createViewData(true, force) synchronously (body.isVdomUpdating === false), and ships both the neo-is-scrolling class delta on every body and the repainted rows in a single view.update() batch (clearing body._needsVdomUpdate = false via Container#afterSetNeedsVdomUpdate).
The Fix
- In
src/grid/ScrollManager.mjs:
- Add
#setBodyScrolling(isScrolling) and call it in onContainerScroll (both vertical and horizontal branches) and onScrollEnd to update isScrolling on container.bodyStart, container.bodyEnd, and container.body via setSilent({isScrolling}) (with direct assignment fallback for plain-object unit test doubles).
- In
src/grid/View.mjs:
- In
syncBodies, change _body.set({scrollLeft, scrollTop}) to _body.setSilent({scrollLeft, scrollTop}) so Abstract#set does not flush a pre-existing _body.needsVdomUpdate as a depth-1 _body.promiseUpdate() flight ahead of me.update().
- In
test/playwright/unit/grid/ScrollFlightMerge.spec.mjs:
- Add a unit test verifying that
scrollManager.onContainerScroll (from rest) and scrollManager.onScrollEnd do not launch a colliding depth-1 body flight ahead of View#syncBodies, that body.createViewData runs synchronously during onContainerScroll rather than deferring into VDomUpdate.preUpdateMap, and that the neo-is-scrolling class delta and row updates ship together in the single View flight.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Neo.grid.ScrollManager#onContainerScroll & #onScrollEnd (src/grid/ScrollManager.mjs) |
src/grid/View.mjs:1278-1296 |
Sets isScrolling via setSilent({isScrolling: Boolean}) on bodyStart, bodyEnd, and body before syncGridBody(), so afterSetIsScrolling updates vdom.cls and fires isScrollingChange while View#syncBodies ships the class and row repaint in one View VDOM flight |
Direct writes body.isScrolling = true/false outside ScrollManager continue to trigger Body#afterSetIsScrolling -> toggleCls -> body.update() |
JSDoc on #setBodyScrolling |
test/playwright/unit/grid/ScrollFlightMerge.spec.mjs |
Neo.grid.View#syncBodies (src/grid/View.mjs:1252) |
src/grid/View.mjs:1278-1296 |
Calls _body.setSilent({scrollLeft, scrollTop}) inside updateBody so a dirty _body.needsVdomUpdate (e.g. from setSilent({isScrolling})) is not flushed as a separate depth-1 _body.promiseUpdate() before me.update() |
View#syncBodies ships the entire body + row subtree in its own me.update() at ROW_DISTANCE + maxCellDepth with denseUpdate = true |
Inline comment in syncBodies |
test/playwright/unit/grid/ScrollFlightMerge.spec.mjs |
Decision Record impact
none
Acceptance Criteria
Out of Scope
- Changing
Body#afterSetIsScrolling for direct non-scroll callers (body.isScrolling = true).
- Modifying
VdomLifecycle or VDomUpdate merge/collision semantics (#18439 / #18719).
Avoided Traps
- Making
Body#afterSetIsScrolling unconditionally silent: External callers or unit tests that set body.isScrolling = true without calling View#syncBodies (test/playwright/unit/grid/AnimateRowsSteps.spec.mjs:178) rely on Body#afterSetIsScrolling triggering a body update when no View#syncBodies follows. Using setSilent({isScrolling}) in ScrollManager scopes silence to the exact sites that immediately call me.syncGridBody().
Related
#18439 / #18719 (VdomLifecycle#denseUpdate and ScrollFlightMerge.spec.mjs)
#17401 (finite updateDepth in View#syncBodies)
Origin Session ID: 27c583d2-51f9-42aa-a711-44d2d2c566f6
Retrieval Hint: "ScrollManager onContainerScroll onScrollEnd isScrolling setSilent syncBodies child update conflict"
Context
Captured during 2D big-data scroll benchmarking (
defect-note: src/grid/ScrollManager.mjs is wronginMESSAGE:8cf6fe49-e406-4675-bbde-08d9db41499e): on both scroll start (ScrollManager#onContainerScroll) and scroll end (ScrollManager#onScrollEnd), settingbody.isScrollingbeforeme.syncGridBody()launches an independent depth-1 VDOM flight on each grid body (bodyStart,bodyEnd,body) right beforeView#syncBodiescallsview.update().neomjs/neoat2026-10-26T14:09:53Z(#20114..#19139); no equivalent foundstatus: 'all') at2026-10-26T14:09:48Z; no overlapping claim found"ScrollManager onContainerScroll isScrolling syncGridBody syncBodies ScrollFlightMerge 18439 18719", 6 results, no prior decision found (#18439/#18719fixed sparse pruning when a body update merges into an already-in-flightViewupdate viadenseUpdate, leaving the idle-Viewchild-before-parent collision on scroll start and scroll end untouched)neomjs/neo, none overlappingThe Problem
When a grid begins scrolling from rest (
view.isVdomUpdating === false && view.needsVdomUpdate === false) or settles inScrollManager#onScrollEnd(150 ms after the last scroll event, whenview.isVdomUpdating === false):ScrollManager#onContainerScroll(src/grid/ScrollManager.mjs:203-205,225-227) andScrollManager#onScrollEnd(src/grid/ScrollManager.mjs:245-247) assignisScrolling = true/falsedirectly oncontainer.bodyStart,container.bodyEnd, andcontainer.bodybefore callingme.syncGridBody().Body#afterSetIsScrolling(src/grid/Body.mjs:526-529) callsthis.toggleCls('neo-is-scrolling', value), which mutatesclsnon-silently and callsbody.update().isScrollingis updated viasetSilent(settingbody.needsVdomUpdate = true),View#syncBodies(src/grid/View.mjs:1252) calls_body.set({scrollLeft, scrollTop})withoutsilent = true;Abstract#set(src/component/Abstract.mjs:532) checksif (!silent && me.needsVdomUpdate) return me.promiseUpdate(), which immediately launches a depth-1 flight on_bodybefore_body.createViewData(true, force)andview.update().view.isVdomUpdatingandview.needsVdomUpdateare bothfalseat that instant,body.mergeIntoParentUpdate()returnsfalseandbody.executeVdomUpdate()starts immediately at defaultupdateDepth = 1, settingbody.isVdomUpdating = trueand registeringbody.idinVDomUpdate.descendantInFlightMap.get(view.id).View#syncBodies(src/grid/View.mjs:1240-1297) proceeds:_body.createViewData(true, force)hitsif (me.isVdomUpdating)atsrc/grid/Body.mjs:799, aborts synchronous row projection, and deferscreateViewData(true, force)intoVDomUpdate.preUpdateMap!view.update()hitsview.isChildUpdating()atsrc/mixin/VdomLifecycle.mjs:1400, detects the in-flightbodydescendant, and parksview.update()inVDomUpdate.postUpdateQueueMapbehindbody's depth-1 class-only flight!onScrollEndsplit into two serialized VDOM flights: a depth-1 flight carrying onlyneo-is-scrollingonbody(0 row deltas), followed a full macrotask + worker round-trip later by the deferredcreateViewDataandview.update()row repaint.The Architectural Reality
Design authority:
"The scroll repaints a row's subtree as one silent transaction, so the depth has to reach the cell CONTENTS, not the cell."(src/grid/View.mjs:1278-1279)Neo.grid.View#syncBodies(src/grid/View.mjs:1240-1297) is the single VDOM transaction owner for scroll steps acrossbody,bodyStart, andbodyEnd. It suppresses body-levelcreateViewDataduringscrollLeft/scrollTop/startIndexupdates (_body.skipCreateViewData = true), runs_body.createViewData(true, force)withsilent = true, and shipsView+ allBodyinstances + allRowandCellsubtrees in one dense update (me.updateDepth = ROW_DISTANCE + me.maxCellDepth,me.denseUpdate = true).ScrollManager#onContainerScrollandScrollManager#onScrollEndupdateisScrollingviasetSilent({isScrolling: true})/setSilent({isScrolling: false})onbodyStart,bodyEnd, andbody, andView#syncBodiesupdatesscrollLeft/scrollTopvia_body.setSilent({scrollLeft, scrollTop}):Abstract#setSilent(src/component/Abstract.mjs:549-553) setssilentVdomUpdate = truearoundsuper.set(...).Body#afterSetIsScrollingstill runs synchronously, updatingcls/vdom.clsviatoggleCls('neo-is-scrolling', value)and firingisScrollingChangefor listeners (Neo.grid.plugin.AnimateRows), whileVdomLifecycle#updateVdom(src/mixin/VdomLifecycle.mjs:1375) recordsbody.needsVdomUpdate = truewithout launching a colliding depth-1 flight onbody.me.syncGridBody()->View#syncBodiesupdatesscrollLeft/scrollTopsilently, executes_body.createViewData(true, force)synchronously (body.isVdomUpdating === false), and ships both theneo-is-scrollingclass delta on every body and the repainted rows in a singleview.update()batch (clearingbody._needsVdomUpdate = falseviaContainer#afterSetNeedsVdomUpdate).The Fix
src/grid/ScrollManager.mjs:#setBodyScrolling(isScrolling)and call it inonContainerScroll(both vertical and horizontal branches) andonScrollEndto updateisScrollingoncontainer.bodyStart,container.bodyEnd, andcontainer.bodyviasetSilent({isScrolling})(with direct assignment fallback for plain-object unit test doubles).src/grid/View.mjs:syncBodies, change_body.set({scrollLeft, scrollTop})to_body.setSilent({scrollLeft, scrollTop})soAbstract#setdoes not flush a pre-existing_body.needsVdomUpdateas a depth-1_body.promiseUpdate()flight ahead ofme.update().test/playwright/unit/grid/ScrollFlightMerge.spec.mjs:scrollManager.onContainerScroll(from rest) andscrollManager.onScrollEnddo not launch a colliding depth-1bodyflight ahead ofView#syncBodies, thatbody.createViewDataruns synchronously duringonContainerScrollrather than deferring intoVDomUpdate.preUpdateMap, and that theneo-is-scrollingclass delta and row updates ship together in the singleViewflight.Contract Ledger Matrix
Neo.grid.ScrollManager#onContainerScroll&#onScrollEnd(src/grid/ScrollManager.mjs)src/grid/View.mjs:1278-1296isScrollingviasetSilent({isScrolling: Boolean})onbodyStart,bodyEnd, andbodybeforesyncGridBody(), soafterSetIsScrollingupdatesvdom.clsand firesisScrollingChangewhileView#syncBodiesships the class and row repaint in oneViewVDOM flightbody.isScrolling = true/falseoutsideScrollManagercontinue to triggerBody#afterSetIsScrolling->toggleCls->body.update()#setBodyScrollingtest/playwright/unit/grid/ScrollFlightMerge.spec.mjsNeo.grid.View#syncBodies(src/grid/View.mjs:1252)src/grid/View.mjs:1278-1296_body.setSilent({scrollLeft, scrollTop})insideupdateBodyso a dirty_body.needsVdomUpdate(e.g. fromsetSilent({isScrolling})) is not flushed as a separate depth-1_body.promiseUpdate()beforeme.update()View#syncBodiesships the entire body + row subtree in its ownme.update()atROW_DISTANCE + maxCellDepthwithdenseUpdate = truesyncBodiestest/playwright/unit/grid/ScrollFlightMerge.spec.mjsDecision Record impact
noneAcceptance Criteria
ScrollManager#onContainerScroll(vertical and horizontal branches) andScrollManager#onScrollEndsetisScrollingviasetSilentonbodyStart,bodyEnd, andbody, andView#syncBodiesuses_body.setSilent({scrollLeft, scrollTop}).scrollManager.onContainerScrollwhenviewis idle (view.isVdomUpdating === false) does not setbody.isVdomUpdating = truebeforeview.syncBodies(), executesbody.createViewDatasynchronously without deferring toVDomUpdate.preUpdateMap, and shipsneo-is-scrollingand repainted rows in a singleViewVDOM batch.scrollManager.onScrollEndremovesneo-is-scrollingand syncs bodies in a singleViewVDOM batch without child-update collision.test/playwright/unit/grid/ScrollFlightMerge.spec.mjsandtest/playwright/unit/grid/AnimateRowsSteps.spec.mjspass.Out of Scope
Body#afterSetIsScrollingfor direct non-scroll callers (body.isScrolling = true).VdomLifecycleorVDomUpdatemerge/collision semantics (#18439/#18719).Avoided Traps
Body#afterSetIsScrollingunconditionally silent: External callers or unit tests that setbody.isScrolling = truewithout callingView#syncBodies(test/playwright/unit/grid/AnimateRowsSteps.spec.mjs:178) rely onBody#afterSetIsScrollingtriggering a body update when noView#syncBodiesfollows. UsingsetSilent({isScrolling})inScrollManagerscopes silence to the exact sites that immediately callme.syncGridBody().Related
#18439/#18719(VdomLifecycle#denseUpdateandScrollFlightMerge.spec.mjs)#17401(finiteupdateDepthinView#syncBodies)Origin Session ID: 27c583d2-51f9-42aa-a711-44d2d2c566f6 Retrieval Hint: "ScrollManager onContainerScroll onScrollEnd isScrolling setSilent syncBodies child update conflict"