Repository navigation
fix(mobile): hide scroll-to-end button while dragging at the bottom - #11854
zero-two-rafaeltab wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe thread feed now reports whether it is at the end. The detail screen tracks this state and uses it with live-follow state to control the scroll-to-end button. ChangesThread feed end-position tracking
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The scroll-to-end visibility update is ready to merge with no identified current-head risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review follow-up for
The remaining merge blocker is workflow approval, not a failed test. CI for this commit is |
| return; | ||
| } | ||
| onIsAtEndChange(listState.isAtEnd); | ||
| return listState.listen("isAtEnd", onIsAtEndChange); |
There was a problem hiding this comment.
🟡 Medium threads/ThreadFeed.tsx:2433
When a row grows from asynchronous measurement or streaming without a scroll event, the parent keeps isAtEnd: true even though the reader is above the end, so shouldShowThreadFeedScrollToEnd stays hidden. This subscription only observes LegendList's stored observable; size-only changes require querying getState(). Update the parent from getState().isAtEnd in onItemSizeChanged for all row resizes, not only during disclosure settling.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/threads/ThreadFeed.tsx around line 2433:
When a row grows from asynchronous measurement or streaming without a scroll event, the parent keeps `isAtEnd: true` even though the reader is above the end, so `shouldShowThreadFeedScrollToEnd` stays hidden. This subscription only observes LegendList's stored observable; size-only changes require querying `getState()`. Update the parent from `getState().isAtEnd` in `onItemSizeChanged` for all row resizes, not only during disclosure settling.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a narrow, tested mobile UI bug fix that changes only scroll-to-end button visibility and leaves existing live-follow behavior intact, with no schema, security, billing, or infrastructure impact. An unresolved Medium finding identifies a possible stale end-state after non-disclosure row resizing, which remains a follow-up risk despite the otherwise limited scope. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition. The patch conflicts with the rewrite in apps/mobile/src/features/threads/ThreadFeed.tsx. Even where the conflict is small enough to rebase, we are asking for fresh PRs against the new base so we can review and verify the behavior in V2. Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved. |
Problem and fix
Dragging further down while already at the bottom of a mobile thread briefly shows the scroll-to-end button. Starting a drag intentionally pauses live-follow before the list moves, and the button previously used that pause alone as its visibility condition. The list already handles overscroll with a
<=end-distance check.Show the button only when live-follow is paused and the list is away from the end. Subscribe to LegendList's end-position transitions, including layout changes, while preserving the existing live-follow behavior and avoiding state updates on every scroll frame.
Validation
Before / after
New recordings show the same full sequence in both versions, with Android Show touches and Pointer location enabled:
Watch the side-by-side video · Before video · After video
Dragging farther down at the bottom:
After scrolling up normally — the button is visible in both versions:
Model: GPT-6. Harness: Codex.
Duplicate check and platform scope
fix(mobile): stabilize scroll-to-end control) was an earlier PR for this same regression: the scroll-to-end button briefly appeared when a drag started at the actual end because the live-follow latch was the only visibility condition. Its proposed fix also gated the button on both paused live-follow and the feed being away from the end.main, with the end-state subscription also covering layout changes.ThreadFeed/ThreadDetailScreenand LegendList path, iOS should receive this fix too; it is not Android-specific. The Android/iOS differences in this area are keyboard and content-inset handling, not the end-follow visibility rule. The bug was reproduced on Android 16; iOS was not run, so iOS verification remains outstanding.Summary by CodeRabbit
New Features
Tests