Add a graph of org-roam and Denote nodes !442

merged merged by cmc on 2026-11-22 02:38 UTC · krz/orgstar:roam-graph into main

Discussion

cmc

Closes #91.

  • RoamGraph (OrgApp): nodes and edges from the index's nodes and links. A link belongs to the innermost heading with an ID around it (new IndexStore.nodeSections), else to its file's node. Fruchterman–Reingold layout, deterministic, with repulsion cut off at 4 units so unlinked parts settle beside each other.
  • RoamGraphView (OrgApp, shared): drawn in a Canvas; drag to pan, pinch or buttons to zoom, click or tap to open. Titles are drawn where they have room, most-linked first. "Only the Open Note's Links" keeps the caret's node and its neighbours.
  • Mac: Window("Graph"), Window ▸ Graph, command app.node.graph on C-c n g and SPC n r g.
  • iOS: More ▸ Node Graph and the same command, as a sheet.
  • Behind orgstar+ with the other app.node. commands. With notes-package = "denote" it draws Denote notes and denote: links.
  • Manual, strings (de, es, fr, ja, pt-BR) and the 1.2.0 notes updated.

Tests cover edge building for both packages, the neighbourhood, the caret's node and the layout. Looked at on the Mac with 25 sample notes, whole and limited to one note. The iOS sheet builds but was not opened: orgstar+ is locked in the Simulator.

Each layout round compares every pair of nodes, so a workspace with several thousand nodes will take seconds to lay out; rounds are reduced as the count grows.