feat(inspect): add checkpoint-safe transcript viewer#4
Merged
Conversation
Embed fmtview 0.6.1 behind a RecordTimeline adapter so TTY inspection opens at the committed tail, pages older checkpoints lazily, and follows growing runs without exposing torn checkpoints. Keep redirected output exact and pipeline-safe as committed NDJSON, preserve the summary view, and document the storage/viewer boundary and verification contract.
Preflight the next checkpoint before a non-empty forward batch crosses its record or byte budget. This keeps large committed groups atomic without decoding or formatting them until a caller has room, while still validating malformed checkpoint starts. Treat refresh reads as a coherent transaction over one file observation. Retry confirmed truncate/replace races, discard partial suffix decoder state, and publish offsets and prefix samples only after the observed file remains stable. Cover oversized forward groups, malformed preflight data, buffered-reader position restoration, and deterministic concurrent tail replacement. Document the checkpoint-budget and refresh snapshot semantics.
Upgrade the published crates.io fmtview dependency to 0.6.2. Upstream PR #15 fixed sticky-layout convergence where the one-draw preserved position overrode the exact active-follow tail after a JSON breadcrumb changed the first frame height, immediately producing follow:detached. Keep fiasco behind the public fmtview facade; fmtview-core remains registry-transitive only, with no path or Git dependency.
fix(inspect): bound batches across writer races
siriusctrl
marked this pull request as ready for review
July 22, 2026 13:41
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
TranscriptTimelineadapter between Fiasco storage and fmtview's public embedding APIfiasco inspect <run-id>open a tail-first TTY transcript viewer, with--followfor live committed checkpoints--output ndjson, and preserve the existing metadata/final view behind--summaryArchitecture boundary
Fiasco owns run lookup, checkpoint validation, growth/reset detection, and raw committed record bytes. It implements fmtview's
RecordTimelineinterface but contains no ratatui/crossterm viewport or rendering code.fmtview owns terminal lifecycle, lazy viewport/indexing, search, wrap, raw/structured display, and tool call/result navigation. It receives no Fiasco run or storage types.
This PR uses the released crates.io dependency
fmtview = "0.6.1"; there is no path or git dependency.Correctness and performance
Validation
cargo fmt --checkcargo check --all-targetscargo clippy --all-targets -- -D warningscargo test --all-targets: 294 passed, 0 failed, 1 ignoredgit diff --checkLocal PTY/video evidence (kept under ignored
target/, not committed) exercised a real 120x34 terminal session and the conversation emulator. It verified alternate-screen and mouse lifecycle, tail-first opening, search, wrap, tool call/result round trips, exact raw tool arguments, structured return, and clean quit without terminal residue. The conversation capture contains 268 frames, 23 keyframes, and 21 scripted actions.