Skip to content

fix(ui)!: leave diagram fences as code unless the app turns drawing on - #447

Merged
vite-hub[bot] merged 1 commit into
mainfrom
fix/diagrams-default-offline
Nov 17, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
fix/diagrams-default-offline

Conversation

@onmax

@onmax onmax commented Nov 17, 2026

Copy link
Copy Markdown
Owner

With the comark-ui preset as it is, every plantuml, graphviz/dot, d2, dbml and goat/svgbob fence is POSTed to https://kroki.io while the document parses. An app that renders private docs or user content sends that source to a public server without choosing to.

This PR makes the preset pass { draw: false } to comark-diagrams when diagrams is left out, so the fences stay code and nothing leaves the process. The check that refuses an authored ::diagram SVG still runs. diagrams: true draws through https://kroki.io as before, diagrams: { server } through your own Kroki, and diagrams: false drops the plugin. comark-diagrams on its own keeps https://kroki.io as its default, and Mermaid isn't affected.

Apps that relied on the old default need diagrams: true or diagrams: { server }. The docs site passes diagrams: true in docs/plugins.ts, so its pages and the playground still draw. Getting started, the diagrams page and README, and the skill references describe the new default.

The new test in packages/ui/test/ui.test.ts renders all seven fence languages with the preset defaults and expects code and no requests, then checks the authored-SVG issue, true, { server }, and { server, draw: false }. It fails on main with every fence drawn and passes here. pnpm check, Vite Doctor and the rest of the tests pass, except the remark-to-comark CLI test that times out locally on main too.

Fixes #446

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T08:41:42.547408Z
We couldn’t complete this review. Comment @codex review to try again.
ae250f2 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.

@vite-hub

vite-hub Bot commented Nov 17, 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 review checks before the next pass.

Session

Waiting for review checks before the next pass.

@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. No P0 or P1 findings remain.

Reviewed changes Reviewed the diagram default change, explicit configuration paths, and documentation/playground integration.

  • Offline by default. The shared preset leaves Kroki fences as code without requests while retaining the authored-SVG safety check across renderer entries.
  • Explicit drawing preserved. true and options objects enable drawing, a custom server is respected, draw: false suppresses requests, and diagrams: false removes the plugin and components.
  • Docs and regression coverage. The site explicitly opts in to preserve its examples, and the docs and skill references explain the new default and privacy implications.

Validation: 113 focused tests passed, with one skipped, plus an 18-case configuration matrix across HTML, Vue, and React. The initial workspace build exceeded the command’s 120-second limit; the interrupted packages and UI subsequently built successfully with direct tsdown runs.

Pullfrog  | View workflow run | Using gpt-6.1-sol(xhigh) | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

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

comark-badge

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

comark-bundle

pnpm add https://pkg.pr.new/comark-bundle@447

comark-cards

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

comark-carousel

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

comark-cast

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

comark-charts

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

comark-chat

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

comark-chips

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

comark-cjk

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

comark-code

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

comark-code-notes

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

comark-colors

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

comark-comments

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

comark-critic

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

comark-deflist

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

comark-details

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

comark-diagrams

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

comark-diff

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

comark-embed

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

comark-fields

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

comark-figure

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

comark-file-tree

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

comark-footnotes

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

comark-git-graph

pnpm add https://pkg.pr.new/comark-git-graph@447

comark-github

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

comark-icon

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

comark-include

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

comark-keys

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

comark-links

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

comark-linter

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

comark-magic-move

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

comark-mark

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

markdown-it-to-comark

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

marked-to-comark

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

comark-mathml

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

comark-media

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

comark-metrics

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

migrate-to-comark

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

comark-outline

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

comark-properties

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

comark-qr

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

comark-quiz

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

comark-reading-time

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

remark-to-comark

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

comark-sources

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

comark-steps

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

comark-table

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

comark-tabs

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

comark-tests

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

comark-time

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

comark-ui

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

comark-xref

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

comark-zoom

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

commit: ae250f2

@vite-hub
vite-hub Bot merged commit 59d20bb into main Nov 17, 2026
7 checks passed
@vite-hub
vite-hub Bot deleted the fix/diagrams-default-offline branch November 17, 2026 08:52
@github-actions github-actions Bot mentioned this pull request Nov 17, 2026
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.

comark-ui sends diagram sources to kroki.io by default

1 participant