Repository navigation
fix(charts): copy a chart with marks as an image, marks and notes included - #348
Conversation
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for GitHub merge request efd57d9c-925f-4b62-a799-3167d60eafe4. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. Session Pushed f931e66 fixing Doctor and the gallery error race, also reproduced on exact base f08e061. Doctor, focused lint/typecheck, formatting, 109 package tests, two Playwright tests, and both raw-deflate reproductions passed. Pullfrog’s stale-capture finding was already fixed and verified. Awaiting hosted CI. |
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Important
Marked-chart copies can return a stale PNG after the chart's theme or rendered content changes.
Reviewed changes in the initial review of the marked-chart image-copy path.
- Annotate compositor — Adds inline-SVG rasterization with computed paint and exposes
window.__comarkAnnotate.capture(). - Chart copy behavior — Makes image the default for every chart and delegates marked-chart PNG creation to annotate so marks and notes are included.
- Copy menu and tests — Makes Table and Markdown consistently available and updates the HTML-rendering assertions.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review, focused on the stale marked-chart capture fix and its regression coverage.
- Fresh marked-chart capture: Routed public annotate captures through
compose()so chart button copies use current SVG paint, SVG content, marks, and notes instead of the hover cache. - Cache regression coverage: Added a Chromium test that primes the old cache key, mutates theme paint and each content layer, and verifies every copied PNG reflects the change.
- Prior finding resolved: Verified and retired the stale-pixel review thread after the focused browser test passed.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review, focused on the CI cleanup commit and its adjacent error-reporting behavior.
- Annotate type narrowing: Replaced the separate SVG sentinel with an
instanceof SVGSVGElementdiscrimination so rasterization remains behaviorally identical while satisfying TypeScript. - Gallery action errors: Preserved explicit Play and Copy-link failures when later debounced sharing work also fails, while retaining background error reporting when no action error is visible.
gpt-5.6-sol | 𝕏
comark-annotate
comark-badge
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
…tion when a link update fails (#489) * fix(docs): keep the gallery's sharing error from the reader's last action when a link update fails #348 (0ad268e) made reportSharing skip a debounced link update's failure while an error is already showing. #351 (b99eb9e) merged an older copy of docs/gallery.ts over it and the guard went away, so a failed background link update replaced the error from opening the playground, copying the gallery link or loading a link's edits with "Could not create a sharing link." * fix(docs): scope gallery sharing errors to pending updates --------- Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>

On a chart with marks, Copy copied the data as tab-separated text, and the menu only offered Markdown. The image path drew the chart's SVG alone, so it would have left the marks out, and #231 switched those charts to the data instead.
comark-annotate already paints a screenshot with its marks, arrows and notes onto a canvas for its own Copy button, and a marked chart is a comark-annotate figure with the chart's SVG where the
<img>goes. Its compositor now accepts an inline SVG as the base: it rasterizes the SVG with the page's computed paint, the same way charts did. It's exposed aswindow.__comarkAnnotate.capture(figure). Charts calls it for marked charts, so Copy takes the image on every chart and the menu always offers Table and Markdown. Right-click Copy Image on a marked chart now works too.I checked it in Chromium on a horizontal bar chart with a side note: Copy wrote a PNG with the arrow and the handwritten note, and the menu listed Table and Markdown. I didn't try Safari or Firefox.