20510 Grid header drag-and-drop scrambles grouped leaves on cross-group/region drops and traps ungrouped columns behind groups
20511 Emptying a locked grid region destroys the moved header button DOM and shifts GroupRow by 180px, and runtime column.locked splits a headerGroup across regions
20512 Grid column resize ignores flex columns and leaves GroupRow unprojected during live drag
20517 A cancelled header drag leaves the body cells swapped and hidden
Columns that belong together, like a quarter's three months or an address's street, city and zip, can't share a label in a Neo grid. Every column is one cell in one header row, so an app has to repeat the group in each header's text ("Q1 · Jan").
The Problem
A grid can't render a header cell that spans a run of adjacent columns. The leaf header row carries sorting, resizing, header filters, column menus, drag-reorder and aria-colindex. A group label has to keep all of these working, and it has to stay aligned while columns resize, reorder and scroll.
The Architectural Reality
grid.Container#createColumns (src/grid/Container.mjs l.954) walks a flat columns array. It sends each column's header-button config to the start, center or end toolbar according to locked. It never reads a nested columns key.
Each region's grid.header.Toolbar renders one row of grid.header.Button items (aria-rowindex: 1, src/grid/header/Toolbar.mjs l.85). passSizeToBody measures those buttons into the region body's columnPositions (l.386). The toolbar mirrors horizontal scroll in its scrollLeft_ config (l.61). What moves it on screen is the main thread: ScrollManager registers the centre toolbar's root as the header node (src/grid/ScrollManager.mjs l.394), and GridHorizontalScrollSync#onScroll writes the scrollbar's scrollLeft onto that node in the same frame as the body (src/main/addon/GridHorizontalScrollSync.mjs l.67–80).
The toolbar root has three jobs at once. It is the ARIA row, the scroll-sync node, and the flex items root: getVdomItemsRoot() defaults to the root, and the hbox layout puts its classes on wrapperCls, which is the root (src/layout/Flexbox.mjs l.168–181).
grid.header.Wrapper#syncAriaRows (src/grid/header/Wrapper.mjs l.170–185) makes the regions' toolbars read as ONE ARIA row: the lead toolbar is role="row" and owns the others. grid.Container counts one header row in aria-rowcount (l.1881).
Header drag-reorder runs through draggable/grid/header/toolbar/SortZone.mjs over the toolbar's buttons.
The Fix
(Updated 2026-11-06 at review: step 4 now covers a cross-region release, step 5 states the shipped ARIA shape, and the ledger names the three surfaces consumers read.)
Config. A columns entry with its own columns array is a group, for example {text: 'Q1', columns: [{dataField: 'jan'}, {dataField: 'feb'}, {dataField: 'mar'}]}. createColumns flattens the leaves, in order, into today's pipeline and records each leaf's group. locked is set on the group and applies to every leaf.
The leaf row doesn't change. Sort, resize, filters, menus, drag, aria-colindex and columnPositions keep running on the same flat buttons.
The group row is a projection. Each region that has groups renders one more header row above its leaf row. A group cell's left edge and width come from its first and last leaf's columnPositions entries, so a leaf resize, a flex re-layout or a reorder re-projects the row without a second measurement. grid.header.Wrapper owns the group parts and places them beside its region toolbars, creating them on demand the way it creates headerStart and headerEnd. No part lives inside a toolbar, because the toolbar root has to stay the leaf row (see above). The centre part is a second node that GridHorizontalScrollSync#onScroll writes to, registered next to headerId, so it scrolls in the same frame as the leaf row.
Reorder. Header drag can't move a leaf out of its group, and it can't move an ungrouped column into a group. A grouped leaf released over another region keeps its group's region, so a drop never splits a group across regions. An ungrouped column still changes region by the release position.
ARIA. With groups, one grid.header.GroupRow is header row 1 (role="row", aria-rowindex="1") and holds every region's part (role="none"). Each group cell is a columnheader: its aria-colindex is its first leaf's grid-wide index, and its aria-colspan is its leaf count. The leaf row becomes header row 2, body rows follow from 3, and aria-rowcount counts both header rows. A grid without groups renders today's DOM unchanged.
Contract Ledger
Target Surface
Source of Authority
Proposed Behavior
Fallback
Docs
Evidence
a grid.Container#columns entry with columns: [...]
createColumns, src/grid/Container.mjs l.954
a group: its text heads its leaves, which join the leaf row in order
no nested columns: today's flat columns
JSDoc on columns_
unit: flattening and group membership
grid.column.Base#headerGroup
written by createColumns ({...child, headerGroup: group}); read by grid.header.GroupRow (cells), grid.header.Wrapper (whether a group row exists) and the header SortZone (the swap guard and the drop region)
the group a leaf sits under; a grouped leaf moves only inside its group and keeps the group's region on drop
null: an ungrouped column, which has no cell in the group row and no drag restriction
config JSDoc
unit: group membership; e2e: reorder inside a group, refusal across groups, release over another region
the header group row
grid.header.GroupRow, created and placed by grid.header.Wrapper beside its region toolbars
one cell per group per region, placed from its leaves' columnPositions, in the ARIA shape of Fix step 5
no groups: no group row
class JSDoc
e2e: cell edges after resize, flex re-layout, reorder and scroll; unit on the vdom attributes
grid.Container#headerRowCount
the getter in src/grid/Container.mjs
2 while the group row exists, else 1; the one source for the leaf row's aria-rowindex (Wrapper), the body rows' aria-rowindex (grid.Row) and aria-rowcount
1: today's indexes
getter JSDoc
unit + e2e: group row 1, leaf row 2, first body row 3
grid.Container#getGroupHeaderPartId(region)
the method in src/grid/Container.mjs
a stable <gridId>__header-group-<region> id per part for the grid's lifetime; read by GroupRow (part ids, the centre part's alignment) and ScrollManager (the groupHeaderId it registers)
no group row: the id names no node, and GridHorizontalScrollSync looks it up per scroll and skips it
the centre group part follows the scrollbar in the same frame as the leaf row
no groups: no extra node
method JSDoc
e2e: alignment during scroll
Decision Record impact
none.
Acceptance Criteria
A {text, columns: [...]} entry renders one group header cell above exactly its leaves. A grid without groups renders today's DOM, with no group row.
After a leaf resize, a flex re-layout and a reorder inside the group, the group cell's left and right edges match its first and last leaf's edges (e2e, DOM rects).
During horizontal scroll, the group row stays aligned with the leaf row (e2e).
Replacing the whole columns array re-projects the group row. A consumer that regenerates its columns on every change, like a pivot view that derives its columns from pivot keys, gets correct groups each time.
A group locked to start or end renders in its own region.
Header drag can't drop a leaf outside its group.
ARIA: there are two header rows, group cells carry aria-colspan, and aria-rowcount counts both header rows.
One example grid uses grouped headers.
Out of Scope
More than one group level.
Dragging a whole group, collapsing a group, and sorting or menus on a group cell.
Avoided Traps
Nesting the leaf buttons inside group containers in the toolbar. Layout would align the widths for free. But getColumn, the index-based aria-colindex in createItems, passSizeToBody, Wrapper#getButton and the SortZone all treat the toolbar's items as flat leaf buttons, so each of them would have to walk a tree. The projection leaves the leaf row untouched.
Measuring the group row separately.columnPositions already holds the leaf geometry. A second measurement adds a layout read and a second source of truth that can drift.
Intake (2026-11-05, before branching)
Drift probe: since creation, origin/dev changed one declared file, src/grid/Container.mjs, in f659f97390 (CSV export). That commit only shifted line anchors, and they are updated above.
Prescription checked:src/grid/header/Toolbar.mjs, better owner src/grid/header/Wrapper.mjs. The toolbar root can't host a second row without giving up one of its three jobs. The Wrapper already owns the region toolbars' lifecycle and the cross-region ARIA row. GridHorizontalScrollSync carries the scroll follower.
Classification: valid as written after this sharpening. The ticket is pre-stale (created and last updated today) and has no stale label. No open PR touches src/grid/header/ or src/grid/Container.mjs, no PR references this ticket, and no ADR applies. The KB ticket query and Memory Core turned up no prior attempt and no exclusion.
Related
#12903: the within-region column-drag path that the reorder constraint builds on.
Live latest-open + closed sweep: checked the latest 20 open issues (#20167–#20377) and the closed search "header group columns grid", and read Out of Scope / Avoided Traps on #19671, #12903 and #16375, at 2026-11-05T19:44Z. No equivalent ticket or prior exclusion found. The A2A sweep of the last 30 messages shows no claim on this scope. Memory Core holds no prior decision on it, and none of my open assignments covers it.
Owner: @neo-opus-grace, self-assigned at creation, with a delivery date, so it isn't offered as a first issue.
Context
Columns that belong together, like a quarter's three months or an address's street, city and zip, can't share a label in a Neo grid. Every column is one cell in one header row, so an app has to repeat the group in each header's text ("Q1 · Jan").
The Problem
A grid can't render a header cell that spans a run of adjacent columns. The leaf header row carries sorting, resizing, header filters, column menus, drag-reorder and
aria-colindex. A group label has to keep all of these working, and it has to stay aligned while columns resize, reorder and scroll.The Architectural Reality
grid.Container#createColumns(src/grid/Container.mjsl.954) walks a flatcolumnsarray. It sends each column's header-button config to the start, center or end toolbar according tolocked. It never reads a nestedcolumnskey.grid.header.Toolbarrenders one row ofgrid.header.Buttonitems (aria-rowindex: 1,src/grid/header/Toolbar.mjsl.85).passSizeToBodymeasures those buttons into the region body'scolumnPositions(l.386). The toolbar mirrors horizontal scroll in itsscrollLeft_config (l.61). What moves it on screen is the main thread:ScrollManagerregisters the centre toolbar's root as the header node (src/grid/ScrollManager.mjsl.394), andGridHorizontalScrollSync#onScrollwrites the scrollbar'sscrollLeftonto that node in the same frame as the body (src/main/addon/GridHorizontalScrollSync.mjsl.67–80).getVdomItemsRoot()defaults to the root, and the hbox layout puts its classes onwrapperCls, which is the root (src/layout/Flexbox.mjsl.168–181).grid.header.Wrapper#syncAriaRows(src/grid/header/Wrapper.mjsl.170–185) makes the regions' toolbars read as ONE ARIA row: the lead toolbar isrole="row"and owns the others.grid.Containercounts one header row inaria-rowcount(l.1881).draggable/grid/header/toolbar/SortZone.mjsover the toolbar's buttons.The Fix
(Updated 2026-11-06 at review: step 4 now covers a cross-region release, step 5 states the shipped ARIA shape, and the ledger names the three surfaces consumers read.)
columnsentry with its owncolumnsarray is a group, for example{text: 'Q1', columns: [{dataField: 'jan'}, {dataField: 'feb'}, {dataField: 'mar'}]}.createColumnsflattens the leaves, in order, into today's pipeline and records each leaf's group.lockedis set on the group and applies to every leaf.aria-colindexandcolumnPositionskeep running on the same flat buttons.columnPositionsentries, so a leaf resize, a flex re-layout or a reorder re-projects the row without a second measurement.grid.header.Wrapperowns the group parts and places them beside its region toolbars, creating them on demand the way it createsheaderStartandheaderEnd. No part lives inside a toolbar, because the toolbar root has to stay the leaf row (see above). The centre part is a second node thatGridHorizontalScrollSync#onScrollwrites to, registered next toheaderId, so it scrolls in the same frame as the leaf row.grid.header.GroupRowis header row 1 (role="row",aria-rowindex="1") and holds every region's part (role="none"). Each group cell is acolumnheader: itsaria-colindexis its first leaf's grid-wide index, and itsaria-colspanis its leaf count. The leaf row becomes header row 2, body rows follow from 3, andaria-rowcountcounts both header rows. A grid without groups renders today's DOM unchanged.Contract Ledger
grid.Container#columnsentry withcolumns: [...]createColumns,src/grid/Container.mjsl.954textheads its leaves, which join the leaf row in ordercolumns: today's flat columnscolumns_grid.column.Base#headerGroupcreateColumns({...child, headerGroup: group}); read bygrid.header.GroupRow(cells),grid.header.Wrapper(whether a group row exists) and the headerSortZone(the swap guard and the drop region)null: an ungrouped column, which has no cell in the group row and no drag restrictiongrid.header.GroupRow, created and placed bygrid.header.Wrapperbeside its region toolbarscolumnPositions, in the ARIA shape of Fix step 5grid.Container#headerRowCountsrc/grid/Container.mjs2while the group row exists, else1; the one source for the leaf row'saria-rowindex(Wrapper), the body rows'aria-rowindex(grid.Row) andaria-rowcount1: today's indexesgrid.Container#getGroupHeaderPartId(region)src/grid/Container.mjs<gridId>__header-group-<region>id per part for the grid's lifetime; read byGroupRow(part ids, the centre part's alignment) andScrollManager(thegroupHeaderIdit registers)GridHorizontalScrollSynclooks it up per scroll and skips itGridHorizontalScrollSync#onScrolll.67–80;ScrollManagerl.394Decision Record impact
none.
Acceptance Criteria
{text, columns: [...]}entry renders one group header cell above exactly its leaves. A grid without groups renders today's DOM, with no group row.columnsarray re-projects the group row. A consumer that regenerates its columns on every change, like a pivot view that derives its columns from pivot keys, gets correct groups each time.startorendrenders in its own region.aria-colspan, andaria-rowcountcounts both header rows.Out of Scope
Avoided Traps
getColumn, the index-basedaria-colindexincreateItems,passSizeToBody,Wrapper#getButtonand the SortZone all treat the toolbar'sitemsas flat leaf buttons, so each of them would have to walk a tree. The projection leaves the leaf row untouched.columnPositionsalready holds the leaf geometry. A second measurement adds a layout read and a second source of truth that can drift.Intake (2026-11-05, before branching)
origin/devchanged one declared file,src/grid/Container.mjs, in f659f97390 (CSV export). That commit only shifted line anchors, and they are updated above.src/grid/header/Toolbar.mjs, better ownersrc/grid/header/Wrapper.mjs. The toolbar root can't host a second row without giving up one of its three jobs. The Wrapper already owns the region toolbars' lifecycle and the cross-region ARIA row.GridHorizontalScrollSynccarries the scroll follower.src/grid/header/orsrc/grid/Container.mjs, no PR references this ticket, and no ADR applies. The KB ticket query and Memory Core turned up no prior attempt and no exclusion.Related
Live latest-open + closed sweep: checked the latest 20 open issues (#20167–#20377) and the closed search "header group columns grid", and read Out of Scope / Avoided Traps on #19671, #12903 and #16375, at 2026-11-05T19:44Z. No equivalent ticket or prior exclusion found. The A2A sweep of the last 30 messages shows no claim on this scope. Memory Core holds no prior decision on it, and none of my open assignments covers it.
Owner: @neo-opus-grace, self-assigned at creation, with a delivery date, so it isn't offered as a first issue.
Origin Session ID: 620212f1-fddf-4d36-89f6-34cbc3a124cf
Retrieval Hint: "grid grouped column headers group row projection columnPositions"