Skip to content

feat(relationships): whole-system relationship graph viewer - #27

Merged
SiteRelEnby merged 1 commit into
mainfrom
feat/relationship-graph
Jul 14, 2026
Merged

SiteRelEnby merged 1 commit into
mainfrom
feat/relationship-graph

Conversation

@SiteRelEnby

Copy link
Copy Markdown
Collaborator

Adds the force-directed relationship graph deferred from #26 (now merged, so this targets main). Reachable from Settings > System > Relationships via the hub/graph icon in the top bar.

What it does

  • GET /v1/relationships/graph?scope=members|groups + RelationshipGraph* models.
  • A Compose Canvas renders the graph:
    • A Fruchterman-Reingold-style force layout settles the nodes (repulsion + edge springs + centering, with cooling; iterations capped for large graphs).
    • Nodes are coloured initial discs with the name beneath; edges are labelled with the relationship label and get an arrowhead when directed (symmetric types and mutual either-edges draw undirected, per the backend's directed flag).
    • Pinch to zoom, drag to pan (zoom about the gesture centroid) + a recentre button.
    • Members / Groups toggle.

Deferred (follow-up)

  • Node dragging to nudge the layout.
  • Avatar images on nodes (currently coloured initials).
  • Fanning multiple edges between the same pair into separate curves (drawn straight for now).

Testing

  • :app:assemblePlayRelease green (through R8); unit suite green; em-dash clean.
  • Not device-tested here; worth a pass with a few relationships defined: layout settles and is legible, pinch/pan/recentre work, arrowheads appear only on directed edges, Members/Groups toggle refetches.

Adds the force-directed graph that was deferred from the relationships PR.
Reachable from the Relationships settings screen (graph icon).

- GET /v1/relationships/graph?scope=members|groups + graph models.
- A Compose Canvas renders the graph: a Fruchterman-Reingold-style force
  layout settles the nodes, drawn as coloured initial discs with names;
  edges are labelled with the relationship label and get an arrowhead when
  directed (symmetric and mutual either-edges are drawn undirected).
- Pinch to zoom, drag to pan (zoom about the gesture centroid), plus a
  recentre button. A Members / Groups toggle switches scope.

Deferred as follow-up: node dragging, avatar images on nodes, and fanning
multiple edges between the same pair into separate curves.

Stacked on feat/system-relationships (needs its models/endpoints).
@SiteRelEnby
SiteRelEnby merged commit c946e43 into main Jul 14, 2026
1 check passed
@SiteRelEnby
SiteRelEnby deleted the feat/relationship-graph branch July 14, 2026 02:16
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