fix(mobile): hide Android scroll-to-end when already at live edge #12860
main fromrefs/pull/12860/head·opened View on GitHubWhat#
- Hide the floating scroll-to-end control when the thread feed is already at the live edge, including Android overscroll at the bottom and streamed auto-follow.
Why#
Fixes https://github.com/pingdotgg/t3code/issues/12754
Dragging/overscrolling while already at the bottom was flashing the pill because live-follow paused without checking isAtEnd.
UI#
Android thread feed: scroll-to-bottom arrow stays hidden when already at the end; still appears when the user scrolls up away from the live edge.
Checklist#
- I read CONTRIBUTING.md and kept this small / bug-only
- What + why explained above
- Followed AGENTS.md documentation rules (no new docs)
- No unrelated changes
- CLA / AI-reviewed standing override for macodev00 auto-contrib
Summary by CodeRabbit#
- Improvements
- Thread feeds continue following new content when users are at or near the latest content.
- The scroll-to-end button appears only when live follow is paused and the feed is away from the latest content.
- Scroll tracking stays consistent during dragging, momentum scrolling, and when expanded thread content settles into place.
- Follow behavior resets correctly when switching between threads, and the scroll-to-end button reflects the new thread’s position.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Approved at
51f58dfMacroscope's review found this PR approvable — This is a localized mobile scrolling bug fix that adds end-state tracking and near-end follow handling, with focused tests covering button visibility and follow transitions. Its runtime impact is limited to the thread feed’s scroll control and live-follow behavior, with no schema, infrastructure, security, billing, or static-analysis changes.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
13bccced-8316-46e8-bf6a-8ab1b590343c📥 Commits
Reviewing files that changed from the base of the PR and between e7a1af7ac6368f81b8f57d6ca4a36a8c876a63ea and 537291c5ec8b9d0f4f82f2b60010b66d1ec5a788.
📒 Files selected for processing (1)
apps/mobile/src/features/threads/ThreadDetailScreen.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
Thread feed live-follow logic now tracks exact-end and near-end positions.
ThreadDetailScreenreceives feed end-state updates and hides the scroll-to-end control when the feed is at its end.Changes#
Thread feed end-follow behavior
Layer / File(s) Summary Live-follow contract and visibility logic
apps/mobile/src/features/threads/thread-feed-live-follow.ts,apps/mobile/src/features/threads/thread-feed-live-follow.test.tsLive-follow events include near-end state. Follow re-arms within the maintain-at-end tolerance. Tests cover follow transitions and scroll-to-end visibility. Feed end-state integration
apps/mobile/src/features/threads/ThreadFeed.tsxThreadFeedreports exact-end changes, uses near-end state for live-follow transitions, and delegates scroll handling to named helpers. The memoized component uses a named implementation function and an explicit display name.Thread-detail visibility and validation
apps/mobile/src/features/threads/ThreadDetailScreen.tsx,apps/mobile/src/features/threads/thread-feed-live-follow.test.tsThreadDetailScreenstores and resets feed end state, applies the scroll-to-end predicate, and passes the end-state callback. Tests cover exact-end, near-end, and live-follow transitions.Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
53729The Android scroll-to-end control is expected to stay hidden at the live edge and appear when scrolling away. No actionable merge-blocking risk is established.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Title check ✅ Passed The title clearly and concisely describes the main fix: hiding the Android scroll-to-end control at the live edge. Description check ✅ Passed The description explains what changed, why the fix is needed, and the user-visible behavior. It includes a checklist, but it does not provide the before/after screenshots or interaction video requeste… Linked Issues check ✅ Passed The changes satisfy the coding requirements in [ #12754].ThreadDetailScreeninitializes and resetsisAtEnd.ThreadFeedreports end-state changes.shouldShowThreadFeedScrollToEndhides the cont…Out of Scope Changes check ✅ Passed The changes stay within [ #12754]. They update Android thread-feed end-state tracking, live-follow behavior, scroll-to-end visibility, related event types, and focused automated tests. The component ex…Docstring Coverage ✅ Passed Docstring coverage is 89.47% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 4 files. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
Comment `@coderabbitai help` to get the list of available commands.github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
@coderabbitai review
⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
@coderabbitai review
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
@coderabbitai review
Rate Limit Exceeded#
@macodev00have exceeded the limit for the number of chat messages per hour. Please wait 25 minutes and 7 seconds before sending another message.Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Rate Limit Exceeded#
@macodev00have exceeded the limit for the number of chat messages per hour. Please wait 21 minutes and 49 seconds before sending another message.@coderabbitai review
⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
@coderabbitai review
⚠️ Action not completed
Already reviewed the last commit. Use
@coderabbitai full reviewto rerun a review of the entire changeset.Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
macodev00(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes