LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 7, 2026, 1:19 AM
updatedAtNov 7, 2026, 5:23 PM
githubUrlhttps://github.com/neomjs/neo/issues/20512
authorneo-gemini-maryam
commentsCount0
parentIssue20379
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 20521 Engine e2e shards split by test count, so one runs past the ceiling
blocking[]
closedAtNov 7, 2026, 5:23 PM

Grid column resize ignores flex columns and leaves GroupRow unprojected during live drag

neo-gemini-maryam
neo-gemini-maryam commented on Nov 7, 2026, 1:19 AM

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 of column resizing (Row 6) on examples/grid/headerGroups surfaced two defects in Neo.grid.header.plugin.Resizable and Neo.grid.Body#updateCellPositions.

The Problem

Measured in Chromium on examples/grid/headerGroups (dev at ccb30d8d6e):

  1. Row 6A — Resizing a flex leaf column (Dec, {flex: 1, minWidth: 150}) is a complete no-op:
    • In examples/grid/headerGroups/MainContainer.mjs:8, Dec is configured with {flex: 1, minWidth: 150} (and resizable: true by default). At viewport 2600×800, Dec flexes to 528px.
    • Dragging Dec's .neo-resizable-right handle by -150px leaves Dec's width completely unchanged (ROW_6_RESIZE_DETAILS: {"decWidthBefore":528,"decWidthAfter":528}).
  2. Row 6B — Group header cells stay frozen during live column resize (onDragMove) and only snap to their leaves on mouseup (onDragEnd):
    • While dragging Feb's .neo-resizable-right handle by +80px (prior to mouseup), Feb's header button and body cells widen live on every pointer step (leafRight: 705), while Q1's .neo-grid-header-group-cell remains frozen at right: 631 (q1DuringFebResize: {"text":"Q1","left":181,"right":631,"leafLeft":181,"leafRight":705} — a 74px misalignment mid-drag), snapping to right: 705 only after mouseup calls toolbar.passSizeToBody() (q1AfterFebResize: {"text":"Q1","left":181,"right":705,"leafLeft":181,"leafRight":705}).

The Architectural Reality

  • Why resizing a flex column is a no-op (src/grid/header/plugin/Resizable.mjs:81-84, 116-119 + src/grid/header/Toolbar.mjs:365-369):
    • Resizable#onDragMove (lines 81-84) and onDragEnd (lines 116-118) write owner.width = newWidth and owner.wrapperStyle = {width: ${newWidth}px}, but never set owner.flex = 'none'.
    • On Neo.grid.header.Button, flex defaults to 'none'. When a column is configured with flex: 1, button.flex is 1, which emits style.flex = '1 1 0%' on the button wrapper. In a flex toolbar (display: flex), flex: 1 1 0% overrides style.width whenever free space exists in the container, and Toolbar#isMeasuredWidth(item) (src/grid/header/Toolbar.mjs:368: return !!((flex && flex !== 'none') || ...)) continues to treat the column as flex-sized on subsequent layout passes.
    • Once a user explicitly resizes a flex column via its resize handle, the column's width is user-pinned in pixels and owner.flex must be cleared to 'none'.
  • Why GroupRow lags behind live column resize (src/grid/header/plugin/Resizable.mjs:86-88 + src/grid/Body.mjs:1595-1653):
    • During Resizable#onDragMove, body.updateCellPositions(owner.dataField, newWidth) (src/grid/Body.mjs:1595-1653) updates pos.width for the resized column, shifts pos.x += deltaWidth for all following columns in body.columnPositions, updates body.availableWidth, and updates the active body rows' VDOM.
    • Because GroupRow#project() (src/grid/header/GroupRow.mjs:68-121) reads directly from toolbar.body.columnPositions and toolbar.body.availableWidth without any DOM measurement, calling me.gridContainer?.headerWrapper?.groupRow?.project() at the end of Body#updateCellPositions (or from Resizable#onDragMove) re-projects the group header cells in the exact same frame as the body cells and leaf header button.

Design authority: #20379 Fix step 3 ("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") + 13.4 release-gate verification matrix (Row 6).

The Fix

  1. Clear flex: 'none' when resizing a header button (src/grid/header/plugin/Resizable.mjs:81-84, 116-119):
    • Include flex: 'none' in owner.set({flex: 'none', width: newWidth, wrapperStyle: {width: ${newWidth}px}}) in Resizable#onDragMove (and ensure owner.flex = 'none' and the Corresponding column.width = newWidth; column.flex = 'none' stay in sync on onDragEnd), so user-resized flex columns adopt their dragged pixel width and Toolbar#isMeasuredWidth treats them as explicit-px columns thereafter.
  2. Re-project GroupRow during live resize (src/grid/Body.mjs:1595-1653):
    • At the end of Body#updateCellPositions, invoke me.gridContainer?.headerWrapper?.groupRow?.project() so .neo-grid-header-group-cell edges track the leaf header and body cells live during drag:move, not only on mouseup.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback / edge case Docs Evidence
Resizable#onDragMove / onDragEnd (src/grid/header/plugin/Resizable.mjs:81-120) #20379 AC-2 + Matrix Row 6A Dragging the resize handle on a flex column (Dec) clears flex: 'none' and resizes the column to newWidth (clamped by minWidth / maxWidth) Fixed-width columns (flex: 'none') behave identically to today JSDoc on onDragMove / onDragEnd E2E in HeaderGroups.spec.mjs (resizing Dec changes its width and re-projects Q4)
Resizable#onDragMove (src/grid/header/plugin/Resizable.mjs:81-94) #20379 Fix step 3 + Matrix Row 6B Calls owner.parent.gridContainer.headerWrapper?.groupRow?.project() right after body.updateCellPositions(owner.dataField, newWidth), keeping group cells aligned mid-drag as a header-side concern Grids without groupRow (groupRow === null) no-op via optional chaining JSDoc on onDragMove E2E in HeaderGroups.spec.mjs asserting groupEdges alignment mid-drag before mouseup

Decision Record impact: none.

Acceptance Criteria

  • AC-1 (Row 6A — Resizing a flex leaf column): Dragging Dec's resize handle at wide viewport (2600×800, where Dec flexes > 300px) resizes Dec to the dragged pixel width, clears flex: 'none', and updates Q4's right edge to match Dec's right edge (e2e).
  • AC-2 (Row 6B — Live mid-drag GroupRow projection): During a column resize drag on Feb (before page.mouse.up()), Q1's .neo-grid-header-group-cell right edge matches Mar's right edge (< 2px) and Q2..Q4 shift live in lockstep (e2e).

Out of Scope

  • Header drag-and-drop reorder (SortZone / GroupRow, tracked in sibling ticket under #20379).
  • Emptying locked regions and runtime column.locked group splitting (Wrapper / Container, tracked in sibling ticket under #20379).

Avoided Traps

  • Only asserting groupEdges after page.mouse.up() (HeaderGroups.spec.mjs:93-99): onDragEnd calls toolbar.passSizeToBody(), which re-projects GroupRow on drop and hides the fact that GroupRow stayed frozen throughout onDragMove.

Related

Parent #20379 · #20397 · #20501 / #20502 · #19671 (column resize performance).

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/grid/header/plugin/Resizable.mjs, src/grid/Body.mjs).

Origin Session ID: 444579f0-7e38-4519-831e-f7e5aabe8f44 Retrieval Hint: "grid header Resizable flex column Dec no-op updateCellPositions GroupRow project mid-drag 20379"

🧭 Maryam (@neo-gemini-maryam · Gemini 4 Argon · Antigravity)

tobiu referenced in commit 951114c - "fix(grid): a resized flex column keeps its width, and group cells follow the drag (#20512) (#20514) on Nov 7, 2026, 5:23 PM
tobiu closed this issue on Nov 7, 2026, 5:23 PM