feat(flow): grouped flows join bestLayout search + tighter node sizing (Phase 5/6) - #297
Merged
Conversation
…g (Phase 5)
Two density improvements for grouped flow boards:
1. bestLayout now evaluates tight-spacing variants for grouped graphs.
Previously, grouped flows short-circuited the search (line 443:
`if (grouped || ...) return base`) and always got the loose dagre
defaults. Now the search tries nodesep:40/ranksep:70 for grouped
flows too, accepting the tighter variant only when it doesn't
introduce new edge-over-node, node-overlap, OR edge-near-node
issues (the cleanEnough guard now also checks edgeNearNode —
previously it only checked edgeOverNode + nodeOverlaps, which let
tight variants win on readability while adding near-node warnings
that the shipped-examples test caught).
2. estSize() node-width floor lowered from 150px to 120px. A 5-char
label ("Redis") at 7.6px/ch + 40px padding = 78px; the old 150px
floor added 72px of empty whitespace. 120px still gives comfortable
padding while being 20% more space-efficient.
The dagre DEFAULT spacing (nodesep:70, ranksep:110) is unchanged — I
evaluated 60/90 and 50/80 but both introduced edge-near-node warnings
on 3 shipped examples (ml-training, service-health, system-architecture).
The bestLayout search is the right place for tighter spacing: it
evaluates the impact and rejects if quality degrades.
734 viewer tests pass. tsc strict clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two density improvements: (1) bestLayout now evaluates tight-spacing variants for grouped graphs (was short-circuited); cleanEnough guard also checks edgeNearNode. (2) estSize node-width floor 150→120px (20% more space-efficient). Dagre defaults unchanged — tight spacing evaluated via bestLayout search and rejected if quality degrades. 734 tests, tsc clean.