Repository navigation
Analyze any GitHub repository or local folder in the browser, with a rebuilt UI - #6
Merged
Merged
Conversation
Makes the in-memory indexing path free of Node-only imports so a page can analyze a repository without a server: - parser: split into an environment-neutral core plus a Node entry and a browser entry that finds each .wasm by URL (Vite ?url assets) - extractors: node:path replaced by a small posix module, indexFiles moved out of the file-system indexer, the file-selection rules shared in filter.ts, and a ./browser entry point - web: repo-input parser, a GitHub loader (tree API + raw files, with rate-limit / not-found / size handling), a local-folder loader for the picker and drag-and-drop, and an indexing Web Worker with progress Parity is tested: path helpers against node:path.posix, and in-memory indexing against the on-disk indexer on seven fixtures, including via a fake GitHub. The worker was also run in Chromium on TS, TSX, JS and Python. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
The hosted demo was one pre-built graph with an unreadable UI. The page
now takes a public GitHub repository (owner/repo, owner/repo@branch or a
github.com link) or a dropped/chosen local folder and analyzes it in a
Web Worker, with nothing uploaded. ?repo= links are shareable.
UI, rebuilt around landing -> progress -> workspace:
- landing page with examples, drag-and-drop anywhere, clear errors
(not found, private repo, rate limit with the reset time)
- workspace: overview of the riskiest code, search ("/"), file tree,
breadcrumbs, a toolbar for view / analysis / confidence / depth
- inspector: blast radius with a confidence bar, grouped impacted
symbols, tests to run, callers, callees, source with a GitHub link
- graph readability: node cards, blast radius fans out from the changed
code, test functions fold into one node per test file, a very large
radius folds into one node per file, selecting a file shows its import
neighbourhood (ego layout), the view frames the selection and re-frames
when the canvas resizes
- keyboard, mobile layout (drawer + bottom sheet), no console noise
Also: codegraph serve marks the page it serves so the app only probes
/api/graph when a graph is waiting; the Vercel build is now just the web
build (no pre-baked graph); deploy guide, README and changelog updated.
Verified in headless Chromium against the built site with GitHub's API
mocked from local clones: Flask, Zod (523 files), Hono and NestJS (2,155
files, 9s) analyze and render; folder picker, graph.json, shared links,
errors and the CLI-served mode all work.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ENHRK3kgqcVwqwyjswRViM
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Why
The hosted demo showed one pre-built graph (Flask) that couldn't be changed, and the UI was hard to read: it opened on a hairball of tiny nodes with no starting point.
What changes for a visitor
owner/repo,owner/repo@branch, or agithub.comlink) or drop/choose a local folder. The analysis runs in the visitor's browser (the parser is WebAssembly in a Web Worker), so nothing is uploaded and hosting needs no server.?repo=owner/repoopens that analysis./), a file tree, and breadcrumbs;How
@codegraph/parseris split into an environment-neutral core plus a Node entry and a browser entry that finds each.wasmby URL.@codegraph/extractorsgets a./browserentry;node:pathis replaced by a small POSIX module,indexFilesis separate from the file-system indexer, and the file-selection rules (filter.ts) are shared by the CLI and the browser loaders.packages/web: repo-input parser, GitHub loader (tree API +raw.githubusercontent.com, 2 API calls per analysis), local-folder loader (prunesnode_modulesbefore reading), indexing worker with progress and cancel.build:demoare gone.docs/DEPLOY.md, the README (with a screenshot) and the changelog are updated.codegraph servemarks the page it serves, so the app only probes/api/graphwhen a graph is waiting.Testing
node:path.posix; in-memory indexing gives a graph identical to on-disk indexing on 7 fixtures, including through a fake GitHub; repo-input parsing; file selection and trimming; GitHub errors (404, rate limit with and without readable headers, offline, cancel); local folders; the graph model (test folding, auto-fold, neighbourhood layout, confidence filter). I confirmed the folding and neighbourhood tests fail when those features are disabled.api.github.comandraw.githubusercontent.commocked from local clones: analyze, drill down, select a file, code tab, file tree, search and Enter, callers and callees, Escape, return to the landing page, a phone viewport, a folder via the picker, agraph.json, a shared?repo=link, and each error. 17 of 17 checks pass.codegraph serve(built bundle) still opens straight onto its graph; the bundled CLI still indexes TypeScript and Python;npm ciand the lockfile are in sync; the packed npm tarball is 0.9 MB (6.7 MB unpacked).Not verified
The real
api.github.comcouldn't be reached from the sandbox, so the GitHub loader is tested against mocks that follow GitHub's documented responses and CORS headers (andraw.githubusercontent.comwas checked live: it sendsaccess-control-allow-origin: *). After deploying, open?repo=pallets/flaskonce to confirm against the real API. A branch name containing/is only understood in theowner/repo@feature/xform.After merging
In Vercel keep Root Directory at
packages/weband redeploy; no settings change.