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.

fix(dashboard): enable click and expand for all node types (function, class, etc.)

Lum1104b82efea88e11
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index c1d1868d..a4a7e1a9 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -9,7 +9,7 @@
{
"name": "understand-anything",
"description": "Multi-agent codebase analysis with interactive dashboard, guided tours, and skill commands",
- "version": "1.0.3",
+ "version": "1.0.4",
"source": "./understand-anything-plugin"
}
]
diff --git a/understand-anything-plugin/package.json b/understand-anything-plugin/package.json
index 0aa23769..3b632ae6 100644
--- a/understand-anything-plugin/package.json
+++ b/understand-anything-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@understand-anything/skill",
- "version": "1.0.3",
+ "version": "1.0.4",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
diff --git a/understand-anything-plugin/packages/dashboard/src/components/CustomNode.tsx b/understand-anything-plugin/packages/dashboard/src/components/CustomNode.tsx
index 57199e98..369105c9 100644
--- a/understand-anything-plugin/packages/dashboard/src/components/CustomNode.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/components/CustomNode.tsx
@@ -32,11 +32,13 @@ export interface CustomNodeData extends Record<string, unknown> {
searchScore?: number;
isSelected: boolean;
isTourHighlighted: boolean;
+ onNodeClick?: (nodeId: string) => void;
}
export type CustomFlowNode = Node<CustomNodeData, "custom">;
export default function CustomNode({
+ id,
data,
}: NodeProps<CustomFlowNode>) {
const barColor = typeColors[data.nodeType] ?? typeColors.file;
@@ -65,8 +67,9 @@ export default function CustomNode({
return (
<div
- className={`relative rounded-lg bg-elevated border border-border-subtle ${extraClass} min-w-[180px] max-w-[220px] overflow-hidden transition-all duration-200`}
+ className={`relative rounded-lg bg-elevated border border-border-subtle ${extraClass} min-w-[180px] max-w-[220px] overflow-hidden transition-all duration-200 cursor-pointer`}
style={{ boxShadow: '0 2px 8px rgba(0,0,0,0.3)' }}
+ onClick={() => data.onNodeClick?.(id)}
>
{/* Left color bar */}
<div
diff --git a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
index 762b1247..f5df2c88 100644
--- a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
@@ -31,6 +31,14 @@ export default function GraphView() {
const tourHighlightedNodeIds = useDashboardStore((s) => s.tourHighlightedNodeIds);
const persona = useDashboardStore((s) => s.persona);
+ const handleNodeSelect = useCallback(
+ (nodeId: string) => {
+ selectNode(nodeId);
+ openCodeViewer(nodeId);
+ },
+ [selectNode, openCodeViewer],
+ );
+
const { initialNodes, initialEdges } = useMemo(() => {
if (!graph)
return {
@@ -70,6 +78,7 @@ export default function GraphView() {
searchScore: matchResult?.score,
isSelected: selectedNodeId === node.id,
isTourHighlighted: tourHighlightedNodeIds.includes(node.id),
+ onNodeClick: handleNodeSelect,
},
};
});
@@ -181,7 +190,7 @@ export default function GraphView() {
];
return { initialNodes: allNodes, initialEdges: laid.edges };
- }, [graph, searchResults, selectedNodeId, showLayers, tourHighlightedNodeIds, persona]);
+ }, [graph, searchResults, selectedNodeId, showLayers, tourHighlightedNodeIds, persona, handleNodeSelect]);
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);
@@ -200,10 +209,7 @@ export default function GraphView() {
const isGroupNode = graph?.layers?.some((l) => l.id === node.id);
if (isGroupNode) return;
selectNode(node.id);
- const graphNode = graph?.nodes.find((n) => n.id === node.id);
- if (graphNode?.type === 'file') {
- openCodeViewer(node.id);
- }
+ openCodeViewer(node.id);
},
[selectNode, openCodeViewer, graph],
);