Skip to content

patterns: vendor the session-explainer trace panel - #14

Merged
utsengar merged 1 commit into
mainfrom
session-explainer-trace-panel
Aug 24, 2026
Merged

patterns: vendor the session-explainer trace panel#14
utsengar merged 1 commit into
mainfrom
session-explainer-trace-panel

Conversation

@utsengar

Copy link
Copy Markdown
Owner

Mirrors utsengar/htmlbin#47, which adds a third tab to session-explainer carrying the turn-by-turn trace.

Content only on this side. Both files are byte-identical to the worker repo (session-explainer.template.html4ca33ebe…), and src/patterns/bundled-data.ts is 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 test171 passed, 6 skipped
  • Offline patterns init installs a skeleton containing #p3 and the trace styles, byte-identical to the worker's copy
  • npm run build clean

🤖 Generated with Claude Code

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>
@utsengar
utsengar merged commit 348f40e into main Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant