From de1915e20f48de5e5abd827be30d543a0864cb7b Mon Sep 17 00:00:00 2001 From: ciregenz Date: Mon, 10 Aug 2026 10:17:32 -0700 Subject: [PATCH] [eric] updates: opting out of experimental builds offers the current stable even though it is a downgrade, so a tester is never stranded on a prerelease --- electron/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electron/main.js b/electron/main.js index 60c50905..da418508 100644 --- a/electron/main.js +++ b/electron/main.js @@ -3672,7 +3672,11 @@ ipcMain.handle('set-allow-prerelease', async (_e, value) => { // Built-in autoUpdater has no allowPrerelease; experimental channel on Windows is a TODO once we wire a separate Squirrel prerelease feed. if (isSquirrelUpdater) return { success: false, error: 'Experimental channel not yet supported on Windows Squirrel target' }; const next = Boolean(value); - if (autoUpdater.allowPrerelease === next) return { success: true, changed: false }; + // Opting OUT while running an experimental build must offer the CURRENT stable, which is a semver downgrade; without this a tester who flips the toggle off is stranded on the prerelease until the next stable overtakes it. + const wantDowngrade = !next && String(app.getVersion()).includes('-'); + const downgradeChanged = autoUpdater.allowDowngrade !== wantDowngrade; + autoUpdater.allowDowngrade = wantDowngrade; + if (autoUpdater.allowPrerelease === next && !downgradeChanged) return { success: true, changed: false }; autoUpdater.allowPrerelease = next; if (!isPackaged) return { success: true, changed: true }; try {