Skip to content

Mermaid diagrams render with invisible/missing text labels on Linux #9402

@Dnreikronos

Description

@Dnreikronos

Pre-submit Checks

Describe the bug

Mermaid diagrams render structurally (boxes, arrows, lines, connectors all visible) but all text is completely invisible. Node labels, edge labels, sequence diagram participant names — every text element is blank. The diagrams are correct in layout but entirely unreadable.

Affected diagram types:

  • Flowcharts / graph diagrams
  • Sequence diagrams

Root cause (confirmed): The SVG renderer fails to resolve generic CSS font families (sans-serif, monospace, etc.) used by mermaid when the expected system fonts are not installed. Since mermaid defaults to these generic families for all text elements, every label disappears silently.

I fixed this exact same bug in Zed Editor — see zed-industries/zed#51623. The fix involved bundling fallback fonts and properly resolving generic font family names in the SVG renderer. The same approach would apply here.

To reproduce

  1. Open Warp on Linux
  2. Use AI chat (or any surface that renders mermaid) to generate a mermaid diagram
  3. Observe that diagram shapes and arrows appear correctly, but all text is invisible

Expected behavior

Text labels should render inside nodes, on arrows, and as participant names — matching how mermaid diagrams display on macOS.

Screenshots, videos, and logs

Image

Operating system (OS)

Linux

Operating system and version

CachyOS (Arch-based), kernel 7.0.1-1-cachyos

Shell Version

zsh 5.9

Current Warp version

Latest stabley

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

N/A

Additional context

Using Wayland/X11 ().

Prior art — fix for same bug in Zed Editor:

The root cause is the same: mermaid emits SVG text elements with generic font families (sans-serif), and the renderer has no fallback when those fonts aren't available on the system. Bundling a default sans-serif font (e.g., Inter, Noto Sans) and mapping generic family names to it resolves the issue.

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Metadata

Metadata

Assignees

Labels

area:editor-notebooksEditors, notebooks, markdown rendering, LSP, and code display.area:ui-frameworkCore Warp UI framework, rendering, layout, and windowing infrastructure.bugSomething isn't working.os:linuxLinux-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.repro:mediumThe report suggests a plausible repro path, but some uncertainty remains.triagedIssue has received an initial automated triage pass.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions