Skip to content

Add weighted edges, cycle detection, and edge tooltips#7

Open
MichaelSNelson wants to merge 1 commit intoapposed:mainfrom
MichaelSNelson:weighted-edges-and-cycles
Open

Add weighted edges, cycle detection, and edge tooltips#7
MichaelSNelson wants to merge 1 commit intoapposed:mainfrom
MichaelSNelson:weighted-edges-and-cycles

Conversation

@MichaelSNelson
Copy link
Contributor

Summary

  • Weighted edges: edge thickness scales by cross-module call count (via class_deps + function call graphs)
  • Cycle detection: Tarjan's SCC finds circular dependencies; cycle edges colored per group with diamond midpoint markers
  • Edge hover tooltips: shows weight count and/or cycle status on hover
  • Cycle colors are dynamically generated to be maximally distant from the current theme's palette in hue space

Test plan

  • Toggle Weighted checkbox → edges vary in thickness
  • Toggle Cycles checkbox → cycle edges colored with diamond midpoints, cycle nodes get colored borders
  • Weighted + Cycles together → both effects combine
  • Hover edges with Weighted on → tooltip shows call count
  • Hover cycle edges → tooltip shows "cyclic dependency"
  • Switch themes → cycle colors adapt to stay visually distinct
  • Shift+click highlighting still works alongside new features

🤖 Generated with Claude Code

- computeModuleEdgeWeight: counts cross-module calls via class_deps
  and function call graphs for edge thickness scaling
- computeEdgeWidth: log-scaled width from weight data
- detectCycles: Tarjan's SCC algorithm on visible edges
- getCycleColors: generates N hues maximally distant from current
  theme palette for cycle group coloring
- Cycle edges get diamond mid-markers and colored borders on nodes
- Edge hover tooltip shows weight count and/or cycle status
- Weighted and Cycles checkboxes in Edges sidebar section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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