Skip to content

Revert "Fix iOS scroll jumps while loading windowed history (#5022)" - #5231

Merged
ymichael merged 1 commit into
mainfrom
bb/scroll-pagination-regression-thr_rncg6gec45
Oct 8, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/scroll-pagination-regression-thr_rncg6gec45

Conversation

@ymichael

@ymichael ymichael commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

#5022 made the timeline wait to insert a fetched older page until scrolling had been idle for 200 ms, with no touch in progress. The wait applies on every platform. Desktop wheel and trackpad scrolling (including macOS momentum) keeps firing scroll events, so the prefetched page stays uncommitted for as long as the reader keeps scrolling. isLoadingOlderTimelineRows stays true until the commit, so readers scrolling up now reach the "Loading older messages…" indicator and stall there. Before #5022, rows were inserted as soon as the response arrived, so the 600 px prefetch margin usually hid the load. Only one load can be pending at a time, so the next page also can't prefetch while the reader keeps scrolling.

What changed

Reverts #5022 (9cb923a) in full. One conflict in useThreadTimelineController.ts was resolved by keeping #5068's removal of the useRef import. This brings back the behaviour #5022 fixed: the iOS momentum-scroll jumps and the stale scroll-anchor yank reported in #4793.

How you verified

  • pnpm exec turbo run typecheck lint --filter=@bb/app passes: 0 errors, 250 existing warnings.
  • Timeline, bottom-anchored scroll body, pending-interaction and user-question suites in apps/app: 447 tests in 48 files pass.
  • Not manually scroll-tested in the app.

AGENT GENERATED

🤖 Generated with Claude Code

@ymichael
ymichael merged commit c8f5f45 into main Oct 8, 2026
28 checks passed
@ymichael
ymichael deleted the bb/scroll-pagination-regression-thr_rncg6gec45 branch October 8, 2026 21:01
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.

1 participant