LearnNewsExamplesServices
Frontmatter
id9392
titleE2E: Implement GridRowScrollPinning Automated Test and Sync Refinement
stateClosed
labels
enhancementaitestinggrid
assigneestobiu
createdAtMar 8, 2026, 3:48 PM
updatedAtMar 8, 2026, 5:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/9392
authortobiu
commentsCount1
parentIssue9380
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 8, 2026, 5:20 PM

E2E: Implement GridRowScrollPinning Automated Test and Sync Refinement

Closed v12.1.0 enhancementaitestinggrid
tobiu
tobiu commented on Mar 8, 2026, 3:48 PM

This ticket tracks the creation of automated E2E tests for the GridRowScrollPinning architecture using Playwright, targeting the extreme scale of the examples/grid/bigData application.

The Problem: While the initial GridRowScrollPinning addon implemented a hybrid rAF engine to sync VDOM deltas with native scrolling, manual testing reveals edge cases (like slow thumb drags over massive distances) where the grid still visually tears or goes blank due to misalignments between scrollTop, translate3d, and the browser's compositor layer culling.

Testing Strategy:

  1. Environment: examples/grid/bigData/index.html configured for 100,000 rows (20M cells).
  2. Simulation: Playwright will simulate slow, continuous vertical scrollbar thumb drags.
  3. Measurement: We will extract empirical data (actualScrollTop, workerScrollTop, deltaY, and the DOM transform values) frame-by-frame during the drag.
  4. Assertion: The test must mathematically prove that the rows remain within the visible viewport bounds on every single frame, effectively detecting the "white flash" or "ping-pong" tearing.

Refinement Goal: Once the test reliably fails by exposing the mechanical flaw, we will use the data to refine the architectural approach (e.g., implementing an "Inner Row Container" layer or synchronous scroll injection) until the test passes.

tobiu added the enhancement label on Mar 8, 2026, 3:48 PM
tobiu added the ai label on Mar 8, 2026, 3:48 PM
tobiu added the testing label on Mar 8, 2026, 3:48 PM
tobiu added the grid label on Mar 8, 2026, 3:48 PM
tobiu added parent issue #9380 on Mar 8, 2026, 3:48 PM
tobiu assigned to @tobiu on Mar 8, 2026, 4:14 PM
tobiu referenced in commit 0ea2074 - "Test: Add E2E Visual Blanking Detector for GridRowScrollPinning (#9392) on Mar 8, 2026, 4:15 PM
tobiu
tobiu Mar 8, 2026, 4:15 PM

Input from Gemini 3.1 Pro:

✦ The initial test/playwright/e2e/GridRowPinning.spec.mjs test has been pushed to the repository.

Test Overview:

  • Targets the bigData example grid.
  • Uses Playwright to programmatically scale the grid to 100,000 rows (20M cells) via the UI controls.
  • Simulates rapid, continuous wheel scrolling.
  • Injects a requestAnimationFrame loop that calculates the physical getBoundingClientRect of the viewport wrapper and the rendered row nodes on every frame.
  • Explicitly detects "White Flashes" by proving if the row bounding box is pushed entirely above or below the visible viewport wrapper.

Results: The test successfully fails as expected against the current architecture. The empirical data proves two critical flaws in our current pinning strategy:

  1. Latency Tearing: The VDOM worker is too slow to calculate rows for massive scroll jumps. The native browser scroll pushes the existing stale rows entirely off-screen before the worker responds.
  2. Bounds Breaking: When the pinning addon does kick in and applies a massive translate3d to the neo-grid-body node, it pushes the massive 2.5M pixel scroll container down, shifting the layout bounds and pushing the rows out of the bottom of the viewport.

The next step is to brainstorm a new strategy based on these empirical findings.

tobiu closed this issue on Mar 8, 2026, 5:20 PM