Skip to content

fix(flow): tiered layout — wrap rows + per-band width (grouped density) - #299

Merged
ivanmkc merged 2 commits into
masterfrom
feat/sgcr-phase6
Aug 8, 2026
Merged

fix(flow): tiered layout — wrap rows + per-band width (grouped density)#299
ivanmkc merged 2 commits into
masterfrom
feat/sgcr-phase6

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Two density fixes for tiered grouped flows: (1) rows wrap at 900px instead of one infinitely-wide row (walkability-flow-v13: 2670→940px, −65%); (2) each band sized to own content, not widest. 735 tests, tsc clean.

The geometry lint now matches the renderer: ungrouped flows (which render
through SgcrFlowInner since Phase 4) are linted via SGCR's checkInvariants()
— exact arithmetic that replaces the heuristic dagre-based segment checks.
Grouped flows (FlowInner + smoothstep edges) and manual-layout specs still
use the dagre lint. This is the final phase of the SGCR-default plan.

Changes:
- geometryReport() detects the effective engine (same gate as flow.tsx:
  engine !== "dagre" && !grouped && layout !== "manual") and delegates
  to sgcrReport() for SGCR-path flows.
- sgcrReport() now runs checkInvariants() — any violation is reported as
  an error-severity finding (SGCR should produce zero violations by
  construction, so this catches engine bugs).
- sgcrReport() also checks flow-too-many-nodes (was dagre-path only;
  fires independently of whether SGCR lays out, even on edge-less graphs).
- toSgcrInput() extracted as a shared helper for sgcrReport + bestLayout.
- Removed the sgcr-skipped-grouped warning (Phase 3 made grouped SGCR
  supported; the warning is obsolete).
- Tests updated: sgcr-skipped-grouped → "SGCR lint integration (Phase 6)";
  low-readability → "large-graph overflow finding" (ungrouped → sgcr-overflow,
  dagre-opt-out → low-readability); cleanEnough guard now checks edgeNearNode.

735 viewer tests pass (+1 from Phase 6 test updates). tsc strict clean.
…y fix)

Two density improvements for tiered (grouped) flow boards:

1. Row wrapping: bands with many nodes (>900px content width) now wrap
   into multiple rows instead of one infinitely-wide row. The "EXTRACT"
   band in walkability-flow-v13 (4 nodes) wraps into 2 rows instead of
   one 2670px row — content width drops from 2670px to 940px (−65%).

2. Per-band width: each tier band is sized to its OWN content width,
   not the widest band's width. A 1-node "TYPED CONTRACT" band no longer
   stretches to match a 3-node "RESULT MODEL" band.

Before: walkability-flow-v13 was 2670×1232 (534% fill, massive pan).
After: 940×1600 (299% fill, mostly vertical scroll — natural).

735 viewer tests pass. tsc strict clean.
@ivanmkc
ivanmkc merged commit 57679ae 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