Flowgraph Studio vs VS Code: When a Mermaid preview needs visual editing

VS Code previews Mermaid beside your code. Flowgraph Studio lets you arrange the same diagram by hand when the layout needs work. A feature-flag rollout shows how to use the two together.

Comparisons · · Updated · 4 min read

Flowgraph Studio is our product. We've tried to describe the other tools fairly, from their own documentation as of November 2026.

The diagram is open beside the code, exactly where you want it. You rename a service, save the Markdown, and the preview updates. Then a reviewer asks for the rollback branch to sit below the monitoring step, so the page is easier to read.

That's the line between editing the source and composing the picture. VS Code is a natural place to maintain Mermaid with the application's documentation. Flowgraph Studio helps when a change is easier to make on the diagram itself.

You don't have to pick one editor for every stage.

A feature-flag rollout goes on to monitoring, then either continues or disables the flag depending on what is observed
An example rollout flow. The stopping condition should be as easy to see as the way forward.

VS Code already previews Mermaid

The VS Code Markdown documentation says the built-in Markdown preview "renders Mermaid diagrams in mermaid fenced code blocks". You can pan and zoom larger diagrams in place, with controls that appear when you hover over one.

For a developer updating a runbook, that's convenient. The source, the explanation around it and the related code stay in one workspace. Renaming a node or changing a relationship needs no other application.

It works best when the automatic layout already reads well. A visual editor adds little if the task is to rename a node and check the result.

A rollout diagram shows the next problem

A feature flag is turned on for a small group. The team watches an agreed signal, then either widens the rollout or turns the flag off.

flowchart TD
  enable[Enable for 5% of users] --> watch[Watch error rate for 30 minutes]
  watch --> ok{Error rate under 1%?}
  ok -->|yes| widen[Widen to 25%, then 100%]
  ok -->|no| off[Disable the flag]
  off --> notify[Tell the owning team]

The stopping condition must be obvious. A rollback branch hidden among crossing arrows isn't just untidy: it makes an operational instruction harder to scan.

Simplify first. Remove unrelated deployment steps, shorten labels, and try another direction. If the diagram is still awkward at the runbook's width, a deliberate arrangement may help.

Flowgraph makes the arrangement explicit

Paste the block into Flowgraph Studio and switch to Manual mode. Drag nodes, move a connection's ends to another side, and move labels, with the code open beside the canvas.

For the rollout, put enabling, watching and widening on the main reading path. Place "Disable the flag" right next to the decision that triggers it. Move the condition label away from any crossing so it can't be misread.

Mermaid has no syntax for positions, so Flowgraph saves them in one comment line at the end of the code. Copy the code back into the repository and check the diff: relationship changes appear in the Mermaid lines, layout changes only in that comment. Stable node ids make the diff easy to read.

If your coding assistant runs in VS Code, it can also work on Flowgraph diagrams through Flowgraph's MCP server: validate Mermaid, render a preview and search icons on any plan, and read or update saved diagrams on Pro and Pro Max.

Expect the previews to differ

VS Code's preview uses its own Mermaid rendering. It doesn't reproduce Flowgraph's saved positions just because the comment is in the source; it lays the diagram out automatically, as other Mermaid tools do.

That's often fine. The preview helps contributors understand the graph, while the exported image keeps the layout used in the published runbook. If the exact layout must appear everywhere, publish the rendered image there and keep the Mermaid for editing.

The same goes for Flowgraph's rich nodes with icons: VS Code doesn't know that syntax. Test the real destination rather than assuming a diagram that opens in one place looks the same in another.

Update, December 2026: the Flowgraph Studio extension for VS Code closes this gap inside the editor. It previews .mmd files and Markdown blocks with Flowgraph's own renderer, so saved positions, rich nodes, icons and your repository's theme appear beside the code, and VS Code's Markdown preview draws the blocks the same way. Its Open on flowgraph.studio command sends a diagram to the web editor when the layout needs hands-on work. Other places that render Mermaid themselves, such as GitHub, still lay it out automatically.

Review the stop condition on the final page

Ask a reader what pauses the rollout and what happens next. If the answer depends on colour, add a text label. If the condition is too detailed for the picture, link to the threshold's definition in the runbook.

Use VS Code for source changes, repository context and quick previews. Use Flowgraph Studio when the layout itself needs hands-on work. Together, they should make the diagram easier to maintain while keeping the clear rollback path an operator needs.

The same idea, starting from the Mermaid project's own editor, is in Flowgraph Studio vs Mermaid Live Editor.

More from the blog

Follow the blog by RSS