Repository navigation
fix(graphview): nothing leaves its cluster or the view; LayoutProblems checks it - #603
Merged
Merged
Conversation
…s checks it - A cluster is never wider than the view: its nodes wrap into more rows (the box grows taller, the graph scrolls) and a node narrows to a box narrower than itself. - Cluster titles and every part of a node are clipped to their cluster box. - The legend wraps to as many rows as its entries need instead of running off the right edge. - LayoutProblems also checks a GraphView's geometry (node inside cluster, cluster inside the view) and ignores the children of a scroll viewport (ScrollsContent), whose content is meant to reach past it. Coverage stays 100 %. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What
Reproduced on a real network (48 h horizon, 55 sub-agents, 1024 px wide): the GraphView legend ran off the right edge, and a cluster of many nodes could be wider than the view with nothing to scroll sideways. This makes nothing leave its frame and adds a permanent check.
LayoutProblemsalso checks a GraphView's own geometry (node inside cluster, cluster inside the view), and skips the children of a scroll viewport (ScrollsContent()), whose content is meant to reach past it.Tests
Both sides of the check (a laid-out graph passes; boxes forced out of their frame are reported; a scroll viewport's content passes while the same overflow elsewhere fails), narrow widths 400 to 40 px, legend wrapping. Coverage 100 %.
🤖 Generated with Claude Code