Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep chat from jumping when the scroll-to-end pill mounts #12317

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 1 commit intomain fromt3code/a064dd0dmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

What 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

    2. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.5 KiB13.5 KiB+7 B (+0.1%)15.1 KiB✅
      CodexThread snapshot wire7.1 KiB7.1 KiB−2 B (−0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.4 KiB6.5 KiB+9 B (+0.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded56.2 KiB56.3 KiB+44 B (+0.1%)66.4 KiB✅
      CodexLive turn messages910+1 (+11.1%)21✅
      ClaudeTotal thread wire13.5 KiB13.5 KiB−6 B (−0.0%)15.1 KiB✅
      ClaudeThread snapshot wire7.1 KiB7.1 KiB−1 B (−0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.4 KiB6.4 KiB−5 B (−0.1%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.0 KiB57.0 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages990 (0.0%)21✅

      Baseline: 675869d · PR result: fc36861 · Source CI: success

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

      • Codex decoded thread snapshot: 113.9 KiB
      • Claude decoded thread snapshot: 114.6 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      All clear

      Posted via Macroscope — UI Consistency
    4. Approvability

      Verdict: Approved at fc36861

      Macroscope'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).
    5. Review Change StackReview Change Stack

      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

      ChatView now stores the last published composer overlay height. Scroll-to-end clearance updates reuse that height when showScrollToBottom changes 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.tsx
      The composer stores its published overlay height, separates clearance publishing from timeline-inset publishing, and reuses the stored height when showScrollToBottom changes.

      Priority: ⬇️ Low

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Suggested reviewers: t3dotgg

      Merge Risk: ⚪ Minimal · up to fc368

      The 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 nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring 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 nameStatusExplanation
      Title check✅ PassedThe title clearly describes the primary change: preventing chat from jumping when the scroll-to-end pill mounts.
      Description check✅ PassedThe 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✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck 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.

Sign in to join this conversation.