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.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
feat(dashboard): add FlowNode and StepNode components for domain view
Lum1104c6433c035245
diff --git a/understand-anything-plugin/packages/dashboard/src/components/FlowNode.tsx b/understand-anything-plugin/packages/dashboard/src/components/FlowNode.tsxnew file mode 100644index 00000000..f9ed10ae--- /dev/null+++ b/understand-anything-plugin/packages/dashboard/src/components/FlowNode.tsx@@ -0,0 +1,52 @@+import { memo } from "react";+import { Handle, Position } from "@xyflow/react";+import type { Node, NodeProps } from "@xyflow/react";+import { useDashboardStore } from "../store";++export interface FlowNodeData extends Record<string, unknown> {+ label: string;+ summary: string;+ entryPoint?: string;+ entryType?: string;+ stepCount: number;+ flowId: string;+}++export type FlowFlowNode = Node<FlowNodeData, "flow-node">;++function FlowNode({ data }: NodeProps<FlowFlowNode>) {+ const selectNode = useDashboardStore((s) => s.selectNode);+ const selectedNodeId = useDashboardStore((s) => s.selectedNodeId);+ const isSelected = selectedNodeId === data.flowId;++ return (+ <div+ className={`rounded-lg border px-4 py-3 min-w-[240px] max-w-[320px] cursor-pointer transition-all ${+ isSelected+ ? "border-accent bg-accent/10"+ : "border-border-medium bg-surface hover:border-accent/50"+ }`}+ onClick={() => selectNode(data.flowId)}+ >+ <Handle type="target" position={Position.Left} className="!bg-accent/60 !w-2 !h-2" />+ <Handle type="source" position={Position.Right} className="!bg-accent/60 !w-2 !h-2" />++ {data.entryPoint && (+ <div className="text-[9px] font-mono text-accent/70 mb-1 truncate">+ {data.entryPoint}+ </div>+ )}+ <div className="text-xs font-semibold text-text-primary mb-1 truncate">+ {data.label}+ </div>+ <div className="text-[10px] text-text-secondary line-clamp-2">+ {data.summary}+ </div>+ <div className="text-[9px] text-text-muted mt-1">+ {data.stepCount} step{data.stepCount !== 1 ? "s" : ""}+ </div>+ </div>+ );+}++export default memo(FlowNode);diff --git a/understand-anything-plugin/packages/dashboard/src/components/StepNode.tsx b/understand-anything-plugin/packages/dashboard/src/components/StepNode.tsxnew file mode 100644index 00000000..0fef093d--- /dev/null+++ b/understand-anything-plugin/packages/dashboard/src/components/StepNode.tsx@@ -0,0 +1,53 @@+import { memo } from "react";+import { Handle, Position } from "@xyflow/react";+import type { Node, NodeProps } from "@xyflow/react";+import { useDashboardStore } from "../store";++export interface StepNodeData extends Record<string, unknown> {+ label: string;+ summary: string;+ filePath?: string;+ stepId: string;+ order: number;+}++export type StepFlowNode = Node<StepNodeData, "step-node">;++function StepNode({ data }: NodeProps<StepFlowNode>) {+ const selectNode = useDashboardStore((s) => s.selectNode);+ const selectedNodeId = useDashboardStore((s) => s.selectedNodeId);+ const isSelected = selectedNodeId === data.stepId;++ return (+ <div+ className={`rounded-lg border px-3 py-2.5 min-w-[180px] max-w-[240px] cursor-pointer transition-all ${+ isSelected+ ? "border-accent bg-accent/10"+ : "border-border-subtle bg-elevated hover:border-accent/40"+ }`}+ onClick={() => selectNode(data.stepId)}+ >+ <Handle type="target" position={Position.Left} className="!bg-text-muted/40 !w-1.5 !h-1.5" />+ <Handle type="source" position={Position.Right} className="!bg-text-muted/40 !w-1.5 !h-1.5" />++ <div className="flex items-center gap-1.5 mb-1">+ <span className="text-[9px] font-mono text-accent/60 shrink-0">+ {data.order}+ </span>+ <span className="text-[11px] font-medium text-text-primary truncate">+ {data.label}+ </span>+ </div>+ <div className="text-[10px] text-text-secondary line-clamp-2">+ {data.summary}+ </div>+ {data.filePath && (+ <div className="text-[9px] font-mono text-text-muted mt-1 truncate">+ {data.filePath}+ </div>+ )}+ </div>+ );+}++export default memo(StepNode);