Prompt for a name and save before creating a manual snapshot
Template tests / tests (push) Successful in 1m38s
Template tests / tests (pull_request) Successful in 1m42s

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.
This commit is contained in:
2026-06-13 20:07:55 -05:00
parent 1776089c08
commit be88434e44
+9 -1
View File
@@ -1219,7 +1219,15 @@ class GuideEditor {
async createSnapshot() { async createSnapshot() {
if (!this.guideId) return; 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.'); this.onToast('Snapshot created.');
} }