fix(sgcr): relax source-side port spacing so fork in-line children stay straight#207
Merged
Merged
Conversation
…ay straight Arrowheads sit at an edge's TARGET, so only target-side ports need the full PORT_STEP arrowhead-clearance spacing. Source-side ports (no arrowhead) were also spaced 16px apart, which shoved a fork parent's in-line child off-centre (its narrow child face then couldn't reach the port → diagonal connector even though parent and child were centre-aligned). Now source ports pack at a smaller step (8px, still distinct), so the in-line child keeps the centre/ aligned port and its connector runs straight; off-axis children turn as before. A port is 'target' (keeps PORT_STEP) iff it's the edge's arrowhead end here (higher-rank end of a forward edge / lower-rank end of a reversed one; flat edges conservatively keep the full step) — so P5 arrowhead clearance is untouched. Verified: stress fuzz 10,060 layouts zero violations, vitest 26/26, the arch demo's edge→api→svc→cache spine renders as one straight line.
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.
Only TARGET-side ports (arrowheads) need PORT_STEP clearance; source-side ports were spaced 16px too, shoving a fork's in-line child off-centre so its narrow child face couldn't reach the port (diagonal connector despite centre-aligned nodes). Source ports now pack at 8px (still distinct) → the in-line child keeps the aligned port and runs straight. P5 untouched (only source ports relaxed). Stress fuzz 10,060 layouts ZERO violations, vitest 26/26.