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): add const assertion, reset domain state in setGraph, add category comment

Lum110416f89c05b881
diff --git a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
index c3701a81..56f09867 100644
--- a/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
+++ b/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx
@@ -56,6 +56,7 @@ const NODE_TYPE_TO_CATEGORY: Record<NodeType, NodeCategory> = {
document: "docs",
service: "infra", resource: "infra", pipeline: "infra",
table: "data", endpoint: "data", schema: "data",
+ // Domain types — categorized as "code" for filtering purposes
domain: "code", flow: "code", step: "code",
} as const;
diff --git a/understand-anything-plugin/packages/dashboard/src/store.ts b/understand-anything-plugin/packages/dashboard/src/store.ts
index f4652066..737cbe26 100644
--- a/understand-anything-plugin/packages/dashboard/src/store.ts
+++ b/understand-anything-plugin/packages/dashboard/src/store.ts
@@ -33,7 +33,7 @@ export const EDGE_CATEGORY_MAP: Record<EdgeCategory, string[]> = {
semantic: ["related", "similar_to"],
};
-export const DOMAIN_EDGE_TYPES = ["contains_flow", "flow_step", "cross_domain"];
+export const DOMAIN_EDGE_TYPES = ["contains_flow", "flow_step", "cross_domain"] as const;
const DEFAULT_FILTERS: FilterState = {
nodeTypes: new Set<NodeType>(ALL_NODE_TYPES),
@@ -217,6 +217,9 @@ export const useDashboardStore = create<DashboardStore>()((set, get) => ({
selectedNodeId: null,
focusNodeId: null,
nodeHistory: [],
+ viewMode: "structural" as const,
+ domainGraph: null,
+ activeDomainId: null,
});
},