diff --git a/src/components/WorkflowCanvas.tsx b/src/components/WorkflowCanvas.tsx index efaf93b5..3964de56 100644 --- a/src/components/WorkflowCanvas.tsx +++ b/src/components/WorkflowCanvas.tsx @@ -2060,9 +2060,14 @@ export function WorkflowCanvas() { // Groups don't get floating headers if (node.type === "group") return null; - const nodeWidth = typeof node.style?.width === "number" - ? node.style.width - : (defaultNodeDimensions[node.type as NodeType]?.width ?? 250); + const styleW = node.style?.width; + const nodeWidth = + typeof styleW === "number" ? styleW + : typeof styleW === "string" ? parseFloat(styleW) || 0 + : 0; + const measuredWidth = (node.measured?.width) || 0; + const defaultWidth = defaultNodeDimensions[node.type as NodeType]?.width ?? 250; + const headerWidth = nodeWidth || measuredWidth || defaultWidth; return (