Skip to content

Commit aceeab4

Browse files
fix electron alpha migration confirmation (anomalyco#1591)
1 parent 7cdc56c commit aceeab4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/app/src/react-app/domains/settings/state/debug-view-model.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const STARTUP_PREFERENCE_KEY = "openwork.startupPreference";
4949
const ENGINE_SOURCE_KEY = "openwork.engineSource";
5050
const ENGINE_CUSTOM_BIN_KEY = "openwork.engineCustomBinPath";
5151
const OPENCODE_ENABLE_EXA_KEY = "openwork.opencodeEnableExa";
52-
const ELECTRON_INSTALL_CONFIRM_PHRASE = "install electron alpha";
5352

5453
type ResetModalMode = "onboarding" | "all";
5554

@@ -546,11 +545,12 @@ export function useDebugViewModel(options: UseDebugViewModelOptions) {
546545
);
547546
if (!confirmed) return;
548547

549-
const phrase =
550-
typeof window === "undefined"
551-
? ELECTRON_INSTALL_CONFIRM_PHRASE
552-
: window.prompt(`Type \"${ELECTRON_INSTALL_CONFIRM_PHRASE}\" to start the Electron alpha install handoff.`);
553-
if (phrase !== ELECTRON_INSTALL_CONFIRM_PHRASE) {
548+
const doubleConfirmed =
549+
typeof window === "undefined" ||
550+
window.confirm(
551+
"Final confirmation: quit Tauri and start installing the resolved Electron alpha now? The current app bundle will be moved to OpenWork.app.migrate-bak before replacement.",
552+
);
553+
if (!doubleConfirmed) {
554554
setElectronMigrationStatus("Install handoff cancelled before any app replacement step.");
555555
return;
556556
}

0 commit comments

Comments
 (0)