Repository navigation
fix(mobile): hide scroll-to-end control after returning to the live edge - #12562
Closed
jaikhuranna wants to merge 1 commit into
Closed
jaikhuranna wants to merge 1 commit into
jaikhuranna wants to merge 1 commit into
Conversation
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.
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. |
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.
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
maintainScrollAtEndtolerance (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-endevents gain anearEndflag; disclosure reconciliation stays strict.ThreadFeed.tsx: passesisWithinMaintainScrollAtEndThresholdthrough 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.