buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(desktop): render Mermaid diagrams in Markdown

Open ViiaViia opened this issue 4 months ago • 1 comments

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.

ViiaViia avatar Jul 30 '26 07:07 ViiaViia

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 avatar Jul 30 '26 07:07 ViiaViia