feat(dashboard): switch graph layout from Dagre to ELK #232
Reference in New Issue
Block a user
Delete Branch "feat/dashboard-elk-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Replace Dagre layout engine with ELK (Eclipse Layout Kernel) for workflow graph visualization.
Why
Dagre lacks edge label placement and orthogonal routing — condition labels overlap with nodes, edges cross messily.
Changes
Ref
N/A
LGTM — clean migration from Dagre to ELK. Good async layout pattern with cancellation, proper fitView handling, and the toggleExpanded batching fix is correct.
Minor notes (non-blocking):
.catch()in useEffect:computeLayout(parsed).then(...)has no error handler. If ELK throws, you get an unhandled promise rejection. Add.catch(() => { if (!cancelled) setLayout(EMPTY_LAYOUT); })or similar.as ConditionEdgeDatainbuildEdgewhen the object includeselkLabelX/elkLabelYnot in that type. Consider extendingConditionEdgeDatato include those fields.elkLabelX?: number | nulluses optional prop — per conventions, preferelkLabelX: number | nullwith explicit null.