Add Claude Code transcript archive with HTML visualization#34
Add Claude Code transcript archive with HTML visualization#34augustraca-hue wants to merge 2 commits intonoamseg:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5831a08bcc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| text = text.replace(/"([^"]+)":/g, '<span style="color: #ce93d8">"$1"</span>:'); | ||
| text = text.replace(/: "([^"]*)"/g, ': <span style="color: #81d4fa">"$1"</span>'); | ||
| text = text.replace(/: (\d+)/g, ': <span style="color: #ffcc80">$1</span>'); | ||
| text = text.replace(/: (true|false|null)/g, ': <span style="color: #f48fb1">$1</span>'); | ||
| el.innerHTML = text; |
There was a problem hiding this comment.
Escape JSON text before assigning to
innerHTML
The JSON highlighter rewrites pre.json content and then assigns it with el.innerHTML = text without escaping </> from the original transcript. If any archived JSON block contains HTML-like payloads (for example a string value like <img onerror=...>), opening the archive will execute injected markup/script in the page context. This is a cross-site scripting vector for any hosted/shared archive generated from untrusted transcript data.
Useful? React with 👍 / 👎.
Summary
This PR adds a comprehensive HTML-based archive system for Claude Code transcripts, enabling browsing and searching of conversation histories with rich formatting and interactive features.
Key Changes
Archive Structure: Created a hierarchical archive organization with:
claude-archive/index.html) listing all archived projectsHTML Transcript Visualization: Implemented detailed transcript rendering with:
Interactive Features:
Styling System:
Content Organization:
Implementation Details
The archive uses semantic HTML5 with embedded CSS for self-contained, portable transcript files. Each conversation is split into paginated HTML files for performance, with an index page providing navigation and search capabilities. The styling uses CSS custom properties for easy theme customization and maintains accessibility with proper semantic markup.
https://claude.ai/code/session_01QUKRmFM1ZbpaeTKvtgn9dv