diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index c1d1868..a4a7e1a 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 0aa2376..3b632ae 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 57199e9..369105c 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 { searchScore?: number; isSelected: boolean; isTourHighlighted: boolean; + onNodeClick?: (nodeId: string) => void; } export type CustomFlowNode = Node; export default function CustomNode({ + id, data, }: NodeProps) { const barColor = typeColors[data.nodeType] ?? typeColors.file; @@ -65,8 +67,9 @@ export default function CustomNode({ return (
data.onNodeClick?.(id)} > {/* Left color bar */}
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], );