Skip to content

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

perf(dashboard): skip diff overlay computation when diffMode is off

Lum11044161d3eba31b
diff --git a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
index 375a2314..1a57793d 100644
--- a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
@@ -89,10 +89,10 @@ export default function GraphView() {
};
});
- const diffNodeIds = new Set([...changedNodeIds, ...affectedNodeIds]);
+ const diffNodeIds = diffMode ? new Set([...changedNodeIds, ...affectedNodeIds]) : new Set<string>();
const flowEdges: Edge[] = filteredGraphEdges.map((edge, i) => {
- const sourceInDiff = diffNodeIds.has(edge.source);
- const targetInDiff = diffNodeIds.has(edge.target);
+ const sourceInDiff = diffMode && diffNodeIds.has(edge.source);
+ const targetInDiff = diffMode && diffNodeIds.has(edge.target);
const isImpacted = diffMode && (sourceInDiff || targetInDiff);
return {