fix(clients): keep opening responses visible after turns settle #7723
main fromrefs/pull/7723/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubSettled turns hid every assistant response except the last one. A short verification after a tool call could bury the main answer under the Worked for row.
Keep the first and terminal assistant messages visible on web and mobile. Tool work and any middle narration still fold, and the fold row now appears where the hidden work starts.
Tests#
vp test run apps/web/src/components/chat/MessagesTimeline.logic.test.ts apps/mobile/src/lib/threadActivity.test.tsvp run --filter @t3tools/web --filter @t3tools/mobile typecheck- Targeted
vp lint,vp fmt, andgit diff --check
Built with GPT-5.6 Codex in the Codex harness through T3 Code.
Note
Low Risk Presentation-only change to chat fold logic on web and mobile, with matching tests. No auth, data, or backend behavior is involved.
Overview Settled turns no longer hide the opening assistant reply behind the Worked for row. A short verification after tools could bury the main answer; the first and terminal assistant messages now stay visible on web and mobile.
Tool activity and any middle narration still collapse. The fold row is anchored at the first hidden entry so it sits between those two messages rather than above the opening reply.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3e65b62cfd22ebb83e0d085e323511cfcc7126b6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).Note
Keep first and terminal assistant messages visible around settled turn folds#
- Updates
deriveThreadFeedTurnFolds(mobile) andderiveTurnFolds(web) to track the first assistant message per turn and exclude it, along with the terminal assistant message, fromhiddenEntryIds. - Only entries between the first and terminal assistant messages are folded for settled, non-streaming turns.
- The fold anchor and
createdAtnow come from the first hidden entry (firstHiddenEntry) instead of the group's first entry, with a guard ensuring it exists before creating a fold. - Risk: turns with no entries between the first and terminal assistant messages will no longer produce a fold row; verify
firstHiddenEntryguard handles empty middle sets as expected.
- 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
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 13.4 KiB 13.4 KiB +18 B (+0.1%) 15.1 KiB ✅ Codex Thread snapshot wire 6.9 KiB 6.9 KiB −2 B (−0.0%) 7.3 KiB ✅ Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +20 B (+0.3%) 7.8 KiB ✅ Codex Live turn WebSocket decoded 55.0 KiB 55.0 KiB 0 B (0.0%) 66.4 KiB ✅ Codex Live turn messages 16 16 0 (0.0%) 21 ✅ Claude Total thread wire 13.4 KiB 13.4 KiB +5 B (+0.0%) 15.1 KiB ✅ Claude Thread snapshot wire 6.9 KiB 6.9 KiB −3 B (−0.0%) 7.3 KiB ✅ Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +8 B (+0.1%) 7.8 KiB ✅ Claude Live turn WebSocket decoded 55.8 KiB 55.8 KiB 0 B (0.0%) 66.4 KiB ✅ Claude Live turn messages 16 16 0 (0.0%) 21 ✅ Baseline:
7107a98· PR result:3e65b62· 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.
- Codex decoded thread snapshot: 109.4 KiB
- Claude decoded thread snapshot: 110.1 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
bd54c0dMacroscope's review found this PR approvable — This is a self-contained UI presentation fix that modifies how thread messages are folded/collapsed - keeping both first and terminal assistant messages visible instead of just the terminal one. Changes are limited to fold logic with corresponding test updates, no runtime or API impact beyond the intended visual behavior.
No code changes detected at
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).3e65b62. Prior analysis still applies.I checked this against my T3 Code history.
This PR fixes every problematic case I've had relating to #7518.
There is a tradeoff. Across 2,200 turns with Claude and Codex, roughly 6% gain a procedural or temporary-status opener that can be considered minor noise (using Luna as judge). These are short (median characters: 77, p99: 289, max: 321). None of the ones I looked at seem anoying or misleading.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
f8742d3d-084b-4013-8cc5-311ee8c049b9You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share