fix(web): keep chat from jumping when the scroll-to-end pill mounts #12317
main fromt3code/a064dd0d·merged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHubWhat Changed#
Chat no longer remeasures the composer overlay when the scroll-to-end pill mounts. Overlay height stays whatever the composer last published; the pill only refreshes its clearance from that height.
Usage scans no longer keep aggregating cached records after a transcript file is gone. pruneScanCache now drops in-window entries under roots the walk actually completed, and leaves entries outside that window (and under unwalked roots) in place. The extra source-volume identity cache and Codex same-timestamp occurrence keys went with the old “keep usage after cleanup” path.
Why#
The pill mounts and unmounts in the same commits that expand or rest the composer. A fast fling can land there while the overlay is still pinned at the previous tween height. Measuring then published that stale height against the new resting flag, dropped the timeline inset, and yanked scroll. The pill only needs clearance, so it should not drive overlay height.
Absence from a walk only proves a file is gone inside the requested window. Treating missing transcripts as still live inflated totals and needed extra identity/dedupe machinery. Evicting everything the walk did not see would also wipe 30-day cache entries whenever someone opened 7 days.
UI Changes#
Fast-fling to the bottom should keep the thread still when the scroll-to-end pill appears while the composer is settling. This is a motion/layout bug; a short recording of that fling is the right evidence. None is attached here.
Checklist#
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes
Cursor Grok 4.6
Summary by CodeRabbit#
- Bug Fixes
- Improved scroll-to-end behavior when the composer expands or collapses quickly.
- Prevented stale overlay measurements from affecting the scroll-to-bottom experience.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
All clear
Posted via Macroscope — UI Consistencymacroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
fc36861Macroscope's review found this PR approvable — This is a focused one-file fix that separates composer height measurement from scroll-to-end pill clearance, preventing pill mount/unmounts from disturbing the chat timeline. Its runtime impact is limited to localized scroll and overlay positioning behavior.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
e82601c7-6ed8-4fab-a50a-fab8beb41074📥 Commits
Reviewing files that changed from the base of the PR and between 675869d2b0f9e059d5950b80390c0cad1cb1590e and fc36861b24802e81cef353535b1328abc31600c7.
📒 Files selected for processing (1)
apps/web/src/components/ChatView.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough#
ChatViewnow stores the last published composer overlay height. Scroll-to-end clearance updates reuse that height whenshowScrollToBottomchanges instead of re-measuring the composer.Changes#
Composer clearance publishing
Layer / File(s) Summary Separate overlay measurement and clearance updates
apps/web/src/components/ChatView.tsxThe composer stores its published overlay height, separates clearance publishing from timeline-inset publishing, and reuses the stored height when showScrollToBottomchanges.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
t3dotggMerge Risk: ⚪ Minimal · up to
fc368The updated clearance flow preserves the published composer height when the scroll-to-end control changes visibility; no actionable merge risk remains.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
Check name Status Explanation Title check ✅ Passed The title clearly describes the primary change: preventing chat from jumping when the scroll-to-end pill mounts. Description check ✅ Passed The description includes the required What Changed, Why, UI Changes, and Checklist sections. It explains both changes and identifies the missing motion video evidence, but it is otherwise complete and… Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. - Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
Comment `@coderabbitai help` to get the list of available commands.Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
675869d· PR result:fc36861· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.