Skip to content

Bump Mermaid renderer dependency#12155

Merged
zachlloyd merged 1 commit into
masterfrom
zach/mermaid-bump
Jun 3, 2026
Merged

Bump Mermaid renderer dependency#12155
zachlloyd merged 1 commit into
masterfrom
zach/mermaid-bump

Conversation

@zachlloyd
Copy link
Copy Markdown
Contributor

Description

Bumps mermaid_to_svg to the latest merged warpdotdev/mermaid-to-svg main commit, which includes Mermaid frontmatter/config handling and the rasterizable SVG background change from PR 17.

Also updates Warp's Mermaid asset renderer to let mermaid-to-svg apply diagram-level frontmatter formatting directives instead of forcing the light theme at the call site. This preserves the default light rendering behavior while allowing supported per-diagram config like theme variables and font settings to take effect.

Adds a regression test that renders a Mermaid diagram containing frontmatter formatting directives and verifies the generated SVG includes the configured fill and font family.

Agent conversation: https://staging.warp.dev/conversation/43adc087-dbf8-47b2-a476-6981e71ad10c

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Related:

Testing

  • I have manually tested my changes locally with ./script/run
  • ./script/format
  • cargo clippy --workspace --all-targets --all-features --tests -- -D warnings
  • cargo nextest run --no-fail-fast --workspace mermaid_asset_source_renders_frontmatter_formatting_directives

Screenshots / Videos

Not included; this PR is covered by a focused SVG-rendering regression test rather than screenshot comparison.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-IMPROVEMENT: Mermaid diagrams now tolerate and apply supported frontmatter formatting directives when rendered in Warp.

Co-Authored-By: Oz oz-agent@warp.dev

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jun 3, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 3, 2026

@zachlloyd

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@zachlloyd zachlloyd requested a review from zachbai June 3, 2026 18:57
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR bumps the Mermaid renderer dependency, stops forcing the light theme at the Warp call site so diagram-level frontmatter can be applied, and adds a regression test for configured SVG fill and font output.

Concerns

  • This changes user-visible Mermaid rendering behavior, but the PR description explicitly does not include screenshots or a screen recording. The repository review guidance requires visual evidence for user-facing changes, even when there is focused test coverage.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

let source = fetch_source.clone();
Box::pin(async move {
mermaid_to_svg::render_mermaid_to_svg(&source, Some(&MermaidTheme::light()))
mermaid_to_svg::render_mermaid_to_svg(&source, None)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This user-facing rendering change needs screenshots or a short screen recording demonstrating the new Mermaid frontmatter behavior end to end; the SVG regression test does not replace the repository's visual-evidence requirement.

@zachlloyd zachlloyd merged commit 56e8617 into master Jun 3, 2026
32 checks passed
@zachlloyd zachlloyd deleted the zach/mermaid-bump branch June 3, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants