Context
test/playwright/e2e/grid/HeaderGroups.spec.mjs:224 fails intermittently on hosted CI. On Engine PR #20494, run 42307988793 (job 128202192920) at 81ce12b8:
- the leaves reached the new scroll position (the
toPass() at :217–220 passed);
- the centre group cells then stayed misaligned for the full 5 s;
- a same-head retry was green.
That PR's change cannot reach the grid header. The defect-note (fingerprint 8b0774ab, 2026-11-06 23:20Z) is promoted here because the failure recurred after #20466. Unknown: what triggered the re-projection inside the CI run (a column-position or width update is the likely source, not observed).
The Problem
Reproduced on examples/grid/headerGroups under CPU throttling (Emulation.setCPUThrottlingRate 8–10×): 4 of 6, and later 4 of 10, runs stuck. A scrollLeft setter probe on .neo-grid-header-group-part-center recorded the same sequence in every stuck run:
- two writes of 300 from the scroll sync;
- a write of
undefined from DeltaUpdates.updateNode (src/main/DeltaUpdates.mjs:928), called from Main.renderFrame, which the browser applies as 0.
The part stayed the same DOM node throughout. The leaf header stayed at 300, and the part could have scrolled up to 942 px, so the value was reset, not clamped.
The Architectural Reality
GridHorizontalScrollSync.onScroll copies the scrollbar's position onto the centre group part (src/main/addon/GridHorizontalScrollSync.mjs:83).
- That scroll reaches the App worker.
GroupRow captures it, because saveScrollPosition defaults to true (src/component/Abstract.mjs:113), and onScrollCapture records scrollLeft on the part in its vdom (src/component/Base.mjs:1843) and vnode (Abstract.mjs:533), "preserved for future re-renders".
GroupRow#project() rebuilds vdom.cn from scratch (src/grid/header/GroupRow.mjs:74), so a re-projection after the scroll drops the recorded value. The vdom diff then emits scrollLeft: undefined for the part (src/vdom/Helper.mjs:138–141 emits whenever new and old differ), and DeltaUpdates writes it.
#aligned re-applies the header's position only for the first projection (GroupRow.mjs:121), so nothing restores the part afterwards.
The Fix
In GroupRow#project(), carry each part's recorded scrollLeft from the previous vdom.cn into the rebuilt part, keyed by part id. A re-projection then diffs no scroll change.
The unit test goes in test/playwright/unit/grid/HeaderGroups.spec.mjs: record a centre-part scroll through onScrollCapture, re-project and update, then assert that the part's vdom and vnode still hold the value.
Acceptance Criteria
Out of Scope
- Making the vdom diff (
Helper.mjs) ignore an undefined scroll value engine-wide. That would cover every component that rebuilds a scrolled node, but it changes every component's diff on the weekend of the 13.4 cut. It's a separate decision.
- The other HeaderGroups tests, and the scroll sync addon's handling of a clamped header.
Avoided Traps
- The clamp hypothesis (my first read, in the defect-note): the part was never clamped. The probe measured
scrollLeft 0 against a 942 px range.
- Re-aligning on every projection with
DomAccess.scrollTo and the App-side header scrollLeft: that value can lag the main thread, so it would pull the part back to an older position.
Related
#20379 / PR #20397 (introduced GroupRow and the spec) · #20466 (anchor corrections; this was not covered) · #20494 (where it recurred)
Live latest-open + closed sweep: checked the latest 20 open plus closed searches (header group scroll, GroupRow / group row scrollLeft; Out of Scope and Avoided Traps read on #20379) at 2026-11-06 23:33Z, and found no equivalent or prior exclusion. A2A in-flight sweep (30 messages, all read-states): no overlapping claim. Memory sweep: #20379's history, plus #19955 (a different header-scroll defect, fixed in the sync addon). Own assignments: no overlap.
Origin Session ID: 0a7e2d47-f139-4206-b12e-d4897b6ffeea
Retrieval Hint: "GroupRow project rebuild drops recorded scrollLeft vdom diff undefined DeltaUpdates centre group part"
🖖 Grace (claude-opus-5-5, Claude Code)
Context
test/playwright/e2e/grid/HeaderGroups.spec.mjs:224fails intermittently on hosted CI. On Engine PR #20494, run 42307988793 (job 128202192920) at 81ce12b8:toPass()at :217–220 passed);That PR's change cannot reach the grid header. The defect-note (fingerprint
8b0774ab, 2026-11-06 23:20Z) is promoted here because the failure recurred after #20466. Unknown: what triggered the re-projection inside the CI run (a column-position or width update is the likely source, not observed).The Problem
Reproduced on
examples/grid/headerGroupsunder CPU throttling (Emulation.setCPUThrottlingRate8–10×): 4 of 6, and later 4 of 10, runs stuck. AscrollLeftsetter probe on.neo-grid-header-group-part-centerrecorded the same sequence in every stuck run:undefinedfromDeltaUpdates.updateNode(src/main/DeltaUpdates.mjs:928), called fromMain.renderFrame, which the browser applies as 0.The part stayed the same DOM node throughout. The leaf header stayed at 300, and the part could have scrolled up to 942 px, so the value was reset, not clamped.
The Architectural Reality
GridHorizontalScrollSync.onScrollcopies the scrollbar's position onto the centre group part (src/main/addon/GridHorizontalScrollSync.mjs:83).GroupRowcaptures it, becausesaveScrollPositiondefaults to true (src/component/Abstract.mjs:113), andonScrollCapturerecordsscrollLefton the part in its vdom (src/component/Base.mjs:1843) and vnode (Abstract.mjs:533), "preserved for future re-renders".GroupRow#project()rebuildsvdom.cnfrom scratch (src/grid/header/GroupRow.mjs:74), so a re-projection after the scroll drops the recorded value. The vdom diff then emitsscrollLeft: undefinedfor the part (src/vdom/Helper.mjs:138–141emits whenever new and old differ), andDeltaUpdateswrites it.#alignedre-applies the header's position only for the first projection (GroupRow.mjs:121), so nothing restores the part afterwards.The Fix
In
GroupRow#project(), carry each part's recordedscrollLeftfrom the previousvdom.cninto the rebuilt part, keyed by part id. A re-projection then diffs no scroll change.The unit test goes in
test/playwright/unit/grid/HeaderGroups.spec.mjs: record a centre-part scroll throughonScrollCapture, re-project and update, then assert that the part's vdom and vnode still hold the value.Acceptance Criteria
scrollLeftin the part's vdom and vnode. The unit test fails without the fix (Expected: 300, Received: undefined).test/playwright/unit/grid/HeaderGroups.spec.mjsandtest/playwright/e2e/grid/HeaderGroups.spec.mjspass at the PR head, and the e2e scroll test passes repeated under CPU throttling.HeaderGroups.spec.mjs:224on hosted CI (the defect-note stays closed).Out of Scope
Helper.mjs) ignore anundefinedscroll value engine-wide. That would cover every component that rebuilds a scrolled node, but it changes every component's diff on the weekend of the 13.4 cut. It's a separate decision.Avoided Traps
scrollLeft0 against a 942 px range.DomAccess.scrollToand the App-side headerscrollLeft: that value can lag the main thread, so it would pull the part back to an older position.Related
#20379 / PR #20397 (introduced
GroupRowand the spec) · #20466 (anchor corrections; this was not covered) · #20494 (where it recurred)Live latest-open + closed sweep: checked the latest 20 open plus closed searches (
header group scroll,GroupRow/group rowscrollLeft; Out of Scope and Avoided Traps read on #20379) at 2026-11-06 23:33Z, and found no equivalent or prior exclusion. A2A in-flight sweep (30 messages, all read-states): no overlapping claim. Memory sweep: #20379's history, plus #19955 (a different header-scroll defect, fixed in the sync addon). Own assignments: no overlap.Origin Session ID: 0a7e2d47-f139-4206-b12e-d4897b6ffeea
Retrieval Hint: "GroupRow project rebuild drops recorded scrollLeft vdom diff undefined DeltaUpdates centre group part"
🖖 Grace (claude-opus-5-5, Claude Code)