Repository navigation
Conversation
A steer reuses its turn's id for the follow-up response, and both deriveTerminalAssistantMessageIds and deriveTurnFolds grouped by turnId alone. Once the turn settled, the pre-steer response was treated as superseded narration and stayed hidden behind the later "Worked for X" fold. Both now segment a turn by the user messages preceding its entries, so each user message gets its own fold and terminal assistant message. Folds carry a foldId (turnId, or `turnId:index` when steered) used for the row's DOM id and its independent expand state, and duration is computed per segment instead of borrowing latestTurn's span.
dpatou
force-pushed
the
fix/fold-split-visual-response-at-user-message
branch
from
September 10, 2026 00:14
d676b9b to
b73a480
Compare
dpatou
marked this pull request as draft
September 10, 2026 00:43
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
deriveTerminalAssistantMessageIdsandderiveTurnFoldsinapps/web/src/components/chat/MessagesTimeline.logic.tssegment a turn by the user messages preceding its entries instead of grouping byturnIdalone. Each user message starts its own "Worked for …" fold with its own terminal assistant message.TurnFoldand theturn-foldrow carry afoldId. It equalsturnIdfor the common single-segment turn, so existing DOM ids are unchanged, and becomesturnId:indexwhen a steer split the turn. The row's DOM id and expand/collapse state key on it. Citation jumps keep expanding byturnId.latestTurn.startedAt/completedAtis only used when the turn has a single segment; the "You stopped after …" label stays on the last segment of an interrupted turn.One new test in
MessagesTimeline.logic.test.tscovers a steered turn: both responses stay visible, two folds share the turn id but expand independently, and only the last one takes the stopped label.Why
Sending a prompt while a turn is running is a steer for every provider adapter (Claude, Cursor, Grok, OpenCode, Antigravity): the follow-up response reuses the running turn's id. The fold logic grouped by
turnId, so once the turn settled the response to the first prompt was treated as superseded mid-turn narration and hidden behind the fold anchored on the second response. The user only saw the answer to the queued prompt.Related: pingdotgg#7529 and pingdotgg#7518 (closed by pingdotgg#7723, which keeps the opening message visible), pingdotgg#8879 and pingdotgg#10991 (open, same fold swallowing a substantive answer). pingdotgg#8903 proposes never folding a non-blank assistant message.
Known limitations
Timeline entries are ordered by
createdAt, and a steer's user message is persisted at send time. The segment boundary therefore falls at the moment the user pressed send, not at the moment the provider actually picked the prompt up.Alternatives considered:
UI Changes
Before: after a steer, a settled turn shows one "Worked for …" row followed only by the response to the second prompt. After: user message, fold, response, user message, fold, response. Screenshots deferred while the approach is under review.
Checklist
Verification:
vp test run --project unit src/components/chat/MessagesTimeline.logic.test.ts src/components/chat/MessagesTimeline.test.tsx(148 passing),tsc --noEmitinapps/web(clean).Model and harness: Claude Opus 5 (implementation) and Claude Fable 5.1 (review) via Claude Code in T3 Code.