Skip to content

fix(graphview): nothing leaves its cluster or the view; LayoutProblems checks it - #603

Merged
tannevaled merged 1 commit into
mainfrom
feat/graph-containment
Nov 20, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/graph-containment

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

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.

  • GraphView: a cluster is never wider than the view (its nodes wrap into more rows, the box grows taller, the graph scrolls); a node narrows to a box narrower than itself; cluster titles and every part of a node are clipped to the cluster box; the legend wraps to as many rows as it needs.
  • LayoutProblems also 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

…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>
@tannevaled
tannevaled merged commit 5c61231 into main Nov 20, 2026
1 check passed
@tannevaled
tannevaled deleted the feat/graph-containment branch November 20, 2026 10:26
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.

1 participant