Today — Recording::to_asciicast writes a v2 header with four keys. Measured on 0.10.1 in crates/termlens/src/terminal.rs, the format string carries only version, width, height and env. The asciicast v2 spec also defines optional timestamp (unix seconds), duration and title; none is emitted, so asciinema and the web player show a recording with no date and no name.
Why it is worth fixing — these files get attached to bug reports and CI artifacts, where "which run was this?" is the first question asked. It is three optional keys in a header the code already builds.
Fix — add timestamp (from SystemTime::now() at export, seconds since the epoch) and title in crates/termlens/src/terminal.rs. The honest source for the title is the command the terminal spawned, which Terminal already keeps as command_desc — thread it onto Recording when stop() builds it. duration pairs naturally with #307; leaving it out is fine.
Done when
A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.
Today —
Recording::to_asciicastwrites a v2 header with four keys. Measured on 0.10.1 incrates/termlens/src/terminal.rs, the format string carries onlyversion,width,heightandenv. The asciicast v2 spec also defines optionaltimestamp(unix seconds),durationandtitle; none is emitted, soasciinemaand the web player show a recording with no date and no name.Why it is worth fixing — these files get attached to bug reports and CI artifacts, where "which run was this?" is the first question asked. It is three optional keys in a header the code already builds.
Fix — add
timestamp(fromSystemTime::now()at export, seconds since the epoch) andtitleincrates/termlens/src/terminal.rs. The honest source for the title is the command the terminal spawned, whichTerminalalready keeps ascommand_desc— thread it ontoRecordingwhenstop()builds it.durationpairs naturally with #307; leaving it out is fine.Done when
timestampandtitleand stays valid JSON on one line.crates/termlens/tests/record.rsparses the header and asserts both keys.asciinema play.A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need
git commit -s(DCO). Happy to review a draft PR early.