Add conversation preview dialog before deletion - #3
Merged
Merged
Conversation
Each session row gets a preview button that opens the conversation's user and assistant messages, read from its rollout segments (oldest first), so a conversation can be recognised before it is deleted. Codex scaffolding is stripped the same way as the list preview, tool calls are counted rather than shown, and long conversations are capped. The main process only opens paths from the latest scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3VnHzsih7Qq4QPYwvLtBk
Codex embeds each pasted image in the rollout as an input_image data URL framed by <image …> / </image> text whose path points at a temporary clipboard file. The preview now drops that frame text and renders the embedded image, with click-to-zoom. Image data is capped per preview so a screenshot-heavy conversation is never loaded whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3VnHzsih7Qq4QPYwvLtBk
Images Codex generated for a thread live in generated_images/<thread>/ rather than in the rollout. The preview now lists them below the messages, oldest first, sharing the same image budget as pasted images; symlinks are never followed and files over budget are counted instead of read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3VnHzsih7Qq4QPYwvLtBk
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.
Summary
Adds a read-only preview of conversation messages and generated images before deletion, allowing users to verify they're deleting the correct session. The preview reads from rollout segment files (supporting both plain and zstd-compressed formats), extracts user and assistant messages while filtering out scaffolding and tool calls, and displays embedded images and generated images with size budgets to prevent memory issues.
Key features:
Verification
pnpm checkpassestests/session-transcript.test.tsincluding message parsing, fallback to UI events, image handling, generated image discovery, and conversation truncationCleanup safety
Privacy
https://claude.ai/code/session_01T3VnHzsih7Qq4QPYwvLtBk