Skip to content

feat(desktop): render Mermaid diagrams in Markdown - #3703

Open
ViiaViia wants to merge 1 commit into
block:mainfrom
ViiaViia:codex/mermaid-markdown-3694
Open

feat(desktop): render Mermaid diagrams in Markdown#3703
ViiaViia wants to merge 1 commit into
block:mainfrom
ViiaViia:codex/mermaid-markdown-3694

Conversation

@ViiaViia

Copy link
Copy Markdown

Summary

  • Render fenced mermaid blocks across the shared desktop Markdown surface.
  • Lazy-load Mermaid and isolate generated SVG as a Blob-backed image.
  • Preserve the original source block as the fallback for invalid, empty, or oversized diagrams.

Related issue

Fixes #3694

Testing

  • just ci
  • pnpm --filter buzz build:e2e
  • pnpm --filter buzz exec playwright test tests/e2e/messaging.spec.ts --project=smoke -g "Mermaid fences"

Before and after screenshots will be attached in a follow-up comment.

Signed-off-by: Viia <307269623+ViiaViia@users.noreply.github.com>
@ViiaViia

Copy link
Copy Markdown
Author

Screenshots

Before

Mermaid source is shown as a regular fenced code block.

mermaid-before

After

The same fenced block renders as a theme-aware diagram.

mermaid-after

@ViiaViia
ViiaViia marked this pull request as ready for review July 30, 2026 17:38
@ViiaViia
ViiaViia requested a review from a team as a code owner July 30, 2026 17:38
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.

Support safe Mermaid rendering in Markdown views

1 participant