You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOCX Mermaid diagrams fall back to code in macOS releases #59
DOCX exports produced by an installed macOS release render Mermaid fenced blocks as source-code fallbacks instead of embedded diagram images.
This was found after the DOCX export implementation landed in #58.
Root cause
Release builds embed webui/dist, but Mermaid rendering currently searches for a standalone bundle only in development or sidecar locations such as webui/node_modules/mermaid/dist/mermaid.min.js and mermaid.min.js next to the executable. A normal macOS release contains neither, so findMermaidJS() fails and the DOCX exporter deliberately falls back to a code block.
Browser discovery can also fail when Chrome-family browsers are installed under ~/Applications, because only system /Applications paths and $PATH are checked.
Expected behavior
Copy a standalone mermaid.min.js into webui/dist during the WebUI build.
Include it in the existing embedded WebUI filesystem used by release binaries.
Load the embedded Mermaid bundle for PDF and DOCX rendering rather than requiring node_modules or a sidecar file.
Preserve development-path fallbacks where useful.
Discover supported macOS browsers in both /Applications and ~/Applications.
The exporter logs docx: Mermaid render failed; using code fallback, commonly with mermaid.min.js not found, and writes the Mermaid definition as a highlighted code block.
Activity