feat(tui): render think→reply pairs as independent cards - #32
Merged
Conversation
Long agentic turns merged every response segment into one trailing card, decoupling prose from the reasoning that produced it. Response text is now a first-class timeline kind: each token stream opens (or extends) a reply segment, so every think→reply cycle renders its own raised card in arrival order. - appendReply keeps msg.content as the \n\n-joined blob for export, stats, and hand-built messages; setTurnMarker attaches cancel / interrupt / error markers to the last reply segment - closeTurn (shared by finalize and session replay) caches a glamour render per segment; resize re-renders them - replayTranscript builds one thinking+reply pair per persisted record, making resumed sessions identical to live turns - turn body assembly switched to an exact line slice: mouse hit-test refs now land on true header rows (fixes latent misalignment for steps after multiple work items)
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
Long turns (e.g. "scan this repo") previously merged every response segment into one trailing answer card inside a single turn box, decoupling prose from the reasoning that produced it and producing unexpected interactions on long turns.
Response text is now a first-class timeline kind. Each
token/token_deltastream opens — or extends — a reply segment, so every think→reply cycle renders its own raised card in chronological order:Details
turnItemgains a reply kind with a per-segment glamour cache; resize re-renders segments.appendReplykeepsmsg.contentas the\n\n-joined blob (export/stats/hand-built compat); distinct cycles join with a blank line.setTurnMarkerattaches**Cancelled.**/ interrupt / error markers to the last reply segment so they land on the final card.closeTurnshared by finalize + session replay;replayTranscriptnow builds one thinking+reply pair per persisted record — resumed sessions render identically to live ones.Checklist
make fmt/vet/lint(0 issues) / race tests greenpairs_test.go): segmentation, marker attachment, residual-blob safety, hit-test accuracy