Context
During the Engine 13.4 release-gate verification matrix on #20379 (Grid columns can sit under a shared group header, evaluated on dev at ccb30d8d6e), real-pointer Playwright + Neural Link testing on examples/grid/headerGroups surfaced critical layout/VDOM corruption when emptying a locked region after a prior header drag (Row 4A), group splitting when mutating column.locked at runtime (Row 8), and missing "useAiClient": true in examples/grid/headerGroups/neo-config.json (Row 4 / Row 7).
The Problem
Measured in Chromium + Neural Link on examples/grid/headerGroups (dev at ccb30d8d6e):
- Row 4A — Emptying
headerStart / headerEnd after an earlier header drag (e.g. dragging Region from locked: 'start' into center after Jan → Region) loses the moved header button's DOM node and shifts all center group header cells by 180px:
- When
Region (locked: 'start', width: 180) is dragged rightward and released over May (center) after an earlier header drag, Region.locked becomes null, emptying lockedStartColumns (startEmptied = true in src/grid/header/Wrapper.mjs:297-325).
- Empirical result (
ROW_4D_REGION_TO_MAY):
headerStart is destroyed, leaving 2 toolbars (center and end).
- In the DOM,
toolbar0 (center) renders only ["Mar","Jan","Feb","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Id"] — Region's <button> DOM node is completely missing from the live DOM!
- Meanwhile, in the App Worker,
headerToolbar.items and body.columnPositions do contain region (x: 0, width: 180).
- Because
GroupRow#project() places Q1..Q4 from body.columnPositions (starting after region at x: 180), while the first rendered leaf button in the DOM (Mar) sits at x: 0 (rect.left = 1), every single centre group header cell is misaligned by 180px from its leaves:
Q1: left: 181, right: 631 vs leafLeft: 1, leafRight: 451 (180px offset!)
Q2: left: 631, right: 1081 vs leafLeft: 451, leafRight: 901 (180px offset!)
Q3: left: 1081, right: 1531 vs leafLeft: 901, leafRight: 1351 (180px offset!)
Q4: left: 1531, right: 2359 vs leafLeft: 1351, leafRight: 2359 (180px offset on left edge!)
- Row 8 — Runtime
column.locked mutation (onColumnLockChange) on a grouped leaf splits its headerGroup across two regions:
- In multi-body grids (
BigDataMultiBodyNL shape, #9872 ground), changing locked at runtime on a grouped column via app.setProperties(janColId, {locked: 'start'}) (or column.locked = 'start' / responsiveLockPolicy) invokes grid.Container#onColumnLockChange(column) (src/grid/Container.mjs:1275-1313).
- Empirical result (
ROW_8_JAN_LOCKED_START): jan moves to lockedStartColumns while feb and mar stay in centerColumns, splitting Q1 across two regions and rendering two separate 'Q1' group header cells:
neo-grid-container-1__header-group-start: [{'text': 'Q1', 'colindex': '2', 'colspan': '1', 'left': 181, 'right': 331}]
neo-grid-container-1__header-group-center: [{'text': 'Q1', 'colindex': '3', 'colspan': '2', 'left': 331, 'right': 705}, ...]
- This violates
#20379's core invariant ("so the group stays in one region").
- Row 4 & Row 7 Example Neural Link Surface (
examples/grid/headerGroups/neo-config.json):
examples/grid/headerGroups/neo-config.json lacks "useAiClient": true (unlike examples/grid/lockedColumns/neo-config.json), preventing direct Neural Link attachment without URL overrides.
The Architectural Reality
- Why
Region's DOM node disappears on a cross-parent move after an earlier update (src/container/Base.mjs #insert, verified by @neo-opus-grace):
- On a fresh boot (with no prior header drag),
headerToolbar.updateDepth is -1 (an initial pending value), so Region → May emits insertNode button → centre toolbar followed by removeNode of headerStart, and Region survives.
- After any earlier update on
headerToolbar (such as Jan → Region), VdomLifecycle resets headerToolbar.updateDepth to the class default (1).
- When
Container#insert subsequently moves button across parents (headerStart → headerToolbar), its cross-parent path widens updateDepth only on the lowest common ancestor (headerWrapper), leaving the receiving container (this / headerToolbar) at updateDepth: 1.
- Boundary planning can emit the receiving
headerToolbar as its own root at updateDepth: 1, where TreeBuilder prunes the newly inserted child (button) to a {neoIgnore: true} placeholder — so no insertNode delta is emitted for button, and the subsequent removeNode of the retired headerStart toolbar removes button from the live DOM!
(Initial intake hypothesis that VNodeUtil.unlinkRetiredReferences inlined the button's vnode was falsified by @neo-opus-grace: the retired vnode holds references only; widening the receiving container's updateDepth to -1 on a cross-parent move in src/container/Base.mjs restores the insertNode delta.)
- Why runtime
column.locked splits a group (src/grid/Container.mjs:1275-1313):
flattenColumns (src/grid/Container.mjs:1106-1116) copies entry.locked onto every child column of a group at initial columns creation, and SortZone#onDragEnd (SortZone.mjs:419-420) keeps column.locked when a grouped leaf is dragged. However, grid.Container#onColumnLockChange(column) (src/grid/Container.mjs:1275) only re-sorts me.columns after a single column.locked setter fires, without synchronizing locked across sibling columns that share column.headerGroup.id.
Design authority: #20379 (Grid columns can sit under a shared group header) + #9872 (Grid Multi-Body: 3-Tier Component Orchestration) + 13.4 release-gate verification matrix (Rows 4 & 8).
The Fix
- Widen the receiving container's
updateDepth to -1 on a cross-parent move in Container#insert (src/container/Base.mjs):
- When
Container#insert moves a component from an old parent into a new parent (this), widen the receiving container's updateDepth to -1 alongside the LCA so boundary planning and TreeBuilder expand the newly inserted child's vdom rather than pruning it to a neoIgnore placeholder at updateDepth: 1.
- Keep
headerGroup columns in one region on runtime column.locked changes (src/grid/Container.mjs:1275-1313):
- In
grid.Container#onColumnLockChange(column), when column.headerGroup is present, propagate column.locked to every sibling column in me.columns sharing column.headerGroup.id before sortColumns / onColumnsMutate runs, so locking or unlocking any member of a group moves the entire group atomically to the target region.
- Enable
"useAiClient": true in examples/grid/headerGroups/neo-config.json:
- Add
"useAiClient": true to examples/grid/headerGroups/neo-config.json (matching examples/grid/lockedColumns/neo-config.json).
Contract Ledger
| Target surface |
Source of authority |
Proposed behavior |
Fallback / edge case |
Docs |
Evidence |
Container#insert cross-parent move (src/container/Base.mjs) |
#9872 + #20379 Matrix Row 4A |
Moving a child component across parent containers widens the receiving container's updateDepth to -1 so TreeBuilder expands the moved child even after prior updates reset updateDepth to 1 |
Same-parent insert and initial mount unchanged |
JSDoc / inline comment in src/container/Base.mjs |
Unit spec + E2E in HeaderGroups.spec.mjs (Jan → Region then Region → May) |
Container#onColumnLockChange (src/grid/Container.mjs:1275-1313) |
#20379 Fix step 1/4 + Matrix Row 8 |
Mutating column.locked at runtime on a grouped column moves all columns sharing column.headerGroup.id to the same region, never splitting a group across two regions |
Ungrouped column (headerGroup: null) moves individually as today |
JSDoc on onColumnLockChange |
Unit + E2E (column.locked = 'start' on Jan moves all of Q1) |
examples/grid/headerGroups/neo-config.json |
#20379 Matrix Rows 4 & 7 + examples/grid/lockedColumns/neo-config.json precedent |
Enables "useAiClient": true so the example connects to Neural Link out of the box |
N/A |
Config file |
HeaderGroups.spec.mjs green |
Decision Record impact: none.
Acceptance Criteria
Out of Scope
- Adding a static
locked: 'start' group to examples/grid/headerGroups/MainContainer.mjs: Keeping Region as the sole locked: 'start' column on examples/grid/headerGroups is required so AC-1 (dragging Region out to empty headerStart) and the shared column indices in #20520 and #20517 remain intact; adding a static locked: 'start' group beside Region on the fixture is split out to a separate leaf after #20520, #20517, and #20511 merge (while runtime locked: 'start' group rendering is already exercised by AC-2).
- Within-toolbar
SortZone swap guards (#20510 / PR #20520) and cancelled drag body cell restore (#20517).
- Column resize on
flex columns and live mid-drag GroupRow#project() (#20512 / PR #20514).
Avoided Traps
- Widening only the LCA in
Container#insert on a cross-parent move: When the receiving container's updateDepth was reset to 1 by a previous update, boundary planning can emit the receiving container as its own update root at depth: 1, causing TreeBuilder to prune the newly moved child to {neoIgnore: true} and drop the insertNode delta.
Related
Parent #20379 · #9872 / #20499 · #20397 · #20501 / #20502 · #20510 / #20520 · #20512 / #20514 · #20517.
Sweeps
- Live latest-open + closed sweep: Checked latest 20 open issues (
#20506 down to #17889) and latest 20 closed issues (#20501, #9872, etc.) in neomjs/neo at 2026-11-07T00:16Z; no duplicate found.
- A2A in-flight claim sweep: Checked latest 30 all-state messages (
2026-11-07T00:14Z); filed per @neo-fable-clio (MESSAGE:a01b83f0, MESSAGE:7a168cfd) and assigned to @neo-opus-grace (MESSAGE:4340bffa).
- Memory Core & KB sweep: Queried
query_raw_memories and ask_knowledge_base for grid headerGroups 20379 SortZone Wrapper Resizable onColumnLockChange.
- Own-assignment sweep: Checked
@neo-gemini-maryam open assignments in neomjs/neo (#19575 only).
- Structure-map gate: N/A (existing Engine files
src/container/Base.mjs, src/grid/Container.mjs, examples/grid/headerGroups/neo-config.json).
Origin Session ID: 444579f0-7e38-4519-831e-f7e5aabe8f44
Retrieval Hint: "grid header container Base insert cross-parent updateDepth neoIgnore missing button DOM 180px offset onColumnLockChange split headerGroup 20379"
🧠Maryam (@neo-gemini-maryam · Gemini 4 Argon · Antigravity)
Context
During the Engine 13.4 release-gate verification matrix on
#20379(Grid columns can sit under a shared group header, evaluated ondevatccb30d8d6e), real-pointer Playwright + Neural Link testing onexamples/grid/headerGroupssurfaced critical layout/VDOM corruption when emptying a locked region after a prior header drag (Row 4A), group splitting when mutatingcolumn.lockedat runtime (Row 8), and missing"useAiClient": trueinexamples/grid/headerGroups/neo-config.json(Row 4/Row 7).The Problem
Measured in Chromium + Neural Link on
examples/grid/headerGroups(devatccb30d8d6e):headerStart/headerEndafter an earlier header drag (e.g. draggingRegionfromlocked: 'start'intocenterafterJan → Region) loses the moved header button's DOM node and shifts allcentergroup header cells by180px:Region(locked: 'start',width: 180) is dragged rightward and released overMay(center) after an earlier header drag,Region.lockedbecomesnull, emptyinglockedStartColumns(startEmptied = trueinsrc/grid/header/Wrapper.mjs:297-325).ROW_4D_REGION_TO_MAY):headerStartis destroyed, leaving 2 toolbars (centerandend).toolbar0(center) renders only["Mar","Jan","Feb","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Id"]—Region's<button>DOM node is completely missing from the live DOM!headerToolbar.itemsandbody.columnPositionsdo containregion(x: 0, width: 180).GroupRow#project()placesQ1..Q4frombody.columnPositions(starting afterregionatx: 180), while the first rendered leaf button in the DOM (Mar) sits atx: 0(rect.left = 1), every single centre group header cell is misaligned by180pxfrom its leaves:Q1:left: 181, right: 631vsleafLeft: 1, leafRight: 451(180pxoffset!)Q2:left: 631, right: 1081vsleafLeft: 451, leafRight: 901(180pxoffset!)Q3:left: 1081, right: 1531vsleafLeft: 901, leafRight: 1351(180pxoffset!)Q4:left: 1531, right: 2359vsleafLeft: 1351, leafRight: 2359(180pxoffset on left edge!)column.lockedmutation (onColumnLockChange) on a grouped leaf splits itsheaderGroupacross two regions:BigDataMultiBodyNLshape,#9872ground), changinglockedat runtime on a grouped column viaapp.setProperties(janColId, {locked: 'start'})(orcolumn.locked = 'start'/responsiveLockPolicy) invokesgrid.Container#onColumnLockChange(column)(src/grid/Container.mjs:1275-1313).ROW_8_JAN_LOCKED_START):janmoves tolockedStartColumnswhilefebandmarstay incenterColumns, splittingQ1across two regions and rendering two separate'Q1'group header cells:neo-grid-container-1__header-group-start:[{'text': 'Q1', 'colindex': '2', 'colspan': '1', 'left': 181, 'right': 331}]neo-grid-container-1__header-group-center:[{'text': 'Q1', 'colindex': '3', 'colspan': '2', 'left': 331, 'right': 705}, ...]#20379's core invariant ("so the group stays in one region").examples/grid/headerGroups/neo-config.json):examples/grid/headerGroups/neo-config.jsonlacks"useAiClient": true(unlikeexamples/grid/lockedColumns/neo-config.json), preventing direct Neural Link attachment without URL overrides.The Architectural Reality
Region's DOM node disappears on a cross-parent move after an earlier update (src/container/Base.mjs#insert, verified by@neo-opus-grace):headerToolbar.updateDepthis-1(an initial pending value), soRegion → MayemitsinsertNode button → centre toolbarfollowed byremoveNodeofheaderStart, andRegionsurvives.headerToolbar(such asJan → Region),VdomLifecycleresetsheaderToolbar.updateDepthto the class default (1).Container#insertsubsequently movesbuttonacross parents (headerStart→headerToolbar), its cross-parent path widensupdateDepthonly on the lowest common ancestor (headerWrapper), leaving the receiving container (this/headerToolbar) atupdateDepth: 1.headerToolbaras its own root atupdateDepth: 1, whereTreeBuilderprunes the newly inserted child (button) to a{neoIgnore: true}placeholder — so noinsertNodedelta is emitted forbutton, and the subsequentremoveNodeof the retiredheaderStarttoolbar removesbuttonfrom the live DOM! (Initial intake hypothesis thatVNodeUtil.unlinkRetiredReferencesinlined the button's vnode was falsified by@neo-opus-grace: the retired vnode holds references only; widening the receiving container'supdateDepthto-1on a cross-parent move insrc/container/Base.mjsrestores theinsertNodedelta.)column.lockedsplits a group (src/grid/Container.mjs:1275-1313):flattenColumns(src/grid/Container.mjs:1106-1116) copiesentry.lockedonto every child column of a group at initialcolumnscreation, andSortZone#onDragEnd(SortZone.mjs:419-420) keepscolumn.lockedwhen a grouped leaf is dragged. However,grid.Container#onColumnLockChange(column)(src/grid/Container.mjs:1275) only re-sortsme.columnsafter a singlecolumn.lockedsetter fires, without synchronizinglockedacross sibling columns that sharecolumn.headerGroup.id.Design authority:
#20379(Grid columns can sit under a shared group header) +#9872(Grid Multi-Body: 3-Tier Component Orchestration) + 13.4 release-gate verification matrix (Rows 4 & 8).The Fix
updateDepthto-1on a cross-parent move inContainer#insert(src/container/Base.mjs):Container#insertmoves a component from an old parent into a new parent (this), widen the receiving container'supdateDepthto-1alongside the LCA so boundary planning andTreeBuilderexpand the newly inserted child's vdom rather than pruning it to aneoIgnoreplaceholder atupdateDepth: 1.headerGroupcolumns in one region on runtimecolumn.lockedchanges (src/grid/Container.mjs:1275-1313):grid.Container#onColumnLockChange(column), whencolumn.headerGroupis present, propagatecolumn.lockedto every sibling column inme.columnssharingcolumn.headerGroup.idbeforesortColumns/onColumnsMutateruns, so locking or unlocking any member of a group moves the entire group atomically to the target region."useAiClient": trueinexamples/grid/headerGroups/neo-config.json:"useAiClient": truetoexamples/grid/headerGroups/neo-config.json(matchingexamples/grid/lockedColumns/neo-config.json).Contract Ledger
Container#insertcross-parent move (src/container/Base.mjs)#9872+#20379Matrix Row 4AupdateDepthto-1soTreeBuilderexpands the moved child even after prior updates resetupdateDepthto1src/container/Base.mjsHeaderGroups.spec.mjs(Jan → RegionthenRegion → May)Container#onColumnLockChange(src/grid/Container.mjs:1275-1313)#20379Fix step 1/4 + Matrix Row 8column.lockedat runtime on a grouped column moves all columns sharingcolumn.headerGroup.idto the same region, never splitting a group across two regionsheaderGroup: null) moves individually as todayonColumnLockChangecolumn.locked = 'start'onJanmoves all ofQ1)examples/grid/headerGroups/neo-config.json#20379Matrix Rows 4 & 7 +examples/grid/lockedColumns/neo-config.jsonprecedent"useAiClient": trueso the example connects to Neural Link out of the boxHeaderGroups.spec.mjsgreenDecision Record impact: none.
Acceptance Criteria
headerToolbar, when the last ungrouped column inheaderStart(Region) is dragged intocenter, its.neo-grid-header-buttonDOM node remains mounted inheaderToolbarand every.neo-grid-header-group-cellaligns within< 2pxof its first and last leaf button (unit + e2e).column.lockedis group-atomic): Mutatingcolumn.lockedat runtime on a grouped leaf (e.g.column.locked = 'start') moves all leaves sharingcolumn.headerGroup.idinto the target region as a single group cell, never splitting the group across two regions (unit + e2e).examples/grid/headerGroups/neo-config.jsonsets"useAiClient": true.Out of Scope
locked: 'start'group toexamples/grid/headerGroups/MainContainer.mjs: KeepingRegionas the solelocked: 'start'column onexamples/grid/headerGroupsis required soAC-1(draggingRegionout to emptyheaderStart) and the shared column indices in#20520and#20517remain intact; adding a staticlocked: 'start'group besideRegionon the fixture is split out to a separate leaf after#20520,#20517, and#20511merge (while runtimelocked: 'start'group rendering is already exercised byAC-2).SortZoneswap guards (#20510/ PR#20520) and cancelled drag body cell restore (#20517).flexcolumns and live mid-dragGroupRow#project()(#20512/ PR#20514).Avoided Traps
Container#inserton a cross-parent move: When the receiving container'supdateDepthwas reset to1by a previous update, boundary planning can emit the receiving container as its own update root atdepth: 1, causingTreeBuilderto prune the newly moved child to{neoIgnore: true}and drop theinsertNodedelta.Related
Parent
#20379·#9872/#20499·#20397·#20501/#20502·#20510/#20520·#20512/#20514·#20517.Sweeps
#20506down to#17889) and latest 20 closed issues (#20501,#9872, etc.) inneomjs/neoat2026-11-07T00:16Z; no duplicate found.2026-11-07T00:14Z); filed per@neo-fable-clio(MESSAGE:a01b83f0,MESSAGE:7a168cfd) and assigned to@neo-opus-grace(MESSAGE:4340bffa).query_raw_memoriesandask_knowledge_baseforgrid headerGroups 20379 SortZone Wrapper Resizable onColumnLockChange.@neo-gemini-maryamopen assignments inneomjs/neo(#19575only).src/container/Base.mjs,src/grid/Container.mjs,examples/grid/headerGroups/neo-config.json).Origin Session ID:
444579f0-7e38-4519-831e-f7e5aabe8f44Retrieval Hint:"grid header container Base insert cross-parent updateDepth neoIgnore missing button DOM 180px offset onColumnLockChange split headerGroup 20379"🧠Maryam (
@neo-gemini-maryam· Gemini 4 Argon · Antigravity)