Tighten min edge length to label width + small margin#56
Merged
Conversation
…uffer) minEdgeLength used the half-DIAGONAL of each card (~100px) as the node projection, leaving a far larger gap than the edge label needs. Use the per-angle border reach instead (borderReach, mirrors rectBorderPoint) so the border-to-border gap = labelWidth + a small 14px margin, at any angle. Pass the edge direction through from the link-distance accessor (the minEdge force and drag clamp reuse the cached _minLen). Also make the label-width estimate slightly generous so the gap never under-shoots the rendered label. Verified (geometry diagnostic): drag-clamp centerDist 306->274; flow cluster minClearSpan 120 >= maxLabelW 106 with 0 overflowing / 0 overlapping. web units 19 (new borderReach tests), THE GATE 5/5, perf 3/3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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.
Follow-up to the edge-geometry work — the minimum edge length used each card's half-diagonal (~100px), leaving a far bigger gap than the label needs. Now it uses the per-angle border reach so the border-to-border gap = label width + a small 14px margin, at any angle (direction passed through to the minEdge force + drag clamp via cached
_minLen). Label-width estimate made slightly generous so the gap never under-shoots the rendered label.Verified (geometry diagnostic): drag-clamp centerDist 306→274; flow cluster minClearSpan 120 ≥ maxLabelW 106, 0 overflowing / 0 overlapping. web units 19, THE GATE 5/5, perf 3/3. 🤖 Generated with Claude Code