Skip to content

feat(flow): grouped flows join bestLayout search + tighter node sizing (Phase 5/6) - #297

Merged
ivanmkc merged 1 commit into
masterfrom
feat/sgcr-phase5
Aug 8, 2026
Merged

feat(flow): grouped flows join bestLayout search + tighter node sizing (Phase 5/6)#297
ivanmkc merged 1 commit into
masterfrom
feat/sgcr-phase5

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Aug 8, 2026

Copy link
Copy Markdown
Owner

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.

…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.
@ivanmkc
ivanmkc merged commit 1f88644 into master Aug 8, 2026
4 of 5 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.

2 participants