diff --git a/web/app/components/workflow/hooks/use-workflow.ts b/web/app/components/workflow/hooks/use-workflow.ts index c118fff96..ee3b6f1c9 100644 --- a/web/app/components/workflow/hooks/use-workflow.ts +++ b/web/app/components/workflow/hooks/use-workflow.ts @@ -19,7 +19,6 @@ import type { Viewport, } from 'reactflow' import { - changeNodesAndEdgesId, getLayoutByDagre, initialEdges, initialNodes, @@ -321,13 +320,13 @@ export const useWorkflow = () => { const renderTreeFromRecord = useCallback((nodes: Node[], edges: Edge[], viewport?: Viewport) => { const { setViewport } = reactflow - const [newNodes, newEdges] = changeNodesAndEdgesId(nodes, edges) + const nodesMap = nodes.map(node => ({ ...node, data: { ...node.data, selected: false } })) eventEmitter?.emit({ type: WORKFLOW_DATA_UPDATE, payload: { - nodes: initialNodes(newNodes, newEdges), - edges: initialEdges(newEdges, newNodes), + nodes: initialNodes(nodesMap, edges), + edges: initialEdges(edges, nodesMap), }, } as any) diff --git a/web/app/components/workflow/panel/index.tsx b/web/app/components/workflow/panel/index.tsx index fd2228532..386f62702 100644 --- a/web/app/components/workflow/panel/index.tsx +++ b/web/app/components/workflow/panel/index.tsx @@ -23,6 +23,7 @@ const Panel: FC = () => { const showInputsPanel = useStore(s => s.showInputsPanel) const workflowRunningData = useStore(s => s.workflowRunningData) const historyWorkflowData = useStore(s => s.historyWorkflowData) + const isRestoring = useStore(s => s.isRestoring) const { currentLogItem, setCurrentLogItem, showMessageLogModal, setShowMessageLogModal } = useAppStore(useShallow(state => ({ currentLogItem: state.currentLogItem, setCurrentLogItem: state.setCurrentLogItem, @@ -48,7 +49,7 @@ const Panel: FC = () => { ]) return ( -
+
{ showMessageLogModal && (