Skip to content

Commit 56694d1

Browse files
authored
Merge pull request #246 from DevanshuNEU/feat/dependency-graph-overhaul
feat: dependency graph overhaul -- WebGL rendering + DSM matrix view
2 parents b42c6af + beda58c commit 56694d1

15 files changed

Lines changed: 1235 additions & 1026 deletions

File tree

frontend/bun.lock

Lines changed: 28 additions & 113 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,25 @@
2424
"@radix-ui/react-switch": "^1.2.6",
2525
"@radix-ui/react-tabs": "^1.1.13",
2626
"@radix-ui/react-tooltip": "^1.2.8",
27+
"@react-sigma/core": "^5.0.6",
2728
"@supabase/supabase-js": "^2.39.0",
2829
"@tanstack/react-query": "^5.90.12",
29-
"@types/dagre": "^0.7.53",
3030
"@types/react-syntax-highlighter": "^15.5.13",
3131
"class-variance-authority": "^0.7.1",
3232
"clsx": "^2.1.1",
3333
"cmdk": "^1.1.1",
34-
"dagre": "^0.8.5",
3534
"framer-motion": "^12.29.0",
35+
"graphology": "^0.26.0",
36+
"graphology-communities-louvain": "^2.0.2",
37+
"graphology-layout-forceatlas2": "^0.10.1",
38+
"graphology-types": "^0.24.8",
3639
"lucide-react": "^0.554.0",
3740
"next-themes": "^0.4.6",
3841
"react": "^18.2.0",
3942
"react-dom": "^18.2.0",
4043
"react-router-dom": "^7.12.0",
4144
"react-syntax-highlighter": "^16.1.0",
42-
"reactflow": "^11.11.4",
45+
"sigma": "^3.0.2",
4346
"sonner": "^2.0.7",
4447
"tailwind-merge": "^3.4.0",
4548
"tailwindcss-animate": "^1.0.7"

frontend/src/components/DependencyGraph/DirectoryNode.tsx

Lines changed: 0 additions & 99 deletions
This file was deleted.

frontend/src/components/DependencyGraph/GraphNode.tsx

Lines changed: 0 additions & 144 deletions
This file was deleted.

frontend/src/components/DependencyGraph/GraphToolbar.tsx

Lines changed: 0 additions & 96 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Graph controls: zoom in, zoom out, fit to screen
2+
// Positioned bottom-left of the graph canvas
3+
4+
import { useSigma, useCamera } from '@react-sigma/core'
5+
import { ZoomIn, ZoomOut, Maximize2 } from 'lucide-react'
6+
7+
const BTN = 'p-1.5 bg-zinc-900/80 backdrop-blur-sm border border-zinc-700 rounded-md text-zinc-400 hover:text-zinc-200 hover:border-zinc-600 transition-colors'
8+
9+
export function GraphControls() {
10+
const { zoomIn, zoomOut, reset } = useCamera({ duration: 300, factor: 1.5 })
11+
12+
return (
13+
<div className="absolute bottom-4 left-4 z-10 flex flex-col gap-1">
14+
<button onClick={() => zoomIn()} className={BTN} title="Zoom in">
15+
<ZoomIn className="w-4 h-4" />
16+
</button>
17+
<button onClick={() => zoomOut()} className={BTN} title="Zoom out">
18+
<ZoomOut className="w-4 h-4" />
19+
</button>
20+
<button onClick={() => reset()} className={BTN} title="Fit to screen">
21+
<Maximize2 className="w-4 h-4" />
22+
</button>
23+
</div>
24+
)
25+
}

0 commit comments

Comments
 (0)