From b4636ddf44e28d040fe13850157e7550c96d8b07 Mon Sep 17 00:00:00 2001 From: hjlarry Date: Fri, 12 Sep 2025 15:34:41 +0800 Subject: [PATCH] add leader restore workflow --- web/app/components/workflow/header/header-in-restoring.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/header/header-in-restoring.tsx b/web/app/components/workflow/header/header-in-restoring.tsx index afa4e62099..f1a4194370 100644 --- a/web/app/components/workflow/header/header-in-restoring.tsx +++ b/web/app/components/workflow/header/header-in-restoring.tsx @@ -19,6 +19,7 @@ import RestoringTitle from './restoring-title' import Button from '@/app/components/base/button' import { useStore as useAppStore } from '@/app/components/app/store' import { useInvalidAllLastRun } from '@/service/use-workflow' +import { collaborationManager } from '../collaboration/core/collaboration-manager' export type HeaderInRestoringProps = { onRestoreSettled?: () => void @@ -58,6 +59,9 @@ const HeaderInRestoring = ({ type: 'success', message: t('workflow.versionHistory.action.restoreSuccess'), }) + // Notify other collaboration clients about the workflow restore + if (appDetail) + collaborationManager.emitWorkflowUpdate(appDetail.id) }, onError: () => { Toast.notify({ @@ -71,7 +75,7 @@ const HeaderInRestoring = ({ }) deleteAllInspectVars() invalidAllLastRun() - }, [setShowWorkflowVersionHistoryPanel, workflowStore, handleSyncWorkflowDraft, deleteAllInspectVars, invalidAllLastRun, t, onRestoreSettled]) + }, [setShowWorkflowVersionHistoryPanel, workflowStore, handleSyncWorkflowDraft, deleteAllInspectVars, invalidAllLastRun, t, onRestoreSettled, appDetail]) return ( <>