Skip to content

fix(mobile): hide scroll-to-end control after returning to the live edge - #12562

Closed
jaikhuranna wants to merge 1 commit into
pingdotgg:mainfrom
jaikhuranna:fix/mobile-scroll-end-stuck
Closed

jaikhuranna wants to merge 1 commit into
pingdotgg:mainfrom
jaikhuranna:fix/mobile-scroll-end-stuck

Conversation

@jaikhuranna

Copy link
Copy Markdown

Swiping back down to the bottom of a live chat leaves the scroll-to-end chevron stuck next to the "Working" pill, even though the reader is visually back at the live edge. The follow latch only re-armed on LegendList's exact isAtEnd, which is a 1px epsilon — a human swipe almost always rests a few pixels short, in space the end inset covers, so follow never re-armed and the button never hid.

This re-arms follow when the resting position is also inside LegendList's maintainScrollAtEnd tolerance (isWithinMaintainScrollAtEndThreshold, a tenth of the viewport) on the two paths that already re-armed at the exact end: a scroll event outside a user scroll session, and the end of one. Breaking follow stays strict, so reading history is unaffected; re-arming just hands pinning back to LegendList's own maintenance.

  • thread-feed-live-follow.ts: scroll / user-scroll-end events gain a nearEnd flag; disclosure reconciliation stays strict.
  • ThreadFeed.tsx: passes isWithinMaintainScrollAtEndThreshold through on those events and snapshots it at drag release so stream growth during the momentum window can't fake an opt-out.

Verified with the live-follow unit tests (28 passing) and mobile typecheck for the touched scope.

Worked by GLM (glm-5.3-flash) via OpenCode.

Swiping back to the bottom of a live chat rarely rests within LegendList's
1px at-end epsilon, so the follow latch never re-armed and the scroll-to-end
chevron stayed visible even though the reader was visually at the live edge.

Re-arm follow when the position is inside LegendList's maintainScrollAtEnd
tolerance (isWithinMaintainScrollAtEndThreshold), on the same paths that
already re-armed at the exact end: a scroll event outside a user session and
the end of one. Breaking follow stays strict, so reading history is
unaffected, and re-arming hands pinning back to LegendList's own maintenance.

Worked by GLM (glm-5.3-flash) via OpenCode.
@jaikhuranna

Copy link
Copy Markdown
Author

Closing. Re-arming follow anywhere inside LegendList's maintain-at-end threshold (10% of the viewport) brings back the snap-to-bottom that the live-follow latch in ThreadFeed exists to prevent: nudging up a few lines and releasing would re-arm follow. A proper fix needs a much tighter tolerance and device testing.

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant