Skip to content

bug: Mermaid diagram rendering broken — layout distortion and ignores code block instructions #1186

@zyaiire

Description

@zyaiire

Bug Description

Mermaid diagrams in Droid CLI are rendering incorrectly. The issue affects all diagram types (flowchart, sequence diagram, class diagram, state diagram, gantt chart, pie chart, etc.).

There are two specific problems:

  1. Layout distortion: Mermaid diagrams are rendered with broken/misaligned layouts — nodes overlap, edges point to wrong directions, spacing is off.
  2. Ignores code output instructions: Even when the prompt explicitly asks Droid to output raw Mermaid code (e.g., in a ```mermaid code block), Droid still renders the diagram inline instead of returning the source code.

Environment

  • Droid CLI version: 0.139.0
  • OS: macOS (darwin 25.5.0)

Steps to Reproduce

  1. Ask Droid to generate any Mermaid diagram (e.g., "draw a flowchart for X")
  2. Observe the rendered output — layout is distorted
  3. Ask Droid to output the Mermaid code only, not the rendered diagram
  4. Droid still renders the diagram instead of returning the raw code

Expected Behavior

  • Mermaid diagrams should render with correct layout and spacing
  • When the prompt explicitly requests code output, Droid should respect that and return the raw Mermaid source code in a code block

Screenshots

Additional Context

This issue affects all Mermaid diagram types universally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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