From 3d1feab5074f57fce742c8580af5330604eb36d1 Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 17 Nov 2025 18:00:12 -0800 Subject: [PATCH] improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 (#2036) * improvement(undo-redo): expand undo-redo store to store 100 ops instead of 15 * prevent undo-redo from interfering with subblock browser text undo --- .../sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | 1 + apps/sim/stores/undo-redo/store.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index 50b1e00ea1..03ab11d0a2 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -434,6 +434,7 @@ const WorkflowContent = React.memo(() => { activeElement?.hasAttribute('contenteditable') if (isEditableElement) { + event.stopPropagation() return } diff --git a/apps/sim/stores/undo-redo/store.ts b/apps/sim/stores/undo-redo/store.ts index 62afff627e..c57afbe2cc 100644 --- a/apps/sim/stores/undo-redo/store.ts +++ b/apps/sim/stores/undo-redo/store.ts @@ -13,7 +13,7 @@ import type { } from './types' const logger = createLogger('UndoRedoStore') -const DEFAULT_CAPACITY = 15 +const DEFAULT_CAPACITY = 100 function getStackKey(workflowId: string, userId: string): string { return `${workflowId}:${userId}`