-
fix(tui): drop post-Done Markdown body re-render (v0.8.2)
released this
2026-05-24 21:53:20 -07:00 | 247 commits to main since this releaseOperator: "first turn double prints agent's turn."
Root cause: v0.8.1 wrote both the streamed Text lines AND the post-
DoneMarkdown(event.response)body into the transcript. Same
content rendered twice — once as plain streaming, once as a full
markdown re-render. The v0.8.1 commit message documented this as
"some duplication is acceptable" but the live UX read as a bug.Fix
Drop the post-Done
Rule + Markdown(response)writes in non-raw
mode. The streamed text IS the response; whatever the model emitted
flows into the transcript line-by-line via coalesce-on-newline.
Markdown formatting (bold, lists, code blocks) renders as plain
text — a known regression from v0.8.1's polished output but the
right tradeoff vs the duplication bug.What this loses temporarily
Pre-v0.8.2 (after Done):
[done] turn_id=... ───
─── (Rule separator) ───
Bold text rendered bold,codehighlighted, lists as bullets, etc.v0.8.2 (after Done):
[done] turn_id=... ───
Bold text as plain asterisks,codeas backticks, lists as plain dashesv0.9.0 plan
Restore markdown rendering via LIVE rendering during the stream
(not post-Done re-render). ReplaceRichLog#transcriptwith a
VerticalScrollcontainer that mounts a freshMarkdownwidget
per turn; Text deltas update the widget; markdown renders as
content arrives. No duplication, no snap, full formatting.
Operator-confirmed direction (2026-05-25 AskUserQuestion).Tests
287/287 GREEN; ruff clean. Two tests updated for the new shape:
- test_done_renders_markdown_after_label → renamed
test_done_flushes_tail_and_writes_label; asserts NO Markdown, NO
Rule (post-Done) in the writes. - test_happy_text_done_renders_markdown → renamed
test_happy_text_done_no_double_print; asserts NO Markdown in the
spy.
Patch bump (v0.8.1 → v0.8.2): bug fix; no public API change.
Downloads
- test_done_renders_markdown_after_label → renamed