Skip to content

fix(sgcr): self-loop inside node + ballooning; cross-axis card fill; label clearance#210

Merged
ivanmkc merged 1 commit into
masterfrom
fix/sgcr-selfloop-labels-cardfill
Jun 23, 2026
Merged

fix(sgcr): self-loop inside node + ballooning; cross-axis card fill; label clearance#210
ivanmkc merged 1 commit into
masterfrom
fix/sgcr-selfloop-labels-cardfill

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Three rendering fixes from sgcr-demos reports:

  • Self-loop inside node + ballooning (06-compiler 'optimize' was 140×163 with the loop inside). fix(sgcr): pack ports (no dangling arrows on dense nodes) + strict on-edge P8 #208's card-fills-cell made the measured re-pass re-add the loop reserve each pass. Now the drawn node rect excludes the loop reserve (loop bulges beside the card) and the re-pass is stable.
  • Card fills only the cross axis (not the along), so ports stay on the edge but multi-line content can't be clipped.
  • Label↔edge clearance — labels nudge along their node-free track to keep 6px from other edges/labels (consent 1.8px→5.8px).

Stress fuzz 10,060 layouts zero violations (P1–P10 + determinism + order-invariance), vitest 26/26, compiler loop 0/4 points inside (node compact 150×46).

…-axis card fill; label clearance

Reported issues on sgcr-demos:
- 06-compiler: the 'optimize' self-loop rendered INSIDE a ballooned (140x163)
  node. Root: #208's card-fills-cell made the measured re-pass read back the
  loop-reserve-inflated cell as content size, so each pass re-added LOOP_W
  (36→62→…→163), and the loop (routed in that reserve) ended up under the card.
  Fix: the DRAWN node rect now EXCLUDES the loop reserve () — the
  loop attaches on the face and bulges into the reserve BESIDE the card — which
  also makes the measured re-pass stable (no re-adding). Loop inner vertical now
  sits at the drawn far edge, not the port bound.
- Card fills only the CROSS axis (width TB/BT, height LR/RL), not the along axis,
  so ports still land on the card edge while multi-line content (e.g. authz
  '+ challenge') can never be clipped by a forced height.
- Edge labels now nudge along their node-free track to keep a 6px clearance from
  other edges/labels (the 'consent' label was 1.8px from a back-edge → 5.8px).

Verified: stress fuzz 10,060 layouts zero violations (P1–P10, determinism,
order-invariance); vitest 26/26; compiler loop 0/4 points inside node (compact
150x46).
@ivanmkc ivanmkc merged commit a79b814 into master Jun 23, 2026
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