Repository navigation
fix: export an empty event log at seq -1 for asciicast and WebM - #270
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
The operator asked to work every deferred follow-up issue of agent-tty until none is left. This PR fixes #251. #235 made
snapshotandscreenshotreportcapturedAtSeq: -1on a session that has printed nothing.record exporton the same session did not match. WebM failed with exit 7EXPORT_ERROR, and asciicast reported seq 0, the seq of an event that does not exist.What changed
record export, as it is forsnapshotandscreenshotsince fix: capture an empty screen on a session that has printed nothing #235.capturedAtSeq: -1[asciicast.ts:generateAsciicast] [record-export.ts:resolveCapturedAtSeq].capturedAtSeq: -1anddurationMs: 0. The ghostty-webreplayWithTimingacceptstargetSeq-1, asreplayToalready does.RecordExportResultSchema.capturedAtSequsesReplaySeqSchema(an integer of at least -1), andrecordingFilenameaccepts -1.docs/USAGE.mdand the export, protocol, storage and ghostty-web READMEs. The ghostty-web README line aboutlastAppliedSeq >= 0was stale since fix: capture an empty screen on a session that has printed nothing #235 and is fixed.Behavior for CLI and JSON users
record export --format asciicaston an empty log:capturedAtSeqis -1 (was 0). The default file isrecording--1-asciicast.cast(wasrecording-0-asciicast.cast). The file content is unchanged.record export --format webmon an empty log: exit 0 with a blank WebM,capturedAtSeq: -1,durationMs: 0, andmetadata.outputEventCount: 0. It failed with exit 7EXPORT_ERRORbefore. The default file isrecording--1-webm.webm.capturedAtSeq: -1in record export results. No error code changes. A session with at least one event behaves as before.Verification
test/integration/empty-session-capture.test.ts"exports a header-only asciicast and a blank WebM at seq -1" fails on main 71d1b0c (asciicast seq 0, WebM exit 7) and passes on this branch.recordingFilename(-2)throws), golden envelopes (invalid seq is -2).run,cli,wait-render,lifecycle,resize-demo). Rerun alone, those 5 files passed 165 of 165.--out(SHA matches), and an asciicast of a session that printed (seq 0, unchanged).ffprobereads the blank WebM as VP9 with 28 frames.Closes #251
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh