Draw graph edges, settle the layout, and document the dashboard - #23
Merged
Merged
Conversation
getFullGraph matched each edge endpoint with a check that tested filePath on its own before anything else. Every function, class and interface declared in a file shares that path, so the lookup returned whichever node for the file came first, in practice the File node. The name comparison that followed could never run because the || had already short-circuited. The effect was that edges collapsed onto File nodes and the real endpoints were left with none, so the dashboard drew functions and interfaces as a disconnected grid. Endpoints are now matched on name plus path, falling back to the file itself only when the endpoint carries no name. Measured on the same graph: every node type went from partially connected to fully connected, including 152 of 152 functions and 41 of 41 interfaces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… on search Three defects found while exercising the UI rather than the API. Node ids were being overwritten. The element mapping spread the payload's data object after setting id, and that object carries its own internal id for 208 of 235 nodes, every Function, Class, Interface and Variable. Their cytoscape ids were replaced, so every edge referencing the real id was treated as an orphan and dropped. Files and Types carry no inner id, which is why only files ever appeared connected. The spread now comes first. The layout never settled. cose runs numIter simulation steps, 1000 by default, and animating them left the graph drifting for many seconds, during which nodes moved out from under the pointer and could not reliably be clicked. Animating only the final transition was worse: the viewport fit to the pre-layout positions and the graph settled off screen. Positioning without animation gives final coordinates immediately, so both the fit and the hit testing are correct. Clicking a search result highlighted the node but never selected it, leaving the detail panel on its empty state. The result now flows through to selection, and because the search payload already carries filePath and line numbers, the signature, metrics and syntax-highlighted source preview all render. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The package installs a second binary that neither README mentioned, so it shipped as a feature nobody could discover. Both now describe what the dashboard is, how to start it from a checkout or from the published package, that it serves the UI and the REST API on one port, and that it is optional and never started by the MCP server. The environment variables that affect it are listed, and the two new workspace packages are recorded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Augment PR SummarySummary: This PR fixes dashboard graph rendering and improves its launch documentation.
🤖 Was this summary useful? React with 👍 or 👎 |
Raised in review on #23 and correct. npx resolves its argument as a package name, and this binary ships inside codegraph-mcp, so "npx codegraph-dashboard" would look for a package called codegraph-dashboard. No such package exists on the registry, confirmed with npm view, so the documented quick start could not have worked on a clean machine and the name is available for anyone to squat. Both READMEs now name the package explicitly and show the global install form alongside it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Follow-up to #22, from actually exercising the dashboard UI rather than the API. Three real defects and the missing documentation.
Edges were bound to the wrong nodes, twice
Two independent bugs, one server side and one client side, both producing the same symptom: functions and interfaces rendered as a disconnected grid while only files appeared connected.
Server.
getFullGraphresolved each edge endpoint with a check that testedfilePathon its own first. Every function, class and interface in a file shares that path, so the lookup returned whichever node for the file came first, in practice the File node. The name comparison after the||could never run.Client. The element mapping spread the payload's
dataobject after settingid, and that object carries its own internal id for 208 of 235 nodes (every Function, Class, Interface and Variable). Their cytoscape ids were overwritten, so every edge referencing the real id was dropped as an orphan. Files and Types carry no inner id, which is exactly why only files looked connected.Measured on the same graph afterwards: 152 of 152 functions and 41 of 41 interfaces connected, with all 300 edges rendering.
The layout never settled
coserunsnumItersimulation steps, 1000 by default. Animating them left the graph drifting for many seconds, and nodes moved out from under the pointer faster than they could be clicked. Animating only the final transition was worse, because the viewport fit to the pre-layout positions and the graph settled off screen. Positioning without animation gives final coordinates immediately, so the fit and the hit testing are both correct.Search results did not open the detail panel
Clicking a result highlighted the node but never selected it, so the panel stayed on its empty state. The result now flows through to selection. Since the search payload already carries
filePathand line numbers, the signature, complexity metrics, parameters and syntax-highlighted source preview all render.Documentation
The package installs
codegraph-dashboard, which neither README mentioned. Both now cover what it is, how to start it from a checkout or the published package, that it serves the UI and REST API on one port, and that it is optional and never started by the MCP server.Verification
npm installof the tarball: all four groups respond,codebase statsreturns 235 nodes,search findreturns correct hits,querycounts 152 functions🤖 Generated with Claude Code