diff --git a/src/components/recovery/RecoveryDialog.vue b/src/components/recovery/RecoveryDialog.vue index 082e1060f..4bb46da03 100644 --- a/src/components/recovery/RecoveryDialog.vue +++ b/src/components/recovery/RecoveryDialog.vue @@ -57,6 +57,16 @@ onMounted(async () => { if (route.path !== '/') return try { snapshots.value = await listRecoverySnapshots() + // When embedded (e.g. the w4c Design Studio passes `?recover=auto`), + // restore every snapshot silently instead of showing the dialog, so + // unsaved work comes back on every open without an extra prompt. + const autoRestore = route.query.recover === 'auto' + if (autoRestore && snapshots.value.length > 0) { + for (const snapshot of [...snapshots.value]) { + await restore(snapshot) + } + return + } open.value = snapshots.value.length > 0 } catch (error) { console.warn('[Recovery] Failed to list snapshots:', error)