Skip to content

Remove local to global scroll resync above some threshold#438

Open
severo wants to merge 2 commits intomasterfrom
435-remove-resync
Open

Remove local to global scroll resync above some threshold#438
severo wants to merge 2 commits intomasterfrom
435-remove-resync

Conversation

@severo
Copy link
Contributor

@severo severo commented Feb 23, 2026

Before: we would switch to global scrolling after scrolling 500 rows locally.
After: we always stay in local scroll mode, when scrolling row by row.

Screencast.From.2026-02-23.14-45-35.mp4

fixes #435

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the accumulated localOffset threshold check from the dual-mode virtual scrolling implementation, allowing continuous local scrolling without forced resynchronization to global scroll mode after 500 rows. This change addresses issue #435, which identified that the previous behavior could theoretically make some rows inaccessible in datasets with more than 4 billion rows.

Changes:

  • Removed the accumulated localOffset check from canBeLocalScroll() function, keeping only the per-delta size check
  • Updated test descriptions and expectations to reflect the new behavior where local scrolling continues regardless of accumulated offset
  • Simplified function signatures by removing the now-unused localOffset parameter from the scroll eligibility check

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/helpers/scroll.ts Removed accumulated localOffset check from canBeLocalScroll(), allowing indefinite local scrolling when individual scroll deltas remain small
test/helpers/scroll.test.ts Updated test descriptions and expectations to validate that local scrolling continues even when accumulated localOffset exceeds the threshold

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@severo severo requested a review from platypii February 23, 2026 13:55
@severo severo force-pushed the 435-remove-resync branch from ead77c7 to 704f172 Compare March 2, 2026 10:17
@severo severo requested a review from bleakley March 2, 2026 10:18
@severo
Copy link
Contributor Author

severo commented Mar 2, 2026

wdyt @platypii?

@severo
Copy link
Contributor Author

severo commented Mar 5, 2026

another gentle ping @platypii @bleakley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove resynchronization in dual-mode scrolling?

2 participants