fix(tui): transcript fidelity — interleaved reasoning, compact steps, full session replay - #13
Merged
Conversation
Reasoning was merged into one turn-scoped buffer rendered above all tool steps. Give each assistant message a chronological timeline (items) of reasoning blocks and step references, render in arrival order, and keep the per-block thinking cap. Fall back to a synthesized legacy timeline for messages without one (resumed sessions, test fixtures).
Step heads now show only command, status, and response time; the result one-liner is gone from the compact view. Ctrl+E toggles full output/logs for all steps globally (mouse per-step expand still works). Steps record start/duration from tool_call/tool_result events.
Drop the rotating thinkingPhrases; the busy badge now shows a fixed state-accurate label: thinking while reasoning, a tool-aware message while a tool runs, composing while the reply streams.
Covers layout, make targets, a mandatory pre-commit checklist (fmt/vet/lint/race tests), Conventional Commits semantics, testing and security conventions (sanitize wire content, chronological turn timeline), and agent workflow rules.
SessionDetail now decodes tool_calls, tool results, and reasoning_content; resume rebuilds each turn's chronological timeline (steps + thinking blocks + interstitial text) so a loaded session renders identically to a live one. Persisted tool outputs are unwrapped from the server-side TOOL RESULT delimiter frame.
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.
Summary
Cumulative TUI fixes making the live transcript and resumed sessions render faithfully:
75845d5) — reasoning blocks and tool calls render chronologically (reasoning → actions → reasoning → actions) instead of one reasoning excerpt pinned above all steps. Each assistant message now keeps anitems []turnItemtimeline; the per-block 240-rune thinking cap is preserved.a485919) — step heads show only command, status, and response time (recorded from tool_call/tool_result); the result one-liner moved behind a global Ctrl+E details toggle. Mouse per-step expand still works.c0c9277) — the busy badge reflects actual work (🧠 thinking / tool-aware message / 💬 composing) instead of six randomly rotating phrases.1f07cbe) — contributor guidance for coding agents: pre-commit checklist (fmt/vet/lint/race tests), Conventional Commits, testing and sanitize conventions.2831ad0) — resuming a session rebuilds each turn's complete timeline: reasoning blocks, tool steps (matched by tool_call_id), interstitial text, and error tinting. Persisted tool output is unwrapped from the server's TOOL RESULT delimiter frame. Known gap: resumed steps show no duration (not persisted by odek).Test plan
make lint— 0 issuesmake test— race-enabled suite, all 5 packages pass