diff --git a/dashboard/src/components/BlueprintFlow/FlowNodeRenderer.tsx b/dashboard/src/components/BlueprintFlow/FlowNodeRenderer.tsx index 10e93b87..a0ecf045 100644 --- a/dashboard/src/components/BlueprintFlow/FlowNodeRenderer.tsx +++ b/dashboard/src/components/BlueprintFlow/FlowNodeRenderer.tsx @@ -220,8 +220,7 @@ export default function FlowNodeRenderer({ ? truncateDescription(node.description) : node.description, }; - const isReadOnly = - isCompleteNode || (!onAdd && !onEdit && !onSwapBranch && !onDelete); + const isReadOnly = !onAdd && !onEdit && !onSwapBranch && !onDelete; const [contextMenu, setContextMenu] = useState<{ mouseX: number; mouseY: number; @@ -355,7 +354,7 @@ export default function FlowNodeRenderer({ {!isReadOnly && ( <> - {!isLocked && ( + {!isLocked && !isCompleteNode && ( )} - {onEdit && ( + {onEdit && !isCompleteNode && ( )} - {canAddChild && ( + {canAddChild && !isCompleteNode && ( )} - {onPin && canPin && ( + {onPin && canPin && !isCompleteNode && ( theme.zIndex.modal + 3 }} slotProps={{ paper: { sx: { minWidth: 180 } } }} > - {canAddChild && ( + {canAddChild && !isCompleteNode && ( { handleAddClick(e); @@ -449,7 +448,7 @@ export default function FlowNodeRenderer({ Edit node )} - {onToggleForce && !isLocked && ( + {onToggleForce && !isLocked && !isCompleteNode && ( { handleToggleForceClick(e); diff --git a/dashboard/src/components/NodeEditor/NodeEditorDrawer.tsx b/dashboard/src/components/NodeEditor/NodeEditorDrawer.tsx index e66e24b7..de988148 100644 --- a/dashboard/src/components/NodeEditor/NodeEditorDrawer.tsx +++ b/dashboard/src/components/NodeEditor/NodeEditorDrawer.tsx @@ -73,6 +73,7 @@ const NodeEditorDrawer = ({ handoffTargetBlueprintId = "", setHandoffTargetBlueprintId, availableAgentBlueprints = [], + isCompleteNode = false, }: { parameters?: Record; onParametersChange?: (parameters: Record) => void; @@ -212,6 +213,7 @@ const NodeEditorDrawer = ({ handoffTargetBlueprintId?: string; setHandoffTargetBlueprintId?: (id: string) => void; availableAgentBlueprints?: Array<{ id: string; title: string }>; + isCompleteNode?: boolean; }) => { const theme = useTheme(); const [integrationPage, setIntegrationPage] = useState(1); @@ -808,6 +810,43 @@ const NodeEditorDrawer = ({ ); + const completeNodeFields = ( + + setNewNodeLabel(e.target.value)} + autoComplete="off" + inputProps={{ + "data-cy": "node-label-input", + autoComplete: "off", + autoCorrect: "off", + spellCheck: false, + }} + sx={{ mt: 1 }} + /> + + setNewNodeDescription?.(e.target.value)} + placeholder={descriptionPlaceholder} + autoComplete="off" + inputProps={{ + autoComplete: "off", + autoCorrect: "off", + spellCheck: false, + }} + /> + + ); + const paramsFields = ( {usesIntegration && selectedIntegration?.id && onParametersChange ? ( @@ -879,26 +918,34 @@ const NodeEditorDrawer = ({ height: "100%", }} > - setActiveTab(value)} - sx={{ mb: 2, borderBottom: 1, borderColor: "divider" }} - > - - - - + {!isCompleteNode && ( + setActiveTab(value)} + sx={{ mb: 2, borderBottom: 1, borderColor: "divider" }} + > + + + + + )} - - {nodeFields} - - - {detailsFields} - - - {paramsFields} - + {isCompleteNode ? ( + completeNodeFields + ) : ( + <> + + {nodeFields} + + + {detailsFields} + + + {paramsFields} + + + )} setNodeEditor((p) => ({ ...p, instructions: v })) } + newNodeDescription={nodeEditor.description} + setNewNodeDescription={(v: string) => + setNodeEditor((p) => ({ ...p, description: v })) + } newNodePseudocodeEnabled={nodeEditor.pseudocodeEnabled} setNewNodePseudocodeEnabled={handlePseudocodeEnabledChange} newNodeType={nodeEditor.nodeType} diff --git a/dashboard/src/widgets/APITab/types.ts b/dashboard/src/widgets/APITab/types.ts index 907a9ad6..4bcdfe49 100644 --- a/dashboard/src/widgets/APITab/types.ts +++ b/dashboard/src/widgets/APITab/types.ts @@ -46,6 +46,7 @@ export type NodeEditorState = { } | null; editingNodeId: string | null; label: string; + description: string; instructions: string; pseudocodeEnabled: boolean; pseudocode: string; diff --git a/dashboard/src/widgets/NodeEditorWidget/NodeEditorWidget.tsx b/dashboard/src/widgets/NodeEditorWidget/NodeEditorWidget.tsx index b9771eab..bb987d9d 100644 --- a/dashboard/src/widgets/NodeEditorWidget/NodeEditorWidget.tsx +++ b/dashboard/src/widgets/NodeEditorWidget/NodeEditorWidget.tsx @@ -263,8 +263,14 @@ const NodeEditorWidget = ({ ]) ); + const isCompleteNode = + editMode && + (editingNode?.action || editingNode?.raw?.properties?.action) === + "PLATFORM:complete"; + return (