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.

chore(dashboard): address Task 5 review minors

Lum110400a75c27dbb8
diff --git a/understand-anything-plugin/packages/dashboard/src/utils/elk-layout.ts b/understand-anything-plugin/packages/dashboard/src/utils/elk-layout.ts
index d5181f31..8bc9f862 100644
--- a/understand-anything-plugin/packages/dashboard/src/utils/elk-layout.ts
+++ b/understand-anything-plugin/packages/dashboard/src/utils/elk-layout.ts
@@ -1,10 +1,14 @@
import ELK from "elkjs/lib/elk.bundled.js";
import type { GraphIssue } from "@understand-anything/core/schema";
+import { NODE_WIDTH, NODE_HEIGHT } from "./layout";
export interface ElkChild {
id: string;
width?: number;
height?: number;
+ /** Set by ELK after layout; absent on input. Downstream consumers must default. */
+ x?: number;
+ y?: number;
children?: ElkChild[];
parentId?: string;
}
@@ -22,8 +26,11 @@ export interface ElkInput {
layoutOptions?: Record<string, string>;
}
-const DEFAULT_NODE_WIDTH = 280;
-const DEFAULT_NODE_HEIGHT = 120;
+// Keep ELK fallback dimensions in lockstep with the dagre/force NODE
+// dimensions in utils/layout.ts so layouts stay collision-consistent
+// during the migration.
+const DEFAULT_NODE_WIDTH = NODE_WIDTH;
+const DEFAULT_NODE_HEIGHT = NODE_HEIGHT;
interface RepairOptions {
strict?: boolean;