feat(components): select and export chat messages as PNG - #492
Conversation
Add message selection, configurable share cards, and historical model/runtime metadata with working-content token estimates. Model: gpt-6
Model: gpt-6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5de5d6ec03
ℹ️ 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".
| onShareWithTeam={ | ||
| showSessionSharing ? () => handleRequestShareSession(activeSession) : undefined | ||
| } | ||
| onShareAsImage={activeDraftTab ? undefined : handleShareAsImage} |
There was a problem hiding this comment.
Add the image-share action to the mobile menu
On responsive mobile, SessionDetail returns through the MobileSessionMenuSheet path before this desktop toolbar is rendered, but mobileMenuActions never adds an action that calls handleShareAsImage. Consequently, every non-draft mobile conversation lacks any entry point to the new selection/export workflow even though the same shared package serves mobile surfaces; wire the action into the mobile menu as well.
AGENTS.md reference: packages/components/AGENTS.md:L6-L8
Useful? React with 👍 / 👎.
| const observer = new MutationObserver(() => { | ||
| if (!applying) schedule(); | ||
| }); | ||
| observer.observe(root, { childList: true, subtree: true }); |
There was a problem hiding this comment.
Stop the collapse observer from scheduling itself
When a code block exceeds collapseAfter, applyCollapse removes and then appends [data-share-collapse-ui] children. Those mutations invoke this observer after applying has returned to false, scheduling another animation frame that performs the same mutations again. Thus enabling code collapse on the exact long blocks it targets creates a permanent 60 Hz DOM rebuild loop while the preview is open, causing sustained main-thread load and potentially interfering with export; ignore mutations produced by the collapse pass or only mutate when the derived state changed.
Useful? React with 👍 / 👎.
Related issue
Same-repository feature branch; no linked issue.
Problem / pressure
Users need to choose individual messages in the existing conversation before
exporting a styled PNG. The card must reflect the selected history,
including folded working content in token estimates, rather than the current
composer model or whole-session context usage.
Summary
@zumer/snapdom, with browser PNG downloads and the existing Electron native save dialog. Wait for assets and support retry after errors.Before / after
Test plan
Context handoff
Instructions for reviewing agents
Authoring context
@zumer/snapdom.