Skip to content

fix(tui): transcript fidelity — interleaved reasoning, compact steps, full session replay - #13

Merged
jkyberneees merged 5 commits into
mainfrom
fix/cumulative
Jul 27, 2026
Merged

fix(tui): transcript fidelity — interleaved reasoning, compact steps, full session replay#13
jkyberneees merged 5 commits into
mainfrom
fix/cumulative

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

Cumulative TUI fixes making the live transcript and resumed sessions render faithfully:

  • Interleaved reasoning (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 an items []turnItem timeline; the per-block 240-rune thinking cap is preserved.
  • Compact tool steps + Ctrl+E details (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.
  • State-accurate status badge (c0c9277) — the busy badge reflects actual work (🧠 thinking / tool-aware message / 💬 composing) instead of six randomly rotating phrases.
  • AGENTS.md (1f07cbe) — contributor guidance for coding agents: pre-commit checklist (fmt/vet/lint/race tests), Conventional Commits, testing and sanitize conventions.
  • Full session replay (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 issues
  • make test — race-enabled suite, all 5 packages pass
  • New regression tests: interleaving order (streaming + finalized), step duration rendering, Ctrl+E expand/collapse, full-turn session replay with framed tool results, delimiter-frame stripping

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.
@jkyberneees
jkyberneees merged commit 00daf2a into main Jul 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant