Repository navigation
Fix iOS thread scroll jumps by keeping timeline rows mounted - #5028
Merged
Merged
Conversation
Since timeline windowing became the default (#4218, 0.44.0) and started at 20 items on phones (#4540, 0.45.0), scrolling up through a thread on iOS moves the text being read. Rows mounted above the viewport during a flick are measured at a different height than their estimate. The virtualizer corrects that with a scrollTop write, but iOS WebKit stops momentum on such writes, so TanStack defers the correction until scrolling ends. The rows below move immediately, and the deferred correction then snaps the view again when the scroll settles. Turn windowing off on iOS/iPadOS WebKit, which restores the pre-0.44 fully mounted timeline there. Desktop browsers and Android keep windowing. The iOS detection moves to a shared helper used by the keyboard viewport workaround as well. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/ios-thread-scroll-abruptly-jumps-thr_aedn9u3q8i
branch
October 6, 2026 17:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Scrolling through long threads on iPhone and iPad could move the text being read and snap again when scrolling settled. Timeline virtualization replaces estimated row heights with measured heights as rows mount above the viewport. Its scroll-position corrections interfere with iOS WebKit momentum scrolling, so deferring those corrections leaves visible jumps.
What changed
Disable timeline virtualization on iOS/iPadOS WebKit and keep every loaded row mounted. Desktop and Android retain virtualization. Extract the existing iOS detection into a shared helper also used by the keyboard-dismissal viewport workaround, including detection of iPads using desktop-style browsing, and document the platform behavior in the CLI app-settings reference.
This trades increased memory and rendering work on long loaded iOS timelines for stable scrolling. There are no server/daemon wire or public API changes.
How you verified
pnpm exec turbo run test --filter=@bb/app -- ios-webkit.test.ts ThreadTimelineRows.windowing.test.tsx useMobileVisualViewportHeight.test.tsx— 26 tests passed across three files. Includes an iPhone regression case asserting all 59 rows remain mounted without virtual spacers, plus browser-detection and keyboard-viewport coverage.pnpm exec turbo run typecheck --filter=@bb/app— passed from Turbo cache.git diff --check origin/main...HEAD— passed.