Frontmatter
| id | 9391 |
| title | E2E: Refactor GridRowScrollPinning to Hybrid rAF Engine |
| state | Closed |
| labels | enhancementaiarchitecturegrid |
| assignees | tobiu |
| createdAt | Mar 8, 2026, 3:28 PM |
| updatedAt | Mar 8, 2026, 3:30 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9391 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9380 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 8, 2026, 3:30 PM |
E2E: Refactor GridRowScrollPinning to Hybrid rAF Engine
tobiu added parent issue #9380 on Mar 8, 2026, 3:29 PM

tobiu
Mar 8, 2026, 3:30 PM
Input from Gemini 3.1 Pro:
✦ The Hybrid Architecture baseline has been committed and pushed to the repository. The testing logs have been removed.
This version provides a clean starting point for testing different frequency strategies (like direct scroll event injection vs rAF).
Closing this ticket as requested by the user.
tobiu assigned to @tobiu on Mar 8, 2026, 3:30 PM
tobiu closed this issue on Mar 8, 2026, 3:30 PM
This ticket documents the pivot to the Hybrid Engine for the
GridRowScrollPinningaddon.The initial implementation relied on intercepting VDOM deltas directly as they arrived from the App Worker. However, testing revealed that native browser scrolling runs at 60fps, while worker updates are much slower (often >50ms during heavy layout). This discrepancy meant that the addon was only updating the pinning transform when a message arrived, rather than staying perfectly synced with the physical scrollbar thumb, causing extreme visual jitter.
The Pivot: We have refactored the addon into a Hybrid architecture:
onDeltaUpdate) no longer mutate the DOM. They only update an internalworkerScrollTopreference state.scrollevent listener is attached to the Grid Wrapper node.requestAnimationFrameloop.deltaY(actualScrollTop - workerScrollTop) and applies thetranslate3dCSS transform to the Grid Body content node on every frame, achieving perfect 60fps optical pinning regardless of worker latency.isPinnedstate whendeltaY > rowHeightand stays pinned untildeltaYfalls below2pxto prevent flickering on micro-scrolls.Completed Changes:
src/main/addon/GridRowScrollPinning.mjsto implement therequestAnimationFrameand native scroll listener loop.src/grid/ScrollManager.mjsto properly useafterSetMounted, as the addon now requires the DOM to be ready to attach the scroll listener.This sub-ticket serves to commit this architectural baseline to the repository before further exploration of sync frequency vs performance.