Give the explorer an honest window: totals, most-connected-first, files view, and expansion - #38
Merged
Merged
Conversation
…es view, and expansion The canvas used to show an arbitrary 300 nodes with no sign of the whole. The window is now deterministic and labelled: most-connected first with a stable tiebreak, exact scope totals, and a window-size control up to the API cap, persisted like project selection. A Files view shows the file-level graph (hundreds of nodes, a real overview), with drill-down from a file into its symbols and true counts on every list. Double-click or a keyboard action expands a node's neighbors, merged without duplicates and marked when capped; Back and Forward restore the exact canvas view; Reset returns to the base window. Review drove out what the first version hid: the window underfilled because the graph held two nodes per imported-then-indexed file (a real File and a leftover External stub), now merged into one at index time; barrel re-export hops were missing from the file graph; drill-down claimed completeness past its cap; Back after expansion did nothing; and the full window took 5.8 seconds and 2.6 MB at the cap. A scoped edge total over 19,000 identities was the real cost; it is 56 ms now, and the window returns in about half a second at 757 KB with a trimmed per-node payload. Degree is persisted at index time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
What this changes
The explorer showed an arbitrary 300 nodes of a graph that can hold tens of thousands, with no indication of the whole. Now:
Review
Two adversarial rounds plus a profiling pass. Round one found four blockers (underfilled window, missing re-export hops, drill-down claiming completeness past its cap, Back as a no-op) and a pathological full window (5.8 s, 2.6 MB). The dominant cost was a scoped edge total using an IN predicate over 19,000 identities, now 56 ms. Round two: all-clear on correctness, hostile cases (many importers before the target exists, sibling-prefix scopes, five-call determinism), and navigation.
Measured on this repository's index (18,952 scoped nodes)
Full window at 1,000: 524 ms, 757 KB, 1,000 nodes, 2,299 induced edges. Files: 37 ms. Hub neighbors: 77 ms.
Verification
pnpm turbo build 21/21, test 36/36, typecheck 20/20. Graph 158 tests, core 283.
Ledger
🤖 Generated with Claude Code