Skip to content

feat(code-graph): visible hyperlinks between linked graphs, and --backlink - #141

Merged
h0ffmann merged 1 commit into
mainfrom
feat/code-graph-hop
Oct 21, 2026
Merged

h0ffmann merged 1 commit into
mainfrom
feat/code-graph-hop

Conversation

@h0ffmann

Copy link
Copy Markdown
Owner

Makes the cross-repository links of --link real hyperlinks, so a reader hops from one graph page to the other, HTML to HTML.

  • Header button ↗ NAME per --link (real <a href>).
  • External nodes are SVG <a href=URL#node=id> (ring + label with ↗, accent colour --hop, tooltip, underline on hover); work with JS off.
  • --backlink NAME=URL (repeatable) adds ← NAME to the header.
  • Side panel lists a file's external dependencies as links; #node= page opened from the same origin shows an "arrived from · back" banner.
  • Tests: exact set of hrefs asserted, no network loads, graph.json byte-identical without link/backlink, determinism. Binary +8,192 bytes (16,644,256 / static 16,742,352).

Checked on ptbr-writer main + picasso 45fb340 in headless Chrome (graph.html with 5 SVG anchors, picasso.html with the back link).

…klink

A --link adds a header button "↗ NAME"; each external node is an SVG <a href> (ring and
label, accent colour, tooltip, underline on hover) that works with scripting off. --backlink
NAME=URL adds "← NAME". The side panel lists a file's dependencies on external nodes as links,
and a page opened with #node= from the same origin shows "arrived from PAGE · back".

Tested: nix flake check --no-update-lock-file in labs/code-graph (build+tests, clippy, fmt, size, smoke, lab-json); real run on ptbr-writer main + picasso 45fb340, headless Chrome screenshot and --dump-dom
Co-Authored-By: Claude <[email protected]>
@h0ffmann
h0ffmann merged commit b919f9e into main Oct 21, 2026
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