#16607

Error rendering Mermaid diagram.

OpenNew2Niuopened 9d ago

Pre-submit Checks

Describe the bug

    autonumber
    participant H5 as H5 游戏页
    participant G as 小游戏服务
    participant RD as Redis
    participant DB as MySQL
    participant MQ as RocketMQ
    participant EX as 兑换中心

    loop 每 30 秒,页面可见时
        H5->>G: 上报 seq 与 deltaSec
        G->>RD: SETNX 幂等键
        alt 重复上报
            G-->>H5: accepted=false
        else 首次上报
            G->>DB: 写上报明细 + 累加日聚合
            G->>DB: 校验单场 4 小时上限
            G->>DB: 推进任务进度
            G-->>H5: 累计时长 + 任务进度
        end
    end
    opt 任务完成
        G->>DB: 落发奖流水,状态待发放
        G->>MQ: 发送 task.completed
        MQ->>G: 消费重试
        G->>EX: 发放金币,幂等键 bizKey
        G->>DB: 回写发放结果
    end```

### To reproduce

markdown Mermaid 

### Expected behavior

_No response_

### Screenshots, videos, and logs

_No response_

### Operating system (OS)

macOS

### Operating system and version

26.2 

### Shell Version

_No response_

### Current Warp version

_No response_

### Regression

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

### Recent working Warp date

_No response_

### Additional context

_No response_

### 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

Activity

1
warp-for-oss[bot]9d ago

@New2Niu

Here's what I found while triaging this issue:

Thanks for the screenshots and source. This looks like Warp's Mermaid renderer failing on a sequence diagram that uses the autonumber directive, rather than a macOS-specific rendering problem.

Maintainer details

I concluded that warp fails to render a Mermaid sequence diagram that uses the autonumber directive in Markdown..

Triage summary

This appears to be a Warp Markdown/Mermaid rendering bug, not a billing/support issue. The reporter attached screenshots showing Warp's Mermaid render failure and the raw sequence diagram source.

Likely root cause: Warp renders Mermaid blocks through the pinned mermaid_to_svg dependency. The current sequence diagram parser in that dependency handles participants, messages, and fragments such as loop, alt, else, opt, and end, but it does not recognize the autonumber directive used at the top of the reporter's sequence diagram. That would cause the render path to return an error and display the existing "Error rendering Mermaid diagram. Please check syntax." callout.

Relevant Warp-side files are crates/editor/src/content/text.rs for Mermaid block classification, crates/editor/src/content/mermaid_diagram.rs for async SVG rendering through mermaid_to_svg, and crates/editor/src/render/element/mermaid.rs for the visible failure state. The pinned dependency is declared in Cargo.toml / Cargo.lock.

Duplicate search: searched all open issues plus recently closed issues from the last 7 days for Mermaid/sequence diagram rendering failures. Related Mermaid issues exist, but none match this autonumber sequence-render failure closely enough to mark this as a duplicate.

This is my automated analysis and may be incorrect. A maintainer will verify the details.

Powered by Oz