From be88434e44a858cb15b28efd345e239c3253ec69 Mon Sep 17 00:00:00 2001 From: Twest2 Date: Sat, 13 Jun 2026 20:07:55 -0500 Subject: [PATCH] Prompt for a name and save before creating a manual snapshot Clicking Snapshot now opens a named-prompt dialog (matching the app's modal styling) and flushes the current step/guide first, so the snapshot reflects unsaved edits and is easy to identify later. --- app/renderer/editor.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/renderer/editor.js b/app/renderer/editor.js index bcea341..4d6c289 100644 --- a/app/renderer/editor.js +++ b/app/renderer/editor.js @@ -1219,7 +1219,15 @@ class GuideEditor { async createSnapshot() { if (!this.guideId) return; - await api.snapshots.create({ guideId: this.guideId, label: 'manual' }); + const label = await dialogs.promptText({ + title: 'Create snapshot', + label: 'Snapshot name', + placeholder: 'manual', + }); + if (label == null) return; + if (this.currentStep) await this.flushStep(); + if (this.guide) await this.flushGuide(); + await api.snapshots.create({ guideId: this.guideId, label: label.trim() || 'manual' }); this.onToast('Snapshot created.'); }