Chat transcript fidelity: show what the terminal shows - #317
Merged
Conversation
The chat view flattened every tool call to its one salient argument, so
reviewing an agent's actual work (what an Edit changed, what a Write wrote,
the plan behind an ExitPlanMode) still required opening the raw terminal.
Close the gaps found by replaying all 559 stored transcripts through the
block pipeline:
- Edit tool_use blocks carry the change itself (edit {old, new, replaceAll}),
rendered as a -/+ diff on the action card (2,381 calls in the corpus were
showing only a file path).
- Write blocks carry the file body (content); ExitPlanMode carries its plan,
rendered as prose and open by default (it is the thing being approved).
- Any tool's human description arg rides as desc beside the raw argument
(6,759 calls); AskUserQuestion cards are titled with the question text
instead of an input-JSON dump.
- system/compact_boundary entries become a centred status marker with the
trigger and pre/post token counts - a compaction was invisible in chat.
- pr-link entries become an inline linked "Opened PR #N" marker where the
PR landed; they carry no uuid, so the feeds synthesize a stable id
(_entry_id/entryId) to survive the client's id-keyed merge, and
consecutive duplicates fold.
hub-agent.py and tunnel-agent.js stay line-for-line mirrors (verified over
the full corpus: 0 divergences beyond the 13 pre-existing emoji clip-length
ones present on main). Android decodes the new shapes to UnknownBlock /
ignored keys (safe degrade) - gap recorded in android/PARITY.md.
Verified: full agent (793) + tunnel (64) + turma (615) suites green, plus a
real-browser render of pipeline-generated entries via the verify recipe
(diff colors, plan open-by-default, markers, 390px wrap all checked).
This was referenced Jul 27, 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.
Goal
The chat page should be complete enough that reviewing/verifying a session never requires flipping to terminal mode. This PR closes the information gaps found by replaying all 559 stored Claude transcripts on this host through the block pipeline and comparing what the chat renders against what the raw transcript (and the TUI) contains.
What was being lost
file_pathedit {old,new,replaceAll}→ rendered as a −/+ difffile_pathcontent(the file body) on the cardplanrendered as prose, open by default (it's the thing being approved)descriptionargsdescshown beside the raw argument (Bash/Agent/Monitor/…)skill/subjectjoin the salient-arg keyscompact_boundarypr-linkentriespr-linkentries carry no uuid, so both feeds synthesize a stable id (_entry_id/entryId) — the client's id-keyed merge drops id-less entries.Eval (iterated before finalizing)
_entry_blocksover all 59,225 corpus entries — identical output apart from the intended additions (0 unexplained diffs).hub-agent.pyvstunnel-agent.jsover the 37,553 block-producing entries — 0 new divergences; the 13 that exist are pre-existing on main (JS UTF-16 vs Python codepoint clip length on emoji-bearing entries, truncation-point-only, harmless).TurmaChat.renderStaticin Chromium over CDP; probed the DOM (diff old/new backgrounds, plan open+prose, desc, question title, marker texts, PR href, dedupe 2→1) and screenshotted light/dark/1180px/390px. One bug found and fixed that unit tests couldn't catch:.tool-planneededwhite-space: pre-wrap.Tests
TestEntryBlocks+9 cases (agent, 793 green) · tunnel mirror cases (64 green) ·chat.test.js+5 render cases (turma, 615 green).UnknownBlock/ ignored keys); the render gap is recorded inandroid/PARITY.mdper XERK-30.Known follow-ups (out of scope)