Repository navigation
Description
Summary
On the iOS bb app, scrolling up a long thread loads older messages. Once the last older page has loaded, the timeline can get stuck: swiping up only bounces at the top, and rows that were just loaded can't be reached. Reopening the thread fixes it. Expected: the timeline keeps scrolling up to the start of the thread.
Versions and environment
- Observed: bb 0.48.0 (
bb-appfrom npm,~/.bb/app-versions/0.48.0), Linux server, opened from the iOS bb app (WKWebView) through bb Connect. iOS version not recorded. - Reproduced (emulated, see below):
mainat a0a0902, Chrome 156 headless with an iPhone user agent, 390×844 viewport and touch emulation.
Steps to reproduce
Observed on device:
- On the iOS bb app, open a thread long enough to have one older page (here
thr_bb9fwvp53s: the latest page has 23 rows, and the older page has 4 rows witholderCursor: null). - Swipe up to the top, so the "Loading older messages…" status triggers the load, while a finger is still on the screen near the top.
- Lift the finger after the rows arrive, then swipe up again.
Emulated repro (what I ran, since no iOS device was available to the agent):
- Open the thread in Chrome with an iPhone UA (
isIOSWebKit→deferWritesWhileScrolling: true) and touch emulation. - In the page, simulate iOS flings on
[data-page-scroll-viewport]: dispatchtouchstarton an element, stepscrollTopdown over frames, dispatchtouchendon the same element, then step momentum frames. - On the fling that loads the last page, start the touch on the "Loading older messages…" sentinel and keep the finger down (2.5 s) until the rows commit, then dispatch
touchendon that same (now detached) sentinel.
Did not reproduce when touchend lands on an element that stays in the document. In the emulation, the next complete touch on a connected element recovers. On the device the reporter saw it stay stuck until the thread was reopened; I have not explained that difference.
Expected vs actual
Emulated, main at a0a0902 after step 3 (scroller state read from the page):
{"top":0,"h":8456,"tf":"translate3d(0px, -2155.81px, 0px)","rows":27,"first":"user-seed:1","firstTop":-2140}
touch log: "35152:touchstart … end-on-DIV.flex justify-center pt-2 (detached)" (no touchend reached the scroller)
removed nodes in that commit: "DIV.flex justify-center pt-2 mb-3 [Loading older messages…]", two row-body placeholders
scrollTop is 0, but pageContent keeps a -2155px transform, so the first row sits 2140 px above the viewport where no scroll can reach it. Expected: once the finger lifts, the held correction is written (scrollTop ≈ 2155, transform cleared), and the reader can keep scrolling up to user-seed:1.
Evidence
- Server log (
~/.bb/logs/server.4.log), trimmed. The older page loaded once, the reader was stuck, the thread was reopened, and the page loaded again:The11:35:02 bb connect thread load path=/api/v1/threads/thr_bb9fwvp53s/timeline?deferContent=true&segmentLimit=8 status=200 11:35:30 bb connect thread load path=/api/v1/threads/thr_bb9fwvp53s/timeline?deferContent=true&beforeAnchorSeq=61&beforeAnchorId=… status=200 responseBytes=2362 11:35:44 bb connect thread load path=/api/v1/threads/thr_bb9fwvp53s/timeline?deferContent=true&segmentLimit=8 status=200 11:35:48 bb connect thread load path=/api/v1/threads/thr_bb9fwvp53s/timeline?deferContent=true&beforeAnchorSeq=61&beforeAnchorId=… status=200 responseBytes=2362beforeAnchorSeq=61page returns"olderCursor": null, soLoadOlderMessagesunmounts in the same commit that prepends the rows. - Cause, as observed:
- On iOS WebKit,
ScrollPositionKeeperholds corrections as a transform whiletouchingis true and writes them only after the finger lifts:shouldDeferandscheduleDeferredWrite, enabled inbottom-anchored-scroll-body.tsx. touchingis cleared only by atouchend/touchcancelthat reaches the scroll element:connectand listeners. Touch events go to the touchstart target. Once React removes that node (here the sentinel),touchendno longer propagates to the scroller. For a scroll gesture iOS sendspointercancel, so thepointerupfallback that Give the timeline's reading position one owner so scrolling stops jumping #5951 added for taps does not run.
- On iOS WebKit,
- bb thread that produced this:
thr_g49pk9k5dz.
What you ruled out
- The data layer: both older-page requests return 200 within 10 ms, and
loadOlderTimelineRowsalways settles its promise. - Windowing: all 27 rows are mounted in this thread.
- Not Compact sidebar swipe can stay partly open after a lost end event #4110: that was a lost end event in the compact sidebar swipe, a different component.
- With the fix (also listening for
touchend/touchcancelon the touchstart target, which still receives events after it is detached), the same emulated sequence writes the correction (scrollTop→ 2173, transform cleared), and the next swipe reachesuser-seed:1.
Suggested priority and effort
Medium: hits iOS readers who scroll back to the start of long threads; the workaround is to reopen the thread; no data lost. Effort low.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 29, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotmobile,threads,partial-repro. Filled all missing classifications.touching=true.Write held scroll corrections when the touch target leaves the docume…