Artifacts containing <pre class="mermaid"> content cannot be shared publicly ("This version can't be shared publicly")
Description
Any artifact containing native mermaid diagram content (<pre class="mermaid">...</pre>) fails to share publicly, even on freshly published artifacts. The share dialog shows: "This version can't be shared publicly. Publish a new version or change the shared version, then try again." Republishing does not resolve it.
Reproduction
- Publish an artifact containing only plain HTML (no mermaid) → sharing works normally.
- Publish a second artifact containing a single minimal mermaid diagram:
``html``
<pre class="mermaid">
flowchart LR
A["Start"] --> B["End"]
</pre>
→ share dialog shows the error above, on the first attempt, on a brand-new artifact ID.
- Republishing the same content (multiple times), forcing
contract: latest, and clearing a stalecapabilitiesdeclaration all had no effect — the error persists specifically when mermaid content is present.
Isolation
Tested 5 artifacts total — 2 plain-HTML (shared fine), 3 containing mermaid (all failed identically, including a single-diagram minimal repro). Mermaid content is the reliable differentiator.
Suspected cause
Mermaid content appears to require an async server-side pre-render pass (visible in fetched artifact HTML as an injected <!--claude-mermaid-runtime-begin:NNNNNN--> block) before a version is share-eligible — that pass may not be completing.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗