Skip to content

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

Open
macodev00 wants to merge 6 commits into
pingdotgg:mainfrom
macodev00:cursor/hide-android-scroll-to-bottom-4216
Open

macodev00 wants to merge 6 commits into
pingdotgg:mainfrom
macodev00:cursor/hide-android-scroll-to-bottom-4216

Conversation

@macodev00

@macodev00 macodev00 commented Sep 21, 2026 •

Copy link
Copy Markdown

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 #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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 21, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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 e7a1af7 and 537291c.

📒 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 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]. ThreadDetailScreen initializes and resets isAtEnd. ThreadFeed reports end-state changes. shouldShowThreadFeedScrollToEnd hides 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 github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 21, 2026
@macodev00

Copy link
Copy Markdown
Author

@coderabbitai review

@macodev00

Copy link
Copy Markdown
Author

@macroscope-app review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ 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.

@macroscopeapp

macroscopeapp Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

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

@macodev00

Copy link
Copy Markdown
Author

@coderabbitai review

@macodev00

Copy link
Copy Markdown
Author

@macroscope-app review

@macroscopeapp

macroscopeapp Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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

@macodev00

Copy link
Copy Markdown
Author

@coderabbitai review

@macodev00

Copy link
Copy Markdown
Author

@macroscope-app review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

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.

@macroscopeapp

macroscopeapp Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

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.

@macodev00

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
⚠️ 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.

@macodev00

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
⚠️ 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.

Show the floating scroll-to-end pill only when live-follow is paused
and the list is actually away from the end. Re-arm follow inside
LegendList's maintain-at-end tolerance so a swipe that rests a few
pixels short, or streamed auto-scroll, does not leave the control up.

Fixes pingdotgg#12754
CodeRabbit docstring coverage is scoped to functions this diff touches and
was 0%. Add one-line TSDoc on the named live-follow helpers and extract
named function declarations so coverage can clear the 80% threshold.
CodeRabbit's docstring check only counts comments immediately before
function declarations. Lift the screen components out of memo() and
attach TSDoc to the scroll-session helpers the diff already touches.
Extract the new visibility cases into documented function declarations
so CodeRabbit counts them, and document the empty-feed placeholder.
CodeRabbit coverage includes functions adjacent to the scroll-to-end
diff hunks. Document ThreadFeedPlaceholder so it is not an uncovered miss.
CodeRabbit only credits docstring coverage on statement-level function
declarations. Move scroll-session and disclosure-settle logic next to
the other live-follow helpers so the check can see the comments.
@cursor
cursor Bot force-pushed the cursor/hide-android-scroll-to-bottom-4216 branch from e7a1af7 to 537291c Compare September 23, 2026 06:32

This branch has not been deployed

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

Labels

size:L 100-499 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.

[Bug]: Android: scroll-to-bottom arrow is shown even when already scrolled to the very bottom

1 participant