Skip to content

feat: add LOD graph rendering and performance optimizations#362

Open
naicud wants to merge 1 commit intoabhigyanpatwari:mainfrom
naicud:pr/performance-lod-rendering
Open

feat: add LOD graph rendering and performance optimizations#362
naicud wants to merge 1 commit intoabhigyanpatwari:mainfrom
naicud:pr/performance-lod-rendering

Conversation

@naicud
Copy link
Contributor

@naicud naicud commented Mar 18, 2026

Summary

Adds Level-of-Detail (LOD) graph rendering to handle large codebases (10K+ nodes) that would overwhelm the browser, plus performance optimizations and a major UI restructuring.

LOD Rendering

Three rendering levels that progressively reveal detail:

  1. Summary view — cluster-level super-nodes showing functional areas
  2. Hierarchy view — expandable cluster groups with child counts
  3. Full view — complete node graph (with hard cap protection)

Users click to expand clusters, drill into neighborhoods, and navigate large graphs fluidly.

Performance

  • NODE_HARD_CAP — server-side limit prevents sending too many nodes to browser
  • Graph truncationbuildGraph() with limit/truncation and truncated/totalAvailable response metadata
  • buildStructuralSummaryFromDb() — server-side summary generation from graph DB
  • fastStripNullable() — type resolution optimization
  • skipGraphPhases — pipeline option to skip expensive graph phases

New API Endpoints

/api/graph/{info, summary, expand, neighbors, hierarchy, ancestors, neighbor-counts, schema}

UI Restructuring

  • useAppState refactored into 6 per-concern hooks: useGraphState, useFilterState, useChatState, useWorkerState, useKeyboardShortcuts, useStyleConfig
  • 6 new components: DataExplorer, ContextMenu, NeighborPanel, SchemaGraph, SearchPanel, StylingPanel
  • Graph adapters: summary-graph-adapter.ts, hierarchy-graph-adapter.ts for LOD data transformation

Changes (37 files)

Area Key files What
Backend api.ts, graph-summary.ts, pipeline.ts LOD endpoints, summary builder
Web services graph-lod.ts, summary-graph-adapter.ts, hierarchy-graph-adapter.ts LOD data layer
Components 6 new + GraphCanvas.tsx, App.tsx LOD UI, exploration tools
Hooks 6 new + useAppState.tsx, useSigma.ts State management refactor
Adapters graph-adapter.ts, constants.ts Batch import, ClusterGroup type

Test plan

  • Build passes: cd gitnexus && npm run build && cd ../gitnexus-web && npm run build
  • Load a large repo (1000+ nodes) — should show summary view by default
  • Click a cluster group to expand into hierarchy view
  • Click "Show all" to see full graph (with truncation warning if applicable)
  • Right-click a node for context menu with neighbor exploration
  • DataExplorer panel shows node details and neighbor counts
  • Schema graph shows type-level overview

🤖 Generated with Claude Code

- Level-of-detail graph rendering (summary, hierarchy, full)
- Graph summary builder (structural aggregation by cluster)
- New API endpoints: /api/graph/{info,summary,expand,neighbors,hierarchy,ancestors,schema}
- Node hard cap with truncation for large graphs
- Refactored useAppState into per-concern hooks
- New components: DataExplorer, ContextMenu, NeighborPanel, SchemaGraph, SearchPanel, StylingPanel
- Summary and hierarchy graph adapters
- ForceAtlas2 tuning for LOD rendering

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 18, 2026

@naicud is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

@naicud
Copy link
Contributor Author

naicud commented Mar 18, 2026

@magyargergo
SPlitted in 5 the bigone of cobol can you approuve ?

┌─────┬─────────────────────────┬──────┬────────┐
│ # │ PR │ URL │ Status │
├─────┼─────────────────────────┼──────┼────────┤
│ 1 │ AWS Bedrock Integration │ #358 │ ✅ │
├─────┼─────────────────────────┼──────┼────────┤
│ 2 │ COBOL Language Support │ #359 │ ✅ │
├─────┼─────────────────────────┼──────┼────────┤
│ 3 │ AWS Neptune Backend │ #360 │ ✅ │
├─────┼─────────────────────────┼──────┼────────┤
│ 4 │ TUI Wizards + Embed CLI │ #361 │ ✅ │
├─────┼─────────────────────────┼──────┼────────┤
│ 5 │ LOD Graph Rendering │ #362 │ ✅ │
└─────┴─────────────────────────┴──────┴────────┘

@github-actions
Copy link
Contributor

CI Report

All checks passed

Pipeline Status

Stage Status Details
✅ Typecheck success tsc --noEmit
✅ Unit Tests success 3 platforms
✅ Integration success 3 OS x 4 groups = 12 jobs

Test Results

Suite Tests Passed Failed Skipped Duration
Unit 1568 1565 0 1 8s
Integration 1202 1182 0 19 50s
Total 2770 2747 0 20 58s

✅ All 2747 tests passed

20 test(s) skipped — expand for details

Integration:

  • Python match/case as-pattern type binding > resolves u.save() to User#save via match/case as-pattern binding
  • Python match/case as-pattern type binding > does NOT resolve u.save() to Repo#save (negative disambiguation)
  • Swift constructor-inferred type resolution > detects User and Repo classes, both with save methods
  • Swift constructor-inferred type resolution > resolves user.save() to Models/User.swift via constructor-inferred type
  • Swift constructor-inferred type resolution > resolves repo.save() to Models/Repo.swift via constructor-inferred type
  • Swift constructor-inferred type resolution > emits exactly 2 save() CALLS edges (one per receiver type)
  • Swift self resolution > detects User and Repo classes, each with a save function
  • Swift self resolution > resolves self.save() inside User.process to User.save, not Repo.save
  • Swift parent resolution > detects BaseModel and User classes plus Serializable protocol
  • Swift parent resolution > emits EXTENDS edge: User → BaseModel
  • Swift parent resolution > emits IMPLEMENTS edge: User → Serializable (protocol conformance)
  • Swift cross-file User.init() inference > resolves user.save() via User.init(name:) inference
  • Swift cross-file User.init() inference > resolves user.greet() via User.init(name:) inference
  • Swift return type inference > detects User class and getUser function
  • Swift return type inference > detects save function on User (Swift class methods are Function nodes)
  • Swift return type inference > resolves user.save() to User#save via return type of getUser() -> User
  • Swift return-type inference via function return type > resolves user.save() to User#save via return type of getUser()
  • Swift return-type inference via function return type > user.save() does NOT resolve to Repo#save
  • Swift return-type inference via function return type > resolves repo.save() to Repo#save via return type of getRepo()

Unit:

  • PostToolUse with missing/corrupt meta.json > Plugin: emits stale when meta.json does not exist
  • PostToolUse with missing/corrupt meta.json > Plugin: emits stale when meta.json is corrupt
  • buildTypeEnv > known limitations (documented skip tests) > Ruby block parameter: users.each { |user| } — closure param inference, different feature

Code Coverage

Combined (Unit + Integration)

Metric Coverage Covered Base Delta Status
Statements 58.88% 6746/11457 47.27% 📈 +11.6 🟢 ███████████░░░░░░░░░
Branches 53.25% 4609/8654 42.26% 📈 +11.0 🟢 ██████████░░░░░░░░░░
Functions 57.12% 569/996 46.38% 📈 +10.7 🟢 ███████████░░░░░░░░░
Lines 60.6% 6016/9926 48.88% 📈 +11.7 🟢 ████████████░░░░░░░░
Coverage breakdown by test suite

Unit Tests

Metric Coverage Covered Base Delta Status
Statements 44.28% 5074/11457 47.27% 📉 -3.0 🔴 ████████░░░░░░░░░░░░
Branches 39.7% 3436/8654 42.26% 📉 -2.6 🔴 ███████░░░░░░░░░░░░░
Functions 42.46% 423/996 46.38% 📉 -3.9 🔴 ████████░░░░░░░░░░░░
Lines 45.65% 4532/9926 48.88% 📉 -3.2 🔴 █████████░░░░░░░░░░░

Integration Tests

Metric Coverage Covered Base Delta Status
Statements 46.75% 5357/11457 47.27% 📉 -0.5 🔴 █████████░░░░░░░░░░░
Branches 44.04% 3812/8654 42.26% 📈 +1.8 🟢 ████████░░░░░░░░░░░░
Functions 44.17% 440/996 46.38% 📉 -2.2 🔴 ████████░░░░░░░░░░░░
Lines 47.86% 4751/9926 48.88% 📉 -1.0 🔴 █████████░░░░░░░░░░░

📋 View full run · Generated by CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant