Skip to content

fix(diff): never draw an import statement as a changed root - #48

Merged
inth3shadows merged 1 commit into
masterfrom
diff-skip-import-roots
Sep 27, 2026
Merged

inth3shadows merged 1 commit into
masterfrom
diff-skip-import-roots

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

Follow-up from #46/#47.

matchRootSymbols excluded "kind":"file" nodes but not "kind":"import" ones. So a changed file's import statements became bold --diff roots, and probing an import's text as a name (../src/mcp/tools) can resolve to another symbol and draw its callers/callees: the same fabrication #46 fixed for --architecture. Import nodes are now excluded too.

Reproduced on a TS repo with a changed test/t.ts: before, two roots (runTest and "../src/mcp/tools"); after, only runTest. The regression test was written first and failed on the old code.

Local: node test/run.js 192 passed, 0 failed (fork codegraph). TECHNICAL.md updated.

matchRootSymbols excluded file nodes but not import nodes, so a changed
file's import statements became bold diff roots, and probing an import's
text as a name can resolve to another symbol and draw its edges (the
--architecture bug fixed in #46). Import nodes are now excluded too.
@inth3shadows
inth3shadows merged commit dbc7813 into master Sep 27, 2026
7 checks passed
@inth3shadows
inth3shadows deleted the diff-skip-import-roots branch September 27, 2026 12:05
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