fix(web): fold interim turn responses - #215
Conversation
(cherry picked from commit 17c48f7fc1af66110706b013bf41901ebcd8aedb)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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. |
Review follow-up on the #8828 port. Folding everything before the terminal message assumes that message is the answer. A turn that ends with no text at all renders as "Worked for 22s" above "(empty response)", with the substantive response folded out of sight and no hidden-item count on the fold row. The comment upstream deleted named exactly this case. The first assistant message now stays visible when the terminal message carries no text; a terse but non-empty closing message still folds, which is the change's intent.
|
Adversarial review confirmed the mechanics are clean — Fixed: a turn that ends with no text folded away its own answer. With the first-message exemption gone, a settled turn whose terminal assistant message is empty renders as I deliberately kept this narrow. My first attempt also exempted short terminal messages (under 80 chars), which broke upstream's own fixture where the turn ends "Verification finished." — that is upstream's product call about terse closers, not a defect, so a terse-but-non-empty ending still folds. Only the empty case is guarded. Regression test added. Not fixed — belongs with the mobile sequence. Re-verified: |
A settled turn kept both its first and its terminal assistant message visible, so a
turn that opened with a long interim response left that response permanently
expanded above the "Worked for ..." row. The duration row then sat between two
messages instead of leading into the answer.
Settled turns now keep only the terminal assistant message. Everything before it
folds behind the duration row, so the fold reads as "worked for N, here is the
result". Agent-spawn CTA rows still never fold.
Adopted from upstream
pingdotgg/t3code#8828(17c48f7fc), cherry-picked clean.This is a deliberate behaviour change, not a bug fix — it changes what is
visible on every settled turn. Called out because it is worth a look in a real
client before it lands, not just a green test run.
Verified:
vp test run --dir apps/web apps/web/src/components/chat/MessagesTimeline.logic.test.ts apps/web/src/components/chat/MessagesTimeline.test.tsx(90 passed),
vp run -F @t3tools/web typecheck(exit 0, no errors).Reviewed and integrated with Claude Opus 5 in Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.