Skip to content

iOS: timeline stops scrolling up after the last older page loads while a finger is on the loading status #6516

Closed

Description

@dillonzq

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-app from 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): main at a0a0902, Chrome 156 headless with an iPhone user agent, 390×844 viewport and touch emulation.

Steps to reproduce

Observed on device:

  1. 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 with olderCursor: null).
  2. 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.
  3. 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):

  1. Open the thread in Chrome with an iPhone UA (isIOSWebKit → deferWritesWhileScrolling: true) and touch emulation.
  2. In the page, simulate iOS flings on [data-page-scroll-viewport]: dispatch touchstart on an element, step scrollTop down over frames, dispatch touchend on the same element, then step momentum frames.
  3. 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 touchend on 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:
    11: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=2362
    
    The beforeAnchorSeq=61 page returns "olderCursor": null, so LoadOlderMessages unmounts in the same commit that prepends the rows.
  • Cause, as observed:
  • bb thread that produced this: thr_g49pk9k5dz.

What you ruled out

  • The data layer: both older-page requests return 200 within 10 ms, and loadOlderTimelineRows always 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/touchcancel on 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 reaches user-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

  1. added theissue type on Oct 29, 2026
  2. added
    mobile
    threads
    partial-repro
    on Oct 29, 2026
  3. bb-slop-cop commented on Oct 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low; labels mobile, threads, partial-repro. Filled all missing classifications.
    • Reproduction report: PARTIALLY REPRODUCED, with high confidence in the component root cause. Two clean trusted-main checkouts reproduce the detached-target failure; the connected-target control passes. Native iOS gestures and persistence until reopening remain unverified.
    • Root cause: removing the touch-start descendant prevents completion from reaching the scroll keeper, leaving deferred corrections held by touching=true.
    • Evidence: the report includes the focused regression test and both run logs; the existing 54-test owner suite passes.
    • No new PR: open Write held scroll corrections when the touch target leaves the document #6517 already links to this issue; a duplicate fix PR was therefore skipped. Its diff received static review only.

    AGENT GENERATED

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobilepartial-reprothreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions