Skip to content

Conversation

@lowhung
Copy link
Owner

@lowhung lowhung commented Dec 26, 2025

Summary

Complete the node grouping feature with visual clustering and a group legend.

Changes

Visual Indicators

  • Color palette: Added 8 distinct colors for groups (steel blue, light green, pink, peach, plum, powder blue, yellow, lavender)
  • Group rings: Nodes in a group display a colored ring around them
  • Group legend: Right panel shows active groups with their colors and node counts

Layout Clustering

  • Group attraction force: Nodes in the same group attract each other slightly in force-directed layout
  • Groups that are collapsed don't apply attraction forces

Group Management

  • Groups use palette colors automatically when created
  • Groups can be collapsed/expanded via the group panel
  • Collapsed groups show "(collapsed)" in the legend

Files Changed

  • src/ui/types.rs: Added GROUP_COLORS palette and get_group_color() function
  • src/ui/drawing.rs: Added group ring rendering around nodes
  • src/ui/layout.rs: Added group attraction force to force-directed layout
  • src/ui/panels.rs: Added draw_group_legend() function, updated group creation to use palette
  • src/ui/app.rs: Pass groups to layout and DrawContext, show group legend

Testing

  • All 90 existing tests pass
  • Layout tests updated to pass groups parameter

Closes #21

- Add color palette for groups (8 distinct colors)
- Add group color ring around nodes belonging to a group
- Add group attraction force in layout (grouped nodes cluster together)
- Add group legend in right panel showing group names and colors
- Update group panel to use palette colors when creating groups
- Groups can be collapsed/expanded via the group panel

Closes #21
@lowhung lowhung merged commit 0fdba56 into main Dec 26, 2025
4 of 5 checks passed
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.

Complete node grouping feature

2 participants