Repository navigation
Chart the kept journey samples with leaf-dev journey-chart - #1955
Merged
Merged
Conversation
Each journey sample has been kept in `$XDG_STATE_HOME/leaf-dev/journey.jsonl` since #1881, but reading them meant transcribing numbers into a page by hand. `leaf-dev journey-chart` prints an `lf-chart` element from those samples: one row per target at the latest code version it ran, and a dot for each sign the user saw — the thread's title, Working, the agent's first words (an ephemeral reply, #1926) and the reply — on a log axis of seconds after the comment. A step a run never reached draws no dot. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 7, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
chart_rows() uses origin as the target key, but target_session() records the temporary listening URL as origin for local and wrangler. Each local server binds a new port, so two runs of either target at different versions appear as separate rows; the older version is never filtered out. This also makes the chart grow a row for every local run. Record a stable journey target in each sample and group by that identity, while retaining the origin for the remote website label.
A local or wrangler journey serves on a fresh port each run, so its `origin` differs between runs and `journey-chart` gave every run a row of its own, never leaving out an older version. Each sample now records `target`, the same across runs (`cc`, `codex`, `local`, `wrangler`, or the website's origin), and the chart groups by it. Samples kept before this name their target by their harness. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 7, 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.
leaf-dev journey-chartprints anlf-chartelement from the journey samples this machine kept ($XDG_STATE_HOME/leaf-dev/journey.jsonl, #1881), so reading them no longer means copying numbers into a page by hand.The chart has one row per target at the latest code version that target ran, and a dot for each sign the user saw: the thread's title, Working, the agent's first words (the ephemeral reply from #1926), and the reply. The x-axis is seconds after the comment, on a log scale. A step a run never reached draws no dot. With no samples kept, the command says to run
leaf-dev journeyfirst.Each sample now also records
target, which stays the same across runs:cc,codex,local,wrangler, or the website's origin. The chart groups by it, because a local or wrangler run'soriginis a fresh port each time. Samples kept before this change name their target by their harness.Its output on this machine's samples passes
leaf page check --render, light and dark.TODO.mdrecords this as an experiment: whetherleaf-devshould draw charts, or only print the rows and leave the chart to the agent writing the page.