Skip to content

fix(charts): copy a chart with marks as an image, marks and notes included - #348

Merged
vite-hub[bot] merged 4 commits into
mainfrom
feat/chart-copy-image-default
Nov 5, 2026
Merged

vite-hub[bot] merged 4 commits into
mainfrom
feat/chart-copy-image-default

Conversation

@onmax

@onmax onmax commented Nov 4, 2026

Copy link
Copy Markdown
Owner

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 as window.__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.

@vite-hub

vite-hub Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-04T09:50:21.734008Z
We couldn’t complete this review. Comment @codex review to try again.
98382b5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/charts/src/client.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 SVGSVGElement discrimination 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.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@348

comark-badge

pnpm add https://pkg.pr.new/comark-badge@348

comark-cards

pnpm add https://pkg.pr.new/comark-cards@348

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@348

comark-cast

pnpm add https://pkg.pr.new/comark-cast@348

comark-charts

pnpm add https://pkg.pr.new/comark-charts@348

comark-chat

pnpm add https://pkg.pr.new/comark-chat@348

comark-chips

pnpm add https://pkg.pr.new/comark-chips@348

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@348

comark-code

pnpm add https://pkg.pr.new/comark-code@348

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@348

comark-colors

pnpm add https://pkg.pr.new/comark-colors@348

comark-comments

pnpm add https://pkg.pr.new/comark-comments@348

comark-critic

pnpm add https://pkg.pr.new/comark-critic@348

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@348

comark-details

pnpm add https://pkg.pr.new/comark-details@348

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@348

comark-diff

pnpm add https://pkg.pr.new/comark-diff@348

comark-embed

pnpm add https://pkg.pr.new/comark-embed@348

comark-fields

pnpm add https://pkg.pr.new/comark-fields@348

comark-figure

pnpm add https://pkg.pr.new/comark-figure@348

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@348

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@348

comark-github

pnpm add https://pkg.pr.new/comark-github@348

comark-icon

pnpm add https://pkg.pr.new/comark-icon@348

comark-include

pnpm add https://pkg.pr.new/comark-include@348

comark-keys

pnpm add https://pkg.pr.new/comark-keys@348

comark-links

pnpm add https://pkg.pr.new/comark-links@348

comark-linter

pnpm add https://pkg.pr.new/comark-linter@348

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@348

comark-mark

pnpm add https://pkg.pr.new/comark-mark@348

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@348

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@348

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@348

comark-media

pnpm add https://pkg.pr.new/comark-media@348

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@348

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@348

comark-outline

pnpm add https://pkg.pr.new/comark-outline@348

comark-properties

pnpm add https://pkg.pr.new/comark-properties@348

comark-qr

pnpm add https://pkg.pr.new/comark-qr@348

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@348

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@348

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@348

comark-sources

pnpm add https://pkg.pr.new/comark-sources@348

comark-steps

pnpm add https://pkg.pr.new/comark-steps@348

comark-table

pnpm add https://pkg.pr.new/comark-table@348

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@348

comark-tests

pnpm add https://pkg.pr.new/comark-tests@348

comark-time

pnpm add https://pkg.pr.new/comark-time@348

comark-ui

pnpm add https://pkg.pr.new/comark-ui@348

comark-xref

pnpm add https://pkg.pr.new/comark-xref@348

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@348

commit: f931e66

@vite-hub
vite-hub Bot merged commit 0ad268e into main Nov 5, 2026
6 checks passed
@vite-hub
vite-hub Bot deleted the feat/chart-copy-image-default branch November 5, 2026 06:21
This was referenced Nov 5, 2026
vite-hub Bot added a commit that referenced this pull request Nov 25, 2026
…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>
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