LearnNewsExamplesServices
Frontmatter
id20082
titleA grid in a popup renders no cells: engine scrollLeft 762, DOM at 0
stateClosed
labels
bugaigriddashboard
assigneesneo-opus-ada
createdAtOct 23, 2026, 10:29 PM
updatedAt12:07 AM
githubUrlhttps://github.com/neomjs/neo/issues/20082
authorneo-opus-vega
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAt12:07 AM
milestonev13.3.1

A grid in a popup renders no cells: engine scrollLeft 762, DOM at 0

Closed Backlog/active-chunk-10 bugaigriddashboard
neo-opus-vega
neo-opus-vega commented on Oct 23, 2026, 10:29 PM

Context

Found by the operator's manual walk of apps/workstation on the v13.3.1 candidate (dev 0ab667195e), 2026-10-23 ~20:2xZ, while repeating #20009's dock gestures on the 100k Matrix pane (no worker freeze reproduced). The Matrix pane sits alone in a popup window (320 × 270 CSS px inner); the grid shows its header (Living signal, Action) and an empty body. The operator expects a small popup resize to repair it; the live reads below were taken before any resize.

Live reads through the Neural Link at 20:25Z (session 966a2f3e…, popup window 3e000f5f…):

  • neo-grid-body-1 (Neo.grid.Body, mounted): containerWidth: 320, availableWidth: 1080 (eight columns), scrollLeft: 762, visibleColumns: [5, 7], bufferColumnRange: 2, scrollTop: 0, availableHeight: 185, availableRows: 3, rowHeight: 50; wrapperStyle {flex: '1 1 0%'}.
  • neo-grid-header-toolbar-1 (Neo.grid.header.Toolbar): scrollLeft: 762 as well.
  • The rows exist. Row 0's vdom: cells 0–2 carry style.display: 'none'; cells 3–7 are laid out at left 380, 510, 640, 790, 950 px. The DOM rects of the cell components prove the DOM scroll is 0: neo-progress-1 (the progress cell, left: 640) sits at viewport x = 651, neo-sparkline-1 at 801, neo-button-42 at 965, all beyond the 318-px viewport; the header toolbar's DOM shows the first two columns at x 1–319.
  • 762 is exactly 1080 − 318, the far-right scroll limit of this viewport: the engine's position is one this window's viewport can reach, and the DOM is not there.
  • No console error in the session.

So the body computed its column window from an engine scrollLeft (762) the window's DOM does not hold (0): the cells inside the viewport are the hidden ones, the rendered ones are off-screen, and the body reads as empty.

The Problem

Neo.grid.Body#updateMountedAndVisibleColumns derives visibleColumns from me.scrollLeft (src/grid/Body.mjs around line 1565) and afterSetScrollLeft is its only trigger; the config is normally fed from the DOM's scroll events through the scroll sync. Two candidate ways for the config and the DOM to part, to be decided by the operator's sequence (asked) and a resize of the popup (asked, with a re-read):

  • (A) a remount after a horizontal scroll. The grid was scrolled to the far right in the popup, then a gesture re-projected the popup and re-mounted the grid; the new DOM element starts at scrollLeft 0, no scroll event fires, and Body#afterSetMounted re-arms only the scroll edge (src/grid/Body.mjs ~538), re-syncing nothing horizontal. Prior art: on a pop-out hop the vertical pair reset together, config and DOM both to 0, with the writer of that 0 unverified (Mnemosyne's receipt on Discussion #18224, 2026-09-04); the horizontal pair has no such reset.
  • (B) a commanded scroll the DOM never confirmed. Neo.grid.header.Toolbar#scrollToIndex (the column-drag overdrag loop) writes scrollLeft optimistically, command-driven, "not yet confirmed" until the DOM scroll reports (src/grid/header/Toolbar.mjs ~55–197, ~494–533); if the DomAccess.scrollTo command reached a window other than the popup, or the confirmation never came back, the engine keeps the commanded value while the popup's DOM stays at 0. The windowId class of #18291 (cells kept the opener's windowId after a hop) is the precedent for a command addressed to the wrong window.

Observation vs inference: the stale pair is measured; which of (A) or (B) produced it is inference until the sequence is known.

The Architectural Reality

  • src/grid/Body.mjs: scrollLeft_ config (~206), afterSetScrollLeft → updateMountedAndVisibleColumns (~582, ~1561–1590), afterSetMounted (~538); scrollTop is "controlled externally by Grid.Container.syncBodies()" (~587) and resets with the DOM on remount; scrollLeft has no remount hook.
  • src/grid/header/Toolbar.mjs: the command-driven scrollLeft during a column drag (~55, ~89, ~180–197, scrollToIndex ~494).
  • The horizontal scroll sync addon feeds the body's and the header's scrollLeft from the DOM scroll events (ScrollManager.syncGridBody, main-thread GridHorizontalScrollSync); on a fresh DOM in a popup there is no event until the user scrolls.
  • Prior art: Discussion #18224 (popup-birth arm receipts), #18291 (grid.Row without afterSetWindowId), #19998 (the Matrix grid keeps a window-sized viewport and row pool whatever its ancestors do).

Design authority: the grid's own contract that visibleColumns describes the DOM's viewport; the body and the DOM must agree on scrollLeft after any remount or commanded scroll.

The Fix

  1. Record the operator's sequence on this ticket and the result of the resize (does visibleColumns return to [0, 1] with scrollLeft 0, or does the DOM jump to 762?); that decides between (A) and (B).
  2. (A): on a remount (afterSetMounted(true) after false, or a windowId change) re-apply the engine's scrollLeft to the new DOM through the scroll sync's own write path (the user's horizontal position survives the hop, as the vertical one should), or reset the config to 0 together with the DOM; either way the pair agrees. (B): the commanded scroll must address the grid's own window and the command must settle or roll back when the DOM reports nothing.
  3. Red-first: a Neural Link e2e under test/playwright/e2e/workstation/ that pops the Matrix pane out, scrolls it to the far right, performs the operator's gesture, and asserts that the body's visibleColumns and the DOM's scroll agree and that a cell is painted inside the viewport; a unit arm for the remount re-sync.

Acceptance Criteria

  • AC-1: The operator's sequence is recorded here and reproduced red on dev 0ab667195e by an e2e arm (the popup's grid body with scrollLeft ≠ the DOM scroll and no cell inside the viewport).
  • AC-2: After the fix the same arm is green: the body's scrollLeft equals the DOM's, visibleColumns covers the viewport, and at least one cell rect intersects the viewport.
  • AC-3: A unit arm on Neo.grid.Body: a remount after a non-zero scrollLeft leaves the config and the (stubbed) DOM in agreement.
  • AC-4: The vertical pair is measured in the PR (Discussion #18224's finding: config and DOM both reset to 0 on a hop) and either kept symmetric with the horizontal fix or recorded as a separate ticket.
  • AC-5 (post-merge): the operator repeats his sequence on the merged head and the body renders its cells.

Out of Scope

#20009 (what made the Matrix pane content-sized); the vertical scroll reset on a hop beyond its measurement (AC-4 names it); #20081.

Related

#20009 · #19998 · #18291 · Discussion #18224 · #20022 (the walk that found it)

Milestone: the operator's call under the 2026-10-23 ruling (every known grid or Workstation bug blocks unless he excepts it); unassigned until that call; a builder takes it through ticket-intake.

Live latest-open sweep: checked the latest 20 open issues at 2026-10-23T20:27:59Z; no equivalent. Keyword sweep ("grid scrollLeft remount popup empty visible columns", "mountedColumns visibleColumns stale"): none. A2A claim sweep: the latest lane-claims at 20:28Z, none on the grid's scroll model. MC sweep: Discussion #18224's popup-birth receipts (vertical pair reset on a hop, writer unverified), #18291 (windowId not forwarded to rows), the 2026-03-31 horizontal scroll-sync repair (the body's scrollLeft propagation through ScrollManager.syncGridBody); none records this horizontal pair. Own-assignment sweep: #20022, #20023, #20009, #17918, #17416, #16212; none overlapping.

Origin Session ID: d6f6838c-943b-4fe2-aa9a-b57cd3719d2d Retrieval Hint: "grid popup empty body scrollLeft 762 DOM 0 visibleColumns stale remount commanded scroll"

tobiu referenced in commit 36a74c7 - "fix(grid): a grid shown again or moved in the DOM gets its scroll position back (#20082) (#20083) on 12:07 AM
tobiu closed this issue on 12:07 AM