Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep the last message visible when the resting composer expands #9553

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/9553/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

When the composer was at rest and I scrolled a long thread to the bottom, the page was slightly shorter than it is with the composer expanded. Reaching the end expands the composer, and the expansion covered the last message.

The cause: the timeline reserves space at its end equal to the live composer overlay height. A resting composer is about 94px shorter, so the scroll range shrank with it. The timeline deliberately does not move for footer growth, so the expansion had nothing to push against and covered the last rows.

The fix keeps the reserved space constant. While the composer rests, the timeline holds the expanded height (or the resting height plus the empty-composer delta when no expanded height is known yet). The visible composer still shrinks. Only the reserved space above it stays the same, so expanding again changes nothing behind it. The composer reports its overlay height together with the resting state so the two never get paired with the wrong layout, and switching threads rebuilds the reservation from that thread's overlay.

The scroll-to-end pill and the preview mini player still track the live overlay height. Mobile and the collapse-off settings are unchanged.

Scroll to the end with the composer at rest, then it expands without covering the last message

📹 screen recording

Created with Claude Fable 5.1 in Claude Code.


Note

Low Risk Localized chat scroll and composer layout behavior; scroll-to-end pill and mini player still use live overlay height.

Overview Fixes a scroll bug where the resting composer was shorter than the expanded one, so the timeline reserved too little space at the bottom and expanding after scrolling to the end covered the last message.

ChatView now drives timeline end padding, anchor metrics, and overflow checks from a composerTimelineInset instead of the live overlay height. While the composer is expanded, the inset matches the measured overlay; while it rests, it stays at the last expanded reservation (or resting height plus a 94px minimum expansion allowance via new resolveComposerTimelineInset in composerFooterLayout.ts). Switching threads resets and remeasures that reservation so another thread’s tall draft does not leak padding.

ChatComposer reports onRestingChange from a layout effect (before the parent measures) and republishes overlay height when resting changes without a collapse transition; resting transition code publishes destination overlay height earlier in the layout pass.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 166dc412873e59e5e4a69d5828b36a200bb01e0e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Keep last message visible when resting composer expands in ChatViewContent

  • The chat timeline now reserves resolved expanded-composer space at its end, using the larger known reservation or the minimum expansion allowance while the composer rests; when expanded, the current overlay height becomes authoritative
  • Adds a resting-state ref and callback passed into ChatComposer, and a layout effect that rebuilds the reservation when the active thread or overlay element changes in ChatView.tsx
  • End anchoring and overflow calculations in MessagesTimeline now use the resolved timeline inset instead of the raw overlay height
Macroscope summarized 166dc41.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.6 KiB13.6 KiB+34 B (+0.2%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.0 KiB0 B (0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.5 KiB6.6 KiB+34 B (+0.5%)7.8 KiB✅
      CodexLive turn WebSocket decoded57.0 KiB57.1 KiB+44 B (+0.1%)66.4 KiB✅
      CodexLive turn messages910+1 (+11.1%)21✅
      ClaudeTotal thread wire13.6 KiB13.6 KiB−13 B (−0.1%)15.1 KiB✅
      ClaudeThread snapshot wire7.0 KiB7.0 KiB+5 B (+0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.6 KiB6.5 KiB−18 B (−0.3%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.9 KiB57.8 KiB−44 B (−0.1%)66.4 KiB✅
      ClaudeLive turn messages109−1 (−10.0%)21✅

      Baseline: 617edab · PR result: 166dc41 · 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.8 KiB
      • Claude decoded thread snapshot: 114.5 KiB

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

    3. Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6d6c56735f46200b0b981880c87808e8d48b9e83. Configure [here](https://www.cursor.com/dashboard/bugbot).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 166dc41

      Macroscope's review found this PR approvable — This is a localized web UI bug fix that keeps the timeline’s expanded-composer space reserved while the composer rests, while preserving live geometry for the mini-player and scroll controls. The added state coordination is confined to existing composer/timeline layout paths and includes focused unit coverage.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. ty. was just about to make this pr.

Sign in to join this conversation.