fix(flow): construct SGCR from painted geometry - #305
Open
ivanmkc wants to merge 8 commits into
Open
Conversation
Owner
Author
This was referenced Aug 31, 2026
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.


Summary
Root cause
React Flow reported a 73px wrapper for a custom card whose painted child was about 89px high. SGCR proved the edge label clear of the wrapper, while the browser painted the label into the overflowing card. Edge-label dimensions were also estimated independently from SVG text rendering.
The visible layout now has one geometry authority: browser-measured painted boxes in flow coordinates. The hidden graph is measurement scaffolding only; the measured layout is installed and revealed atomically.
Before / after
Before and after screenshots are attached to this PR.
Verification
env NODE_OPTIONS=--localstorage-file=/private/tmp/termchart-vitest-localstorage npm test— 1,037 passed, 18 skippednpm run build --workspace @ivanmkc/termchart-viewer— passednpm run test:overlap:nobuild --workspace @ivanmkc/termchart-viewer— 27/32 clean, 5 known baseline cases, 0 regressions:8080— paintedHTTPS + termchart tokenlabel has 13px clearance from the paintedremote-clicard; rectangles do not intersectRefs #154
Related #303