Repository navigation
fix(web): a failed turn folds its trajectory like any other turn - #67
Merged
Merged
Conversation
Failed runs were excluded from turn folding and their entries itemized, so a failed turn rendered one row per tool call, thinking block, and notification. Only usage-limit pauses kept a group, because pingdotgg#24937 skipped itemizing them; every other failure exploded. Drop the carve-out: failed turns fold, group their work behind the usual toggle when expanded, and never hide the failure card itself.
Quinntyx
added a commit
that referenced
this pull request
Nov 13, 2026
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.
Problem
A failed turn stops folding. Any run that ends in a failure renders its trajectory inline — one row per tool call, per thinking block — with the failure card underneath. A turn that ran three commands and thought once produced six rows instead of a folded turn, which is the wall of rows this fixes.
The cause is in the timeline derivation:
deriveMessagesTimelineRowsandderiveTimelineTurnFoldspassed every failed run into the folds'unfoldedRunIds, anditemizedFailedRunIdsforced each entry of a failed run onto its own row. pingdotgg#24937 only exempted usage-limit pauses from that itemization, which is why the break looked intermittent: a usage-limit failure kept a floatingwork-toggleand everything else itemized.Change
apps/web/src/components/chat/MessagesTimeline.logic.ts: failed runs are no longer excluded from folding, anditemizedFailedRunIdsplus its per-entry branch are gone. A failed turn folds like a completed one and keeps the existing trajectory summary.apps/web/src/components/chat/MessagesTimeline.logic.test.ts: thefailed turn transcripttable now covers latest/historical ×provider_error/usage_limitwith a thinking block in the fixture, and asserts the fold, the retained failure card, and the grouped expansion.Scope and approval
A small, focused fix of a rendering bug in one web logic module; no server, contract, or provider change. It reverses the one part of pingdotgg#24937 that itemized non-usage-limit failures while keeping its intent — usage-limit pauses stay grouped — and makes all failures consistent instead of splitting on failure class. The failure card stays visible, so nothing a reader needs to act on is hidden.
Verification
Failing first on
mainwith the same fixture (3 commands, 1 thinking block, 1 failure), then passing with the fix:provider_errormessage, work, work, work, work, workmessage, turn-fold, workprovider_errormessage, work, work, workmessage, turn-fold, workusage_limitmessage, work-toggle, workmessage, turn-fold, workThe trailing
workrow in every case is the failure card, and it keeps its message and timestamp. Expanding producesmessage, turn-fold, work-toggle, work: one toggle containing the three tools and the thinking block, plus the card. The compact variant (tools stripped) now folds its thinking block too:message, turn-fold, message, work, assistant-meta.apps/web/src/components/chat/MessagesTimeline.logic.test.ts: 94 passed.vp run check:changed: format, lint, knip, typecheck, and tests pass.No pixel capture is attached: this task did not drive the browser client, so the evidence above is the rendered row structure from the derivation function rather than a screenshot. Mobile has a separate timeline renderer and is untouched.
Made with DeepSeek V4.1 Flash via the pi coding harness, t3main profile.