Skip to content

mermaid-text: preserve left state-note links and nested sequence activation spans #41

Closed

Description

@jserv

mermaid-text 0.57.0 (and current master d675803a92b931ec2856fcfd7314975a421ef681) loses relationship geometry in these two Mermaid sources.

note left of state link

stateDiagram-v2
    [*] --> Idle
    note left of Idle
      draft
    end note
Loading

Unicode output:

╭─────╮
(  ●  )──────┐
╰─────╯      │
             ▸╭──────╮
              │ Idle │
             ─╰──────╯
╭───────╮    ┆
│ draft │┄┄┄┄┘
╰───────╯

The note's link is rendered as disconnected segments, so a drawing-only importer cannot prove the note belongs to Idle.

Nested sequence activations

sequenceDiagram
    Alice->>Bob: one
    activate Bob
    Bob->>Carol: two
    activate Carol
    Carol-->>Bob: three
    deactivate Carol
    Bob-->>Alice: four
    deactivate Bob
Loading

The output lets activation bars overlap message text and each other (██two, ██three, and a terminal █). ASCII has the same problem as ##/#. This prevents recovery of each activation span.

Expected: render one continuous, non-overlapping bar per activation, keep message labels clear, and connect a left note to its annotated state. These are renderer-only reproducers; no downstream routing is involved.

Activity

  1. leboiko commented on Oct 13, 2026

    @leboiko
    Owner

    Fixed on master by #53. Left state-note connectors retain compatible direction ports all the way to the annotated state. Nested/equal-span/self-call activations use distinct lanes with message labels and autonumber prefixes clear of the bars.

    Sequence notes retain their anchors, borders, text and source order as opaque annotations; exposed activation spans remain continuous above and below them. Exact Unicode/ASCII topology, lane-coordinate and note regressions pass, along with full stable/Rust 1.92 workspace suites and validation gates. This closes the source issue; no release has been published yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions