From c5ad910b04e27ba5a9b907d619c618a4b86ef542 Mon Sep 17 00:00:00 2001 From: Imran Farhat Date: Tue, 16 Jun 2026 12:53:52 +0530 Subject: [PATCH] fix: always call navigation callback after save, even if duplicate (Bug 15) Save-and-navigate dialogs shown when leaving the editor via Dashboard, Gallery, or Simulator nav links stayed open indefinitely if the saved content was unchanged since the last save (backend returns duplicate: true), with no feedback to the user. Root cause: the success handler only called the navigation callback (setVersions) when the response was not a duplicate: if (!res.data.duplicate) { setVersions(res.data.version, false, null) } This likely intended to skip creating a redundant version record, but it also skipped navigation entirely, leaving the user stuck with no indication that the save had already succeeded. Fix: always call setVersions regardless of duplicate status, so navigation proceeds whether or not a new version was created. --- eda-frontend/src/redux/actions/saveSchematicActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eda-frontend/src/redux/actions/saveSchematicActions.js b/eda-frontend/src/redux/actions/saveSchematicActions.js index 732c3e9dd..68e0de9e6 100644 --- a/eda-frontend/src/redux/actions/saveSchematicActions.js +++ b/eda-frontend/src/redux/actions/saveSchematicActions.js @@ -76,7 +76,7 @@ export const saveSchematic = (title, description, xml, base64, newBranch = false api .post('save', queryString.stringify(body), config) .then((res) => { - if (!res.data.duplicate) { setVersions(res.data.version, false, null) } + setVersions(res.data.version, false, null) dispatch({ type: actions.SET_SCH_SAVED, payload: res.data