Repository navigation
feat(code-graph): --link, cross-repository graph links - #139
Merged
Merged
Conversation
`extract DIR --link NAME=PATH/graph.json[@url]` reads DIR's text files for references to the other repository (flake ?dir= URLs, GitHub tree/blob URLs, lab=PATH, labs/X in a file that names it) and adds the nodes they resolve to as external nodes with a depends_on edge and an href to the other page. graph.html draws them as dashed rings, opens their href on a click, and focuses #node=<id> on load. Without --link graph.json is unchanged. Tested: nix flake check --no-update-lock-file in labs/code-graph (build+cargo test, clippy -D warnings, fmt, size, smoke); old vs new graph.json byte-identical on 4 trees; real case ptbr-writer + forks/picasso, headless Chrome #node= focus and screenshot Co-Authored-By: Claude <[email protected]>
h0ffmann
added a commit
that referenced
this pull request
Oct 21, 2026
…) (#140) An external node is labelled by the PATH it was found by (`picasso: labs/ptbr-pdf`; the first PATH in sorted order if several resolve to one node) and keeps its own label as `linked_label`, shown in the side panel. The Relations legend lists only the relations the graph has and now has depends_on, with its own colour. External nodes and the files that point at them are always labelled. The README Size table has the new binary sizes. Tested: nix flake check --no-update-lock-file in labs/code-graph (build+cargo test, clippy -D warnings, fmt, size, smoke); real case ptbr-writer + forks/picasso, headless Chrome screenshot; nix build, nix build .#static, stat, xz -9e for the sizes Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
code-graph extract DIR --link NAME=PATH/graph.json[@URL](repeatable): references in DIR's text files to another repository (flake?dir=, GitHub tree/blob URLs,lab=PATH,labs/Xin a file that names it) become external nodesNAME:<id>with adepends_onedge and anhrefto the other page. graph.html draws them as dashed rings, a click opens the other page,#node=<id>focuses a node on load. Without--linkgraph.json is byte-identical to before. README section: Linking graphs across repositories.Real case (ptbr-writer adfa9a5 + picasso 4bc03e5): 4 external nodes (labs/gleam-website, labs/code-graph, labs/ptbr-pdf, labs/ptbr-tools), 15 edges from 10 files.
Not run: aarch64 checks; no Chrome test in the flake (the
#node=focus was checked by hand in headless Chrome).