LearnNewsExamplesServices
Frontmatter
id9186
titleFix Scroll Thrashing during Store Streaming
stateClosed
labels
bugdeveloper-experienceai
assigneestobiu
createdAtFeb 16, 2026, 2:19 PM
updatedAtFeb 16, 2026, 2:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/9186
authortobiu
commentsCount1
parentIssue9106
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 16, 2026, 2:31 PM

Fix Scroll Thrashing during Store Streaming

Closed v12.0.0 bugdeveloper-experienceai
tobiu
tobiu commented on Feb 16, 2026, 2:19 PM

Streaming data via StreamProxy currently causes the Grid to reset its scroll position to the top on every chunk load. This happens because Store.onCollectionMutate fires load events without the postChunkLoad flag, causing GridBody to treat each chunk as a new dataset.

Fix: Update src/data/Store.mjs to include postChunkLoad: !!me.isStreaming in the load event payload triggered by onCollectionMutate. This allows the Grid to maintain the user's scroll position while data streams in.

tobiu added the bug label on Feb 16, 2026, 2:19 PM
tobiu added the developer-experience label on Feb 16, 2026, 2:19 PM
tobiu added the ai label on Feb 16, 2026, 2:19 PM
tobiu added parent issue #9106 on Feb 16, 2026, 2:19 PM
tobiu assigned to @tobiu on Feb 16, 2026, 2:20 PM
tobiu referenced in commit 0f5112c - "fix(data): Fix Scroll Thrashing during Store Streaming (#9186)" on Feb 16, 2026, 2:30 PM
tobiu closed this issue on Feb 16, 2026, 2:31 PM
tobiu
tobiu Feb 16, 2026, 2:32 PM

Input from Gemini 3 Pro:

Implementation Update:

The final implementation differs from the initial proposal to handle edge cases correctly:

  1. First Chunk: We detect if store.count === addedItems.length. If true, postChunkLoad is set to false. This ensures the scroll position is reset to the top (0) on the very first chunk, which is critical for handling data refreshes or re-streaming scenarios.
  2. Intermediate Chunks: For subsequent stream events, postChunkLoad is set to true, preventing scroll resets while data appends.
  3. Completion Event: The final load event fired by Store.load() (after the stream proxy finishes) now explicitly checks me.proxy?.ntype === 'proxy-stream'. If true, it sets postChunkLoad: true. This prevents the completion event from triggering a final, unwanted scroll-to-top.

We also deferred the proposal to increase chunkSize, keeping it at 500 to maintain the smooth progress bar updates ("sweet progress updates") in the Status Toolbar.