Skip to content

fix(merman): tighten flowchart spacing - #41191

Merged
kitlangton merged 1 commit into
v2from
fix/merman-flowchart-spacing
Aug 8, 2026
Merged

fix(merman): tighten flowchart spacing#41191
kitlangton merged 1 commit into
v2from
fix/merman-flowchart-spacing

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Tighten ordinary horizontal flowchart chains while hardening top-level subgraph placement found during a final layout review.

Before / After

Before: unlabeled LR/RL edges reserved at least 10 cells between ranks, making simple pipelines feel unnecessarily loose. The recent sibling-subgraph pass also serialized parallel peers and could miss nested or cyclic cluster dependencies.

After: ordinary horizontal ranks use a 7-cell minimum. Labeled edges still expand to fit their labels, compact mode remains at 4 cells, and vertical spacing remains unchanged. Parallel sibling clusters retain the same primary rank, move across the flow axis only when their frames would overlap, and cyclic dependencies are ranked as one component.

How

  • Reduces DEFAULT_MIN_RANK_GAP from 10 to 7.
  • Ranks strongly connected top-level cluster components before placement.
  • Resolves oversized peer-frame collisions on the cross axis.
  • Attributes nested subgraph endpoints to their top-level cluster.
  • Skips redundant intermediate routing passes when there are no subgraphs or no cluster translation.

Scope

Sequence and state spacing are unchanged. Edge labels continue to override the minimum rank gap when they need more room.

Testing

  • bun run typecheck in packages/merman
  • bun run test in packages/merman (230 tests)
  • Push-hook monorepo typecheck (33 tasks)
  • TD, BT, LR, and RL coverage for parallel, oversized, nested, and cyclic sibling clusters
  • Exact reported anatomy-tree regression
  • OpenCode Drive rendering across five themes
  • Two independent focused review passes after implementation

Demo

The same flowchart and sequence diagrams are held for one second under opencode, tokyonight, github, rosepine, and gruvbox.

recording-e6884445-8908-479f-9d3d-1d5e4ced4bdb.mp4

@kitlangton
kitlangton merged commit dd60206 into v2 Aug 8, 2026
8 of 10 checks passed
@kitlangton
kitlangton deleted the fix/merman-flowchart-spacing branch August 8, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant