Canvas driven topographical node#81
Merged
JamesEjembi merged 3 commits intoJun 24, 2026
Merged
Conversation
…pping Add canvas topology map with worker-driven force layout for 10k nodes
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.
Motivation
Description
NodeTopologyMap(src/components/network/NodeTopologyMap.tsx) that implements a layered draw (grid, edges, nodes, selection), Path2D edge caching, distance-based LOD (tiny dots vs full labels/status), and latency-colored directional edge arrows.CELL_SIZE = 100) with 3x3 neighborhood lookups to reduce hover/click checks from O(n) to constant-time in practice.runForceLayoutengine (src/lib/forceLayout.ts) andsrc/workers/forceLayout.worker.tswhich runs physics at 60Hz and posts render snapshots at 30Hz.useNodeTopologyhook (src/hooks/useNodeTopology.ts) and newsrc/types/topology.ts.NetworkGraph(src/components/network/NetworkGraph.tsx) and integrated the new canvas map into the network page (app/network/page.tsx).e2e/topology-performance.spec.tsthat samplesrequestAnimationFramefor 30s and asserts p95 frame time < 33ms.gpuMode) to surface that a WebGPU-based instanced point-sprite path could be used for >5,000 nodes in environments that support it.Testing
npm run lintwhich completed (one unrelatedreact-hooks/exhaustive-depswarning remains insrc/hooks/useNodeList.ts).npx tsc --noEmit.npm run build(Next.js static page generation succeeded).e2e/topology-performance.spec.ts) was executed but the test run is blocked by the Playwright browser installation failing in this environment:npx playwright install chromiumreturned a 403 from the CDN so the browser executable was not available and the test could not complete.Closes #2