fix: address Mermaid subgraph review findings#3717
Conversation
Signed-off-by: Djordje Lukic <[email protected]>
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The two changes in this PR are both correct:
-
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;
appendUniqueMermaidcorrectly deduplicates within that subgraph's slice. -
render_subgraph.go — The
rightbound arithmetic is correct. WithrightBorder = " │"the rendered column layout is:before(W cols) +│(1) +(1) +text(T) +(1) +│(1). Settingx = W+2(start of text) andright = x + T + 1 = W+T+3lands exactly on the right border character│, matching whatdrawMermaidSubgraphBoxexpects.
Addresses review comments from #3716