Skip to content

Add Mermaid diagram rendering to Specs - #76

Merged
SylonZero merged 1 commit into
masterfrom
feat/mermaid-spec-diagrams
Sep 13, 2026
Merged

SylonZero merged 1 commit into
masterfrom
feat/mermaid-spec-diagrams

Conversation

@SylonZero

Copy link
Copy Markdown
Owner

Summary

  • Specs (and wiki pages) can now embed diagrams as fenced ```mermaid code blocks, rendered as sanitized SVG with a "View source" toggle so the raw diagram text stays visible and editable.
  • New MermaidDiagram client component + a shared pre-override (markdownPreWithMermaid) wired into both markdown-rendering surfaces (MarkdownContent, WikiMarkdown).
  • Added a "Mermaid diagram" toolbar button to the spec rich-text editor; it round-trips through the existing markdown-canonical serializer, so no schema/data-model change was needed.

Test plan

  • pnpm run test — 299/299 passing (includes new mermaid-specific assertions in markdown-content.test.tsx and new wiki-markdown.test.tsx)
  • tsc --noEmit clean on touched files
  • Manual check in a running app: create a spec with a ```mermaid fence, confirm it renders and the source toggle works

🤖 Generated with Claude Code

https://claude.ai/code/session_01R9PZooiLFe7kPQjWS7xk4V

Fenced ```mermaid blocks now render as sanitized SVG via a shared
MarkdownDiagram widget, with a view-source toggle so the raw diagram
stays visible/editable. Wired into both markdown-rendering surfaces
(MarkdownContent, WikiMarkdown) and given a matching toolbar button in
the spec rich-text editor. No schema change — specs.body stays plain
markdown.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R9PZooiLFe7kPQjWS7xk4V
@SylonZero
SylonZero merged commit 4ee2fa9 into master Sep 13, 2026
1 check passed
@SylonZero
SylonZero deleted the feat/mermaid-spec-diagrams branch September 13, 2026 02:36
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