clear the stale unsaved-changes flag when a stack redeploy fails

This commit is contained in:
Jarek Krochmalski committed 2026-09-09 09:37:27 +05:30
1 parent 51bc928b39
commit 89d8be89c2
1 file changed
+6
+6
View File
@@ -1877,6 +1877,12 @@
throw new Error((typeof data.error === 'string' ? data.error : data.message) || 'Failed to save compose file');
}
if (data.success === false) {
// On the restart path the server persists the compose+env BEFORE deploying,
// so a success:false here is a failed DEPLOY, not a failed save -- the content
// is already on disk. Clear the dirty flag so the footer doesn't claim
// "Unsaved changes" for edits that were in fact saved; the deploy error still
// surfaces via the throw below. (Plain save keeps isDirty on a real save fail.)
if (restart) isDirty = false;
throw new Error(data.error || 'Failed to save compose file');
}