Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): hide Android scroll-to-end when already at live edge #12860

Closedmacodev00(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/12860/headopened View on GitHub

What

  • 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

    2. Approvability

      Verdict: Approved at 51f58df

      Macroscope'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).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      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_commits setting.

      Use the following commands to manage reviews:

      • @coderabbitai resume to resume automatic reviews.
      • @coderabbitai review to 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. ThreadDetailScreen receives 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.ts
      Live-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.tsx
      ThreadFeed reports 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.ts
      ThreadDetailScreen stores 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: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 53729

      The 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 nameStatusExplanation
      Title check✅ PassedThe title clearly and concisely describes the main fix: hiding the Android scroll-to-end control at the live edge.
      Description check✅ PassedThe 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✅ PassedThe changes satisfy the coding requirements in [#12754]. ThreadDetailScreen initializes and resets isAtEnd. ThreadFeed reports end-state changes. shouldShowThreadFeedScrollToEnd hides the cont…
      Out of Scope Changes check✅ PassedThe 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✅ PassedDocstring 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.
    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to 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.

    5. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    6. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    7. Rate Limit Exceeded

      @macodev00 have exceeded the limit for the number of chat messages per hour. Please wait 25 minutes and 7 seconds before sending another message.

    8. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    9. Rate Limit Exceeded

      @macodev00 have exceeded the limit for the number of chat messages per hour. Please wait 21 minutes and 49 seconds before sending another message.

    10. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to 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.

    11. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to 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.

Sign in to join this conversation.