From 58d3c5eebbe5783475150dc0697a57522a1f8f08 Mon Sep 17 00:00:00 2001 From: ramnique <30795890+ramnique@users.noreply.github.com> Date: Wed, 5 Feb 2025 16:49:48 +0530 Subject: [PATCH] autosave on undo/redo --- .../app/projects/[projectId]/workflow/workflow_editor.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx index db04437b..8ecbf0b8 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/workflow_editor.tsx @@ -149,6 +149,8 @@ function reducer(state: State, action: Action): State { const inverse = state.inversePatches[state.currentIndex - 1]; draft.present = applyPatches(state.present, inverse); draft.currentIndex--; + draft.present.pendingChanges = true; + draft.present.chatKey++; }); break; } @@ -158,7 +160,9 @@ function reducer(state: State, action: Action): State { const patch = state.patches[state.currentIndex]; draft.present = applyPatches(state.present, patch); draft.currentIndex++; - }); + draft.present.pendingChanges = true; + draft.present.chatKey++; + }); break; } case "update_workflow_name": {