diff --git a/web/app/components/workflow/operator/zoom-in-out.tsx b/web/app/components/workflow/operator/zoom-in-out.tsx
index 5e1b9ef9d8..8d732df726 100644
--- a/web/app/components/workflow/operator/zoom-in-out.tsx
+++ b/web/app/components/workflow/operator/zoom-in-out.tsx
@@ -100,7 +100,7 @@ const ZoomInOut: FC = () => {
{parseFloat(`${zoom * 100}`).toFixed(0)}%
diff --git a/web/app/components/workflow/panel/record.tsx b/web/app/components/workflow/panel/record.tsx
index 1a5deb4707..ad5be474e7 100644
--- a/web/app/components/workflow/panel/record.tsx
+++ b/web/app/components/workflow/panel/record.tsx
@@ -1,23 +1,13 @@
import { memo } from 'react'
import Run from '../run'
import { useStore } from '../store'
-import { XClose } from '@/app/components/base/icons/src/vender/line/general'
const Record = () => {
- const { currentSequenceNumber, setCurrentSequenceNumber, workflowRunId, setWorkflowRunId } = useStore()
+ const { currentSequenceNumber, workflowRunId } = useStore()
return (
{`Test Run#${currentSequenceNumber}`}
-
{
- setWorkflowRunId('')
- setCurrentSequenceNumber(0)
- }}
- >
-
-
diff --git a/web/app/components/workflow/store.ts b/web/app/components/workflow/store.ts
index 524f135970..9c99ef812d 100644
--- a/web/app/components/workflow/store.ts
+++ b/web/app/components/workflow/store.ts
@@ -1,4 +1,5 @@
import { create } from 'zustand'
+import type { Viewport } from 'reactflow'
import type {
HelpLineHorizontalPosition,
HelpLineVerticalPosition,
@@ -9,7 +10,11 @@ import type {
ToolsMap,
} from './block-selector/types'
import { Mode } from './types'
-import type { WorkflowRunningStatus } from './types'
+import type {
+ Edge,
+ Node,
+ WorkflowRunningStatus,
+} from './types'
type State = {
mode: Mode
@@ -27,6 +32,11 @@ type State = {
runningStatus?: WorkflowRunningStatus
showInputsPanel: boolean
inputs: Record
+ backupDraft?: {
+ nodes: Node[]
+ edges: Edge[]
+ viewport: Viewport
+ }
}
type Action = {
@@ -45,6 +55,7 @@ type Action = {
setRunningStatus: (runningStatus?: WorkflowRunningStatus) => void
setShowInputsPanel: (showInputsPanel: boolean) => void
setInputs: (inputs: Record) => void
+ setBackupDraft: (backupDraft?: State['backupDraft']) => void
}
export const useStore = create(set => ({
@@ -78,4 +89,6 @@ export const useStore = create(set => ({
setShowInputsPanel: showInputsPanel => set(() => ({ showInputsPanel })),
inputs: {},
setInputs: inputs => set(() => ({ inputs })),
+ backupDraft: undefined,
+ setBackupDraft: backupDraft => set(() => ({ backupDraft })),
}))
diff --git a/web/app/components/workflow/types.ts b/web/app/components/workflow/types.ts
index 634f023c2c..cc2d031547 100644
--- a/web/app/components/workflow/types.ts
+++ b/web/app/components/workflow/types.ts
@@ -38,6 +38,7 @@ export type CommonNodeType = {
export type CommonEdgeType = {
_hovering: boolean
_connectedNodeIsHovering: boolean
+ _runned?: boolean
}
export type Node = ReactFlowNode>