patterns: vendor the session-explainer trace panel - #14
Merged
Conversation
Mirrors utsengar/htmlbin#47. The pattern gains a third tab carrying the turn-by-turn trace, and the skeleton gains its structure and styles, so an offline `patterns init` installs the same thing the catalog serves. Content only on this side: both files are byte-identical to the worker repo, and src/patterns/bundled-data.ts is generated and gitignored. Two things in the pattern worth knowing when reviewing: - "Verbatim" is no longer the promise. Typos get fixed silently, changes of mind are kept because that is the thinking trail, and sensitive spans are cut with a visible marker rather than reworded. - The redaction floor now covers the agent's replies, not just the human's prompts. That is where the leaks actually are — building the panel surfaced an employer name, a job title, a customer's name and an internal URL, all from replies. Verified: 171 tests pass, and an offline init installs a skeleton containing the trace panel, byte-identical to the worker's copy (4ca33ebe…). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Mirrors utsengar/htmlbin#47, which adds a third tab to
session-explainercarrying the turn-by-turn trace.Content only on this side. Both files are byte-identical to the worker repo (
session-explainer.template.html→4ca33ebe…), andsrc/patterns/bundled-data.tsis generated + gitignored, so it isn't in the diff.What the pattern now says
A trace panel is required. Highlights is an editorial gloss and the dead-end cards are narrative; neither shows what happened in sequence. Every prompt ships complete, the agent's reply is collapsed with a word count, and tool results are excluded — the human's side of a 12.2 MB session was ~1,600 words, about 0.08% of the bytes.
"Verbatim" is dropped as the promise. Typos fixed silently, changes of mind kept (that's the thinking trail), sensitive spans cut and marked rather than reworded — an unmarked edit makes every other line unverifiable.
The redaction floor now covers the agent's replies. That's where the leaks are. Building this panel surfaced an employer name, a job title, a customer's real name and an internal URL, every one from a reply rather than a prompt.
Verification
npm test— 171 passed, 6 skippedpatterns initinstalls a skeleton containing#p3and the trace styles, byte-identical to the worker's copynpm run buildclean🤖 Generated with Claude Code