Skip to content

fix: address Mermaid subgraph review findings#3717

Merged
rumpl merged 1 commit into
docker:mainfrom
rumpl:fix/mermaid-subgraph-review
Jul 17, 2026
Merged

fix: address Mermaid subgraph review findings#3717
rumpl merged 1 commit into
docker:mainfrom
rumpl:fix/mermaid-subgraph-review

Conversation

@rumpl

@rumpl rumpl commented Jul 17, 2026

Copy link
Copy Markdown
Member

Addresses review comments from #3716

@rumpl
rumpl requested a review from a team as a code owner July 17, 2026 10:52

@docker-agent docker-agent left a comment

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.

Assessment: 🟢 APPROVE

The two changes in this PR are both correct:

  1. parser_flowchart.go — Removing the global dedup guard is intentional and correct. The old guard prevented a node from being assigned to a second subgraph even when the Mermaid source explicitly placed it there (a valid pattern). The stack-based logic already ensures a node is only added to the current innermost subgraph; appendUniqueMermaid correctly deduplicates within that subgraph's slice.

  2. render_subgraph.go — The right bound arithmetic is correct. With rightBorder = " │" the rendered column layout is: before(W cols) + (1) + (1) + text(T) + (1) + (1). Setting x = W+2 (start of text) and right = x + T + 1 = W+T+3 lands exactly on the right border character , matching what drawMermaidSubgraphBox expects.

@rumpl
rumpl enabled auto-merge July 17, 2026 10:59
@rumpl
rumpl merged commit b231330 into docker:main Jul 17, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants