Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(updater): automatic updates setting replaces the update-available popup (#2120)

Gabriel Stein958c106ce349
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8d81f632..65d9c201e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Changed
+
+- **Automatic updates replace the update popup.** A new Automatic updates toggle under Settings → System downloads updates in the background and installs them when the app next quits. It is on for new installs; existing installs keep today's flow until they opt in: the app still checks for updates, and the sidebar Update Available button and Settings → System let you download and install by hand. The update-available popup window and the App updates notification toggle are gone. On Linux the toggle and the check only appear for AppImage installs, since deb, rpm and tar.gz packages are updated by the package manager.
+
+### Fixed
+
+- **Back to notes works in narrow windows.** The button only handled meeting mode, so with a note open in a narrow window it did nothing. It now returns to the notes list.
+- **No more update error popups.** A failed background update check used to raise a modal the next time Settings opened, and a destructive toast in the control panel. Background failures are now silent and retried on the next check; only a manual Check for Updates reports its own failure inline.
+- **Smoother notification swipe.** The meeting notification card follows your pointer, fades as it goes, and leaves through the edge you dragged it toward. The window no longer shows scrollbars mid-animation, and on macOS it now sits above every other window, including OpenWhispr's own floating panels.
+
## [1.10.0] - 2026-09-10
Managed enterprise speech-to-text arrives for workspaces on Azure OpenAI or AI Foundry: a deployment an administrator distributes to every member, with no API keys on user machines. Transcription also gains streaming from Deepgram, AssemblyAI and Gemini Live, Cohere Transcribe as a local engine, and gpt-transcribe as the OpenAI default now that whisper-1 and the gpt-4o transcribe models are on their way out. Onboarding was rebuilt to preserve progress, Insights gains an opt-in leaderboard, and Astra and Fable 5.1 join the reasoning models.
diff --git a/preload.js b/preload.js
index bc8245c07..c0a5d0275 100644
--- a/preload.js
+++ b/preload.js
@@ -563,6 +563,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
markBundleMigrationDismissed: () => ipcRenderer.invoke("mark-bundle-migration-dismissed"),
getUpdateStatus: () => ipcRenderer.invoke("get-update-status"),
getUpdateInfo: () => ipcRenderer.invoke("get-update-info"),
+ setAutoUpdatesEnabled: (enabled) => ipcRenderer.invoke("set-auto-updates-enabled", enabled),
// Update event listeners
onUpdateAvailable: registerListener("update-available"),
@@ -1349,12 +1350,4 @@ contextBridge.exposeInMainWorld("electronAPI", {
"note-navigation-pending",
(callback) => () => callback()
),
-
- onUpdateNotificationData: registerListener(
- "update-notification-data",
- (callback) => (_event, data) => callback(data)
- ),
- getUpdateNotificationData: () => ipcRenderer.invoke("get-update-notification-data"),
- updateNotificationReady: () => ipcRenderer.invoke("update-notification-ready"),
- updateNotificationRespond: (action) => ipcRenderer.invoke("update-notification-respond", action),
});
diff --git a/src/AppRouter.jsx b/src/AppRouter.jsx
index 56949fdb5..23cd1173c 100644
--- a/src/AppRouter.jsx
+++ b/src/AppRouter.jsx
@@ -4,7 +4,6 @@ import App from "./App.jsx";
import AgentDictationPillOverlay from "./components/dictation/AgentDictationPillOverlay.tsx";
import MeetingNotificationOverlay from "./components/MeetingNotificationOverlay.tsx";
import ReauthenticationScreen from "./components/ReauthenticationScreen.tsx";
-import UpdateNotificationOverlay from "./components/UpdateNotificationOverlay.tsx";
import BackgroundModelDownloadTray from "./components/onboarding/BackgroundModelDownloadTray.tsx";
import { LEGACY_ONBOARDING_STEP_KEY, ONBOARDING_SESSION_KEY } from "./components/onboarding/flow";
import { useAuth } from "./hooks/useAuth";
@@ -33,10 +32,6 @@ export default function AppRouter() {
return <MeetingNotificationOverlay />;
}
- if (params.includes("update-notification=true")) {
- return <UpdateNotificationOverlay />;
- }
-
if (params.includes("agent-dictation-pill=true")) {
return <AgentDictationPillOverlay />;
}
diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx
index 44669d282..b600441ec 100644
--- a/src/components/ControlPanel.tsx
+++ b/src/components/ControlPanel.tsx
@@ -164,7 +164,6 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
() => localStorage.getItem("gpuBannerDismissedUnified") === "true"
);
const updateReadyToastShown = useRef(false);
- const updateErrorToastShown = useRef<Error | null>(null);
const { hotkey } = useHotkey();
const { toast } = useToast();
const { useCleanupModel } = useSettings();
@@ -190,7 +189,6 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
isInstalling,
downloadUpdate,
installUpdate,
- error: updateError,
} = useUpdater();
const agentAllowedByPolicy = usePolicyStore(isAgentAllowed);
@@ -327,20 +325,6 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
}
}, [updateStatus.updateDownloaded, isDownloading, toast, t]);
- useEffect(() => {
- if (updateError && updateError !== updateErrorToastShown.current) {
- updateErrorToastShown.current = updateError;
- toast({
- title: t("controlPanel.update.problemTitle"),
- description: t("controlPanel.update.problemDescription"),
- variant: "destructive",
- });
- }
- if (!updateError) {
- updateErrorToastShown.current = null;
- }
- }, [updateError, toast, t]);
-
useEffect(() => {
const dispose = window.electronAPI?.onLimitReached?.(
(data: { wordsUsed: number; limit: number }) => {
@@ -473,9 +457,12 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
[]
);
- const handleExitMeetingMode = useCallback(() => {
- window.electronAPI?.restoreFromMeetingMode?.();
- }, []);
+ // The side-panel layout is shared by meeting mode and by a note opened in a
+ // narrow window, so leaving it means different things in each case.
+ const handleExitSidePanel = useCallback(() => {
+ if (isMeetingMode) window.electronAPI?.restoreFromMeetingMode?.();
+ else setActiveNoteId(null);
+ }, [isMeetingMode]);
const copyToClipboard = useCallback(
async (text: string) => {
@@ -1031,7 +1018,7 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelPro
<Button
variant="outline-flat"
size="sm"
- onClick={handleExitMeetingMode}
+ onClick={handleExitSidePanel}
className="h-7 px-2.5 ps-1.5 gap-1"
>
<ChevronLeft size={14} strokeWidth={1.8} className="rtl:rotate-180" />
diff --git a/src/components/MeetingNotificationOverlay.tsx b/src/components/MeetingNotificationOverlay.tsx
index 23e7b7f2d..9ae981c29 100644
--- a/src/components/MeetingNotificationOverlay.tsx
+++ b/src/components/MeetingNotificationOverlay.tsx
@@ -3,6 +3,7 @@ import {
useEffect,
useRef,
useState,
+ type CSSProperties,
type PointerEvent as ReactPointerEvent,
type ReactElement,
} from "react";
@@ -22,12 +23,20 @@ interface PointerSwipe {
startX: number;
}
+// Distance over which a dragged card fades to its minimum opacity.
+const SWIPE_FADE_DISTANCE_PX = 240;
+const SWIPE_MIN_OPACITY = 0.4;
+
export default function MeetingNotificationOverlay(): ReactElement {
const { t } = useTranslation();
const [data, setData] = useState<MeetingNotificationData | null>(null);
const [isVisible, setIsVisible] = useState(false);
const [isHovered, setIsHovered] = useState(false);
const [secondsRemaining, setSecondsRemaining] = useState(0);
+ // Live pointer offset while swiping; null when the card is at rest.
+ const [dragX, setDragX] = useState<number | null>(null);
+ // Which edge the card leaves through: +1 right (also the enter side), -1 left.
+ const [exitDirection, setExitDirection] = useState<1 | -1>(1);
const pointerSwipeRef = useRef<PointerSwipe | null>(null);
useEffect(() => {
@@ -114,6 +123,12 @@ export default function MeetingNotificationOverlay(): ReactElement {
[isVisible, presentation.dismissible]
);
+ const handlePointerMove = useCallback((event: ReactPointerEvent<HTMLDivElement>): void => {
+ const swipe = pointerSwipeRef.current;
+ if (!swipe || swipe.pointerId !== event.pointerId) return;
+ setDragX(event.clientX - swipe.startX);
+ }, []);
+
const handlePointerUp = useCallback(
(event: ReactPointerEvent<HTMLDivElement>): void => {
const swipe = pointerSwipeRef.current;
@@ -124,14 +139,15 @@ export default function MeetingNotificationOverlay(): ReactElement {
event.currentTarget.releasePointerCapture(event.pointerId);
}
+ const distance = event.clientX - swipe.startX;
+ // Releasing dragX re-enables the transition, so the card either springs
+ // back to rest or continues off-screen the way it was already moving.
+ setDragX(null);
+
// The card may have been replaced mid-drag, so the dismissibility of the
// card being released is what decides, not the one the swipe started on.
- if (
- shouldDismissMeetingNotificationSwipe(
- presentation.dismissible,
- event.clientX - swipe.startX
- )
- ) {
+ if (shouldDismissMeetingNotificationSwipe(presentation.dismissible, distance)) {
+ setExitDirection(distance < 0 ? -1 : 1);
dismiss();
} else if (!isHovered) {
window.electronAPI?.setNotificationInteractivity?.(false);
@@ -144,6 +160,7 @@ export default function MeetingNotificationOverlay(): ReactElement {
(event: ReactPointerEvent<HTMLDivElement>): void => {
if (pointerSwipeRef.current?.pointerId !== event.pointerId) return;
pointerSwipeRef.current = null;
+ setDragX(null);
if (!isHovered) window.electronAPI?.setNotificationInteractivity?.(false);
},
[isHovered]
@@ -159,31 +176,47 @@ export default function MeetingNotificationOverlay(): ReactElement {
? () => void respondToAutoEnd("restart")
: () => respond(presentation.action);
+ const isDragging = dragX !== null;
+ const motionStyle: CSSProperties = isDragging
+ ? {
+ transform: `translateX(${dragX}px)`,
+ opacity: Math.max(
+ SWIPE_MIN_OPACITY,
+ 1 - (Math.abs(dragX) / SWIPE_FADE_DISTANCE_PX) * (1 - SWIPE_MIN_OPACITY)
+ ),
+ }
+ : isVisible
+ ? { transform: "translateX(0) scale(1)", opacity: 1 }
+ : { transform: `translateX(${exitDirection * 120}%) scale(0.95)`, opacity: 0 };
+
return (
<div
- className="meeting-notification-window w-full h-full bg-transparent p-3"
+ className="meeting-notification-window w-full h-full bg-transparent p-3 select-none"
style={{ touchAction: presentation.dismissible ? "pan-y" : "auto" }}
onPointerDown={handlePointerDown}
+ onPointerMove={handlePointerMove}
onPointerUp={handlePointerUp}
onPointerCancel={handlePointerCancel}
>
- <MeetingNotificationCard
- title={title}
- body={body}
- startLabel={t(presentation.actionKey)}
- onStart={handleAction}
- onDismiss={presentation.dismissible ? dismiss : undefined}
- closeVisible={isHovered}
- allowTitleWrap={presentation.allowTitleWrap}
- onMouseEnter={handleMouseEnter}
- onMouseLeave={handleMouseLeave}
+ <div
className={[
- "transition-all duration-300 ease-out",
- isVisible
- ? "translate-x-0 opacity-100 scale-100"
- : "translate-x-[120%] opacity-0 scale-95",
+ "will-change-transform",
+ isDragging ? "" : "transition-[transform,opacity] duration-300 ease-out",
].join(" ")}
- />
+ style={motionStyle}
+ >
+ <MeetingNotificationCard
+ title={title}
+ body={body}
+ startLabel={t(presentation.actionKey)}
+ onStart={handleAction}
+ onDismiss={presentation.dismissible ? dismiss : undefined}
+ closeVisible={isHovered}
+ allowTitleWrap={presentation.allowTitleWrap}
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
+ />
+ </div>
</div>
);
}
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsx
index d6efa1655..f0abd3647 100644
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@ -1235,8 +1235,8 @@ export default function SettingsPage({
setNotifyMeetingDetection,
notifyCalendarReminders,
setNotifyCalendarReminders,
- notifyUpdates,
- setNotifyUpdates,
+ autoUpdatesEnabled,
+ setAutoUpdatesEnabled,
audioCuesEnabled,
setAudioCuesEnabled,
pauseMediaOnDictation,
@@ -1340,8 +1340,6 @@ export default function SettingsPage({
downloadUpdate,
installUpdate: installUpdateAction,
getAppVersion,
- error: updateError,
- clearError: clearUpdateError,
} = useUpdater();
const isUpdateAvailable =
@@ -1614,9 +1612,8 @@ export default function SettingsPage({
notificationsEnabled,
notifyMeetingDetection,
notifyCalendarReminders,
- notifyUpdates,
});
- }, [notificationsEnabled, notifyMeetingDetection, notifyCalendarReminders, notifyUpdates]);
+ }, [notificationsEnabled, notifyMeetingDetection, notifyCalendarReminders]);
const handleAutoStartChange = async (enabled: boolean) => {
if (!window.electronAPI?.setAutoStartEnabled) return;
@@ -1720,16 +1717,6 @@ export default function SettingsPage({
return () => cleanup?.();
}, [toast, t, setActivationMode]);
- useEffect(() => {
- if (updateError) {
- showAlertDialog({
- title: t("settingsPage.general.updates.dialogs.updateError.title"),
- description: t("settingsPage.general.updates.dialogs.updateError.description"),
- });
- clearUpdateError();
- }
- }, [updateError, showAlertDialog, clearUpdateError, t]);
-
useEffect(() => {
if (installInitiated) {
if (installTimeoutRef.current) {
@@ -3170,18 +3157,6 @@ export default function SettingsPage({
/>
</SettingsRow>
</SettingsPanelRow>
- <SettingsPanelRow>
- <SettingsRow
- label={t("settingsPage.general.notifications.updates")}
- description={t("settingsPage.general.notifications.updatesDescription")}
- >
- <Toggle
- checked={notifyUpdates}
- onChange={setNotifyUpdates}
- disabled={!notificationsEnabled}
- />
- </SettingsRow>
- </SettingsPanelRow>
</SettingsPanel>
</div>
@@ -4570,9 +4545,11 @@ EOF`,
description={
updateStatus.isDevelopment
? t("settingsPage.general.updates.devMode")
- : isUpdateAvailable
- ? t("settingsPage.general.updates.newVersionAvailable")
- : t("settingsPage.general.updates.latestVersion")
+ : !updateStatus.isSupported
+ ? t("settingsPage.general.updates.managedByPackageManager")
+ : isUpdateAvailable
+ ? t("settingsPage.general.updates.newVersionAvailable")
+ : t("settingsPage.general.updates.latestVersion")
}
>
<div className="flex items-center gap-2.5">
@@ -4599,6 +4576,17 @@ EOF`,
</SettingsRow>
</SettingsPanelRow>
+ {updateStatus.isSupported && (
+ <SettingsPanelRow>
+ <SettingsRow
+ label={t("settingsPage.general.updates.automaticUpdates")}
+ description={t("settingsPage.general.updates.automaticUpdatesDescription")}
+ >
+ <Toggle checked={autoUpdatesEnabled} onChange={setAutoUpdatesEnabled} />
+ </SettingsRow>
+ </SettingsPanelRow>
+ )}
+
<SettingsPanelRow>
<div className="space-y-2.5">
<Button
@@ -4613,9 +4601,20 @@ EOF`,
),
});
}
- } catch {}
+ } catch {
+ showAlertDialog({
+ title: t("settingsPage.general.updates.dialogs.checkFailed.title"),
+ description: t(
+ "settingsPage.general.updates.dialogs.checkFailed.description"
+ ),
+ });
+ }
}}
- disabled={checkingForUpdates || updateStatus.isDevelopment}
+ disabled={
+ checkingForUpdates ||
+ updateStatus.isDevelopment ||
+ !updateStatus.isSupported
+ }
variant="outline"
className="w-full"
size="sm"
diff --git a/src/components/UpdateNotificationOverlay.tsx b/src/components/UpdateNotificationOverlay.tsx
deleted file mode 100644
index 59a4a8b9b..000000000
--- a/src/components/UpdateNotificationOverlay.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import { useState, useEffect, useCallback } from "react";
-import { useTranslation } from "react-i18next";
-import { X } from "./icons";
-
-interface UpdateNotificationData {
- version: string;
- releaseDate?: string;
-}
-
-export default function UpdateNotificationOverlay() {
- const { t } = useTranslation();
- const [data, setData] = useState<UpdateNotificationData | null>(null);
- const [isVisible, setIsVisible] = useState(false);
- const [isHovered, setIsHovered] = useState(false);
-
- useEffect(() => {
- let shown = false;
-
- const show = (d: UpdateNotificationData) => {
- if (shown) return;
- shown = true;
- setData(d);
- setTimeout(() => {
- setIsVisible(true);
- window.electronAPI?.updateNotificationReady?.();
- }, 50);
- };
-
- const cleanup = window.electronAPI?.onUpdateNotificationData?.(
- (incoming: UpdateNotificationData) => show(incoming)
- );
-
- window.electronAPI
- ?.getUpdateNotificationData?.()
- .then((pulled: UpdateNotificationData | null) => {
- if (pulled) show(pulled);
- });
-
- return () => cleanup?.();
- }, []);
-
- const respond = useCallback(
- async (action: string) => {
- if (!data) return;
- setIsVisible(false);
- await new Promise((r) => setTimeout(r, 200));
- window.electronAPI?.updateNotificationRespond?.(action);
- },
- [data]
- );
-
- return (
- <div className="meeting-notification-window w-full h-full bg-transparent p-3">
- <div
- className={[
- "relative",
- "bg-card/95 dark:bg-surface-2/95 backdrop-blur-xl",
- "border border-border/40 dark:border-border-subtle/40",
- "rounded-xl shadow-lg p-2.5",
- "transition-all duration-300 ease-out",
- isVisible
- ? "translate-x-0 opacity-100 scale-100"
- : "translate-x-[120%] opacity-0 scale-95",
- ].join(" ")}
- onMouseEnter={() => setIsHovered(true)}
- onMouseLeave={() => setIsHovered(false)}
- >
- <button
- onClick={() => respond("dismiss")}
- className={[
- "absolute -left-2.5 -top-2.5 z-10 size-6 rounded-full",
- "flex items-center justify-center",
- "bg-card dark:bg-surface-2 border border-border/40 dark:border-border-subtle/40 shadow-sm",
- "text-muted-foreground/70 hover:text-foreground hover:bg-muted",
- "transition-all duration-150",
- isHovered ? "opacity-100 scale-100" : "opacity-0 scale-75 pointer-events-none",
- ].join(" ")}
- >
- <X className="size-3" />
- </button>
-
- <div className="flex items-center gap-2.5">
- <div className="shrink-0 bg-primary/10 rounded-md p-1">
- <svg viewBox="0 0 1024 1024" className="w-4.5 h-4.5">
- <rect width="1024" height="1024" rx="241" fill="#2056DF" />
- <circle cx="512" cy="512" r="314" fill="#2056DF" stroke="white" strokeWidth="74" />
- <path d="M512 383V641" stroke="white" strokeWidth="74" strokeLinecap="round" />
- <path d="M627 457V568" stroke="white" strokeWidth="74" strokeLinecap="round" />
- <path d="M397 457V568" stroke="white" strokeWidth="74" strokeLinecap="round" />
- </svg>
- </div>
-
- <div className="flex-1 min-w-0">
- <p className="text-[12px] font-semibold text-foreground leading-tight truncate">
- {t("updateNotification.title")}
- </p>
- <p className="text-[11px] text-muted-foreground leading-tight mt-0.5">
- {t("updateNotification.body", { version: data?.version ?? "" })}
- </p>
- </div>
-
- <button
- onClick={() => respond("update")}
- className="shrink-0 bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 text-[11px] font-medium px-2.5 py-1 rounded-md transition-colors"
- >
- {t("updateNotification.cta")}
- </button>
- </div>
- </div>
- </div>
- );
-}
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index 5ef6682d5..10ab0a155 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -10181,6 +10181,11 @@ class IPCHandlers {
return this.updateManager.getUpdateInfo();
});
+ ipcMain.handle("set-auto-updates-enabled", async (_event, enabled) => {
+ this.updateManager.setAutoUpdatesEnabled(enabled === true);
+ return { success: true };
+ });
+
const fetchStreamingToken = async (event) => {
const apiUrl = getApiUrl();
if (!apiUrl) {
@@ -11248,7 +11253,6 @@ class IPCHandlers {
"notificationsEnabled",
"notifyMeetingDetection",
"notifyCalendarReminders",
- "notifyUpdates",
]);
ipcMain.handle("sync-notification-preferences", async (_event, prefs) => {
@@ -11362,26 +11366,6 @@ class IPCHandlers {
this.windowManager?.showNotificationWindow(event.sender);
});
- ipcMain.handle("get-update-notification-data", async () => {
- return this.windowManager?._pendingUpdateNotificationData ?? null;
- });
-
- ipcMain.handle("update-notification-ready", async () => {
- this.windowManager?.showUpdateNotificationWindow();
- });
-
- ipcMain.handle("update-notification-respond", async (_event, action) => {
- this.windowManager?.dismissUpdateNotification();
- if (action === "update") {
- try {
- await this.updateManager?.downloadUpdate();
- } catch (error) {
- console.error("Failed to start update download from notification:", error);
- }
- }
- return { success: true };
- });
-
// Note files (markdown mirror) handlers
ipcMain.handle("note-files-set-enabled", async (_event, enabled, customPath, options) => {
try {
diff --git a/src/helpers/updateCheckPolicy.js b/src/helpers/updateCheckPolicy.js
deleted file mode 100644
index 5c2698f39..000000000
--- a/src/helpers/updateCheckPolicy.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// The "App updates" toggle gates the automatic checks themselves, not just the
-// popup: with it off the app must not reach the update feed, so offline or
-// firewalled machines never surface a connection error dialog (#1605).
-// Only an explicit false disables — missing prefs (renderer sync not arrived
-// yet) keep check-by-default behavior.
-function appUpdatesEnabled({ notificationsEnabled, notifyUpdates } = {}) {
- return notificationsEnabled !== false && notifyUpdates !== false;
-}
-
-module.exports = { appUpdatesEnabled };
diff --git a/src/helpers/windowConfig.js b/src/helpers/windowConfig.js
index 656808176..1bb7eb62f 100644
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@ -355,11 +355,13 @@ class WindowPositionUtil {
return { ...WindowPositionUtil.clampToWorkArea(bounds, display), width, height };
}
- static setupAlwaysOnTop(window) {
+ // `level` only applies on macOS; Windows and Linux already use the strongest
+ // level their window managers honor.
+ static setupAlwaysOnTop(window, { level = "floating" } = {}) {
if (process.platform === "darwin") {
// macOS: Use panel level for proper floating behavior
// This ensures the window stays on top across spaces and fullscreen apps
- window.setAlwaysOnTop(true, "floating", 1);
+ window.setAlwaysOnTop(true, level, 1);
// Re-applying the collection behavior when nothing drifted makes the
// window server momentarily pull the window out of the active Space,
// which blinks the entire visible window. Enforce calls land on hot
@@ -376,7 +378,7 @@ class WindowPositionUtil {
}
if (window.isVisible()) {
- window.setAlwaysOnTop(true, "floating", 1);
+ window.setAlwaysOnTop(true, level, 1);
}
} else if (process.platform === "win32") {
window.setAlwaysOnTop(true, "pop-up-menu");
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index d51916e44..1e06a09cb 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -80,15 +80,10 @@ class WindowManager {
this.meetingDetectionEngine.handleNotificationTimeout(notification);
}
});
- this.updateNotificationWindow = null;
- this._pendingUpdateNotificationData = null;
- this._deferredUpdateNotificationInfo = null;
- this._updateNotificationDismissed = false;
this.notificationPrefs = {
notificationsEnabled: true,
notifyMeetingDetection: true,
notifyCalendarReminders: true,
- notifyUpdates: true,
};
this.tray = null;
this.hotkeyManager = new HotkeyManager();
@@ -1555,9 +1550,6 @@ class WindowManager {
this.hideDictationPanel();
this._onboardingActive = false;
if (!this._floatingIconAutoHide) this.showDictationPanel();
- const deferredUpdate = this._deferredUpdateNotificationInfo;
- this._deferredUpdateNotificationInfo = null;
- if (deferredUpdate) void this.showUpdateNotification(deferredUpdate);
return true;
}
@@ -1566,11 +1558,6 @@ class WindowManager {
this.hideTranscriptionPreview();
this.hideAgentDictationPill();
this.dismissMeetingNotification({ flushQueued: false });
-
- if (this._pendingUpdateNotificationData) {
- this._deferredUpdateNotificationInfo = { ...this._pendingUpdateNotificationData };
- }
- this.dismissUpdateNotification({ persistent: false });
}
beginOnboardingDemo(kind) {
@@ -2057,7 +2044,9 @@ class WindowManager {
win.setIgnoreMouseEvents(true, { forward: true });
}
- WindowPositionUtil.setupAlwaysOnTop(win);
+ // Notifications must clear every other window, including our own floating
+ // dictation panel and assistant pill.
+ WindowPositionUtil.setupAlwaysOnTop(win, { level: "screen-saver" });
this._pendingNotificationData = promptData;
@@ -2195,109 +2184,6 @@ class WindowManager {
return !!win && !win.isDestroyed() && win.webContents === sender;
}
- async showUpdateNotification(info) {
- if (this._onboardingActive) {
- this._deferredUpdateNotificationInfo = info;
- return false;
- }
- this._deferredUpdateNotificationInfo = null;
- if (this._updateNotificationDismissed) return;
- if (this.updateNotificationWindow && !this.updateNotificationWindow.isDestroyed()) {
- this.updateNotificationWindow.close();
- this.updateNotificationWindow = null;
- }
- if (this._updateNotificationAutoDismiss) {
- clearTimeout(this._updateNotificationAutoDismiss);
- this._updateNotificationAutoDismiss = null;
- }
-
- const display = screen.getPrimaryDisplay();
- const position = WindowPositionUtil.getNotificationPosition(display);
-
- const win = new BrowserWindow({
- ...NOTIFICATION_WINDOW_CONFIG,
- ...position,
- });
- this.updateNotificationWindow = win;
- this._pendingUpdateNotificationData = {
- version: info?.version,
- releaseDate: info?.releaseDate,
- };
-
- WindowPositionUtil.setupAlwaysOnTop(win);
-
- try {
- if (process.env.NODE_ENV === "development") {
- await DevServerManager.waitForDevServer();
- await win.loadURL(`${DevServerManager.DEV_SERVER_URL}?update-notification=true`);
- } else {
- const fileInfo = DevServerManager.getAppFilePath(false);
- await win.loadFile(fileInfo.path, {
- query: { ...fileInfo.query, "update-notification": "true" },
- });
- }
- } catch (error) {
- // Entering onboarding closes any in-flight normal-app popup. Its aborted
- // load is expected, and the saved update is replayed once the gate opens.
- if (this._onboardingActive || this.updateNotificationWindow !== win) return false;
- throw error;
- }
-
- if (this._onboardingActive || this.updateNotificationWindow !== win) return false;
-
- this._updateNotificationReadyFallback = setTimeout(() => {
- this._updateNotificationReadyFallback = null;
- if (this._onboardingActive || this.updateNotificationWindow !== win || win.isDestroyed())
- return;
- win.webContents.send("update-notification-data", this._pendingUpdateNotificationData);
- win.showInactive();
- }, 3000);
-
- this._updateNotificationAutoDismiss = setTimeout(() => {
- this.dismissUpdateNotification({ persistent: false });
- }, 5000);
-
- win.on("closed", () => {
- if (this.updateNotificationWindow !== win) return;
- this.updateNotificationWindow = null;
- if (this._updateNotificationAutoDismiss) {
- clearTimeout(this._updateNotificationAutoDismiss);
- this._updateNotificationAutoDismiss = null;
- }
- });
- }
-
- showUpdateNotificationWindow() {
- if (this._onboardingActive) return;
- if (this._updateNotificationReadyFallback) {
- clearTimeout(this._updateNotificationReadyFallback);
- this._updateNotificationReadyFallback = null;
- }
- if (this.updateNotificationWindow && !this.updateNotificationWindow.isDestroyed()) {
- this.updateNotificationWindow.showInactive();
- }
- }
-
- dismissUpdateNotification({ persistent = true } = {}) {
- this._pendingUpdateNotificationData = null;
- if (persistent) {
- this._updateNotificationDismissed = true;
- this._deferredUpdateNotificationInfo = null;
- }
- if (this._updateNotificationReadyFallback) {
- clearTimeout(this._updateNotificationReadyFallback);
- this._updateNotificationReadyFallback = null;
- }
- if (this._updateNotificationAutoDismiss) {
- clearTimeout(this._updateNotificationAutoDismiss);
- this._updateNotificationAutoDismiss = null;
- }
- if (this.updateNotificationWindow && !this.updateNotificationWindow.isDestroyed()) {
- this.updateNotificationWindow.close();
- }
- this.updateNotificationWindow = null;
- }
-
sendToControlPanel(channel, data) {
const win = this.controlPanelWindow;
if (!win || win.isDestroyed()) return;
diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.ts
index 53a6620aa..1bf7f3710 100644
--- a/src/hooks/useSettings.ts
+++ b/src/hooks/useSettings.ts
@@ -363,8 +363,8 @@ function useSettingsInternal() {
setNotifyMeetingDetection: store.setNotifyMeetingDetection,
notifyCalendarReminders: store.notifyCalendarReminders,
setNotifyCalendarReminders: store.setNotifyCalendarReminders,
- notifyUpdates: store.notifyUpdates,
- setNotifyUpdates: store.setNotifyUpdates,
+ autoUpdatesEnabled: store.autoUpdatesEnabled,
+ setAutoUpdatesEnabled: store.setAutoUpdatesEnabled,
audioCuesEnabled: store.audioCuesEnabled,
setAudioCuesEnabled: store.setAudioCuesEnabled,
pauseMediaOnDictation: store.pauseMediaOnDictation,
diff --git a/src/hooks/useUpdater.ts b/src/hooks/useUpdater.ts
index bc31c8a5a..94ef9a570 100644
--- a/src/hooks/useUpdater.ts
+++ b/src/hooks/useUpdater.ts
@@ -4,6 +4,7 @@ interface UpdateStatus {
updateAvailable: boolean;
updateDownloaded: boolean;
isDevelopment: boolean;
+ isSupported: boolean;
}
interface UpdateInfo {
@@ -20,7 +21,6 @@ interface UpdateState {
isChecking: boolean;
isDownloading: boolean;
isInstalling: boolean;
- error: Error | null;
}
let globalState: UpdateState = {
@@ -28,13 +28,13 @@ let globalState: UpdateState = {
updateAvailable: false,
updateDownloaded: false,
isDevelopment: false,
+ isSupported: true,
},
info: null,
downloadProgress: 0,
isChecking: false,
isDownloading: false,
isInstalling: false,
- error: null,
};
const stateListeners = new Set<(state: UpdateState) => void>();
@@ -108,13 +108,8 @@ function registerEventListeners() {
}
if (window.electronAPI.onUpdateError) {
- const dispose = window.electronAPI.onUpdateError((_event, error) => {
- updateGlobalState({
- isChecking: false,
- isDownloading: false,
- isInstalling: false,
- error: error instanceof Error ? error : new Error(String(error)),
- });
+ const dispose = window.electronAPI.onUpdateError(() => {
+ updateGlobalState({ isChecking: false, isDownloading: false, isInstalling: false });
});
if (dispose) cleanupFunctions.push(dispose);
}
@@ -163,17 +158,11 @@ export function useUpdater() {
}, []);
const checkForUpdates = useCallback(async () => {
- updateGlobalState({ isChecking: true, error: null });
+ updateGlobalState({ isChecking: true });
try {
- const result = await window.electronAPI.checkForUpdates();
+ return await window.electronAPI.checkForUpdates();
+ } finally {
updateGlobalState({ isChecking: false });
- return result;
- } catch (error) {
- updateGlobalState({
- isChecking: false,
- error: error instanceof Error ? error : new Error(String(error)),
- });
- throw error;
}
}, []);
@@ -182,15 +171,11 @@ export function useUpdater() {
return { success: true, message: "Update already downloaded" };
}
- updateGlobalState({ isDownloading: true, downloadProgress: 0, error: null });
+ updateGlobalState({ isDownloading: true, downloadProgress: 0 });
try {
- const result = await window.electronAPI.downloadUpdate();
- return result;
+ return await window.electronAPI.downloadUpdate();
} catch (error) {
- updateGlobalState({
- isDownloading: false,
- error: error instanceof Error ? error : new Error(String(error)),
- });
+ updateGlobalState({ isDownloading: false });
throw error;
}
}, [state.status.updateDownloaded]);
@@ -200,29 +185,22 @@ export function useUpdater() {
throw new Error("No update available to install");
}
- updateGlobalState({ isInstalling: true, error: null });
+ updateGlobalState({ isInstalling: true });
isInstallingRef.current = true;
try {
await window.electronAPI.installUpdate();
+ // Settings raises its own "almost there" dialog when the restart stalls.
setTimeout(() => {
if (isInstallingRef.current) {
isInstallingRef.current = false;
- updateGlobalState({
- isInstalling: false,
- error: new Error(
- "Install timed out. Please restart the app manually to apply the update."
- ),
- });
+ updateGlobalState({ isInstalling: false });
}
}, 10000);
} catch (error) {
isInstallingRef.current = false;
- updateGlobalState({
- isInstalling: false,
- error: error instanceof Error ? error : new Error(String(error)),
- });
+ updateGlobalState({ isInstalling: false });
throw error;
}
}, [state.status.updateDownloaded]);
@@ -237,12 +215,6 @@ export function useUpdater() {
}
}, []);
- const clearError = useCallback(() => {
- if (globalState.error) {
- updateGlobalState({ error: null });
- }
- }, []);
-
return {
status: state.status,
info: state.info,
@@ -250,11 +222,9 @@ export function useUpdater() {
isChecking: state.isChecking,
isDownloading: state.isDownloading,
isInstalling: state.isInstalling,
- error: state.error,
checkForUpdates,
downloadUpdate,
installUpdate,
getAppVersion,
- clearError,
};
}
diff --git a/src/index.css b/src/index.css
index cdcba5257..894b42ac3 100644
--- a/src/index.css
+++ b/src/index.css
@@ -198,6 +198,12 @@
background: transparent;
}
+ /* The notification card slides and swipes past the window edge; without this
+ the transparent window grows scrollbars mid-animation. */
+ body:has(.meeting-notification-window) {
+ overflow: hidden;
+ }
+
body:has(.dictation-window) #root,
body:has(.meeting-notification-window) #root {
background: transparent;
diff --git a/src/locales/ar/translation.json b/src/locales/ar/translation.json
index 45c4eb268..6c5d13fe3 100644
--- a/src/locales/ar/translation.json
+++ b/src/locales/ar/translation.json
@@ -467,8 +467,6 @@
"update": {
"readyTitle": "التحديث جاهز للتثبيت",
"readyDescription": "انقر فوق «تثبيت التحديث» لإعادة التشغيل باستخدام أحدث إصدار.",
- "problemTitle": "واجه التحديث مشكلة",
- "problemDescription": "لم نتمكن من إكمال التحديث. يرجى المحاولة مرة أخرى لاحقًا.",
"installTitle": "تثبيت التحديث",
"installDescription": "سيتم إعادة تشغيل OpenWhispr لتطبيق التحديث. سيتم حفظ أي عمل قيد التقدم.",
"couldNotInstallTitle": "تعذر تثبيت التحديث",
@@ -2920,9 +2918,7 @@
"meetingDetection": "اكتشاف الاجتماع",
"meetingDetectionDescription": "إعلام عند اكتشاف اجتماع حتى تتمكن من بدء التسجيل",
"calendarReminders": "تذكيرات التقويم",
- "calendarRemindersDescription": "إعلام عند اقتراب موعد بدء اجتماع مجدول",
- "updates": "تحديثات التطبيق",
- "updatesDescription": "إعلام عند توفر إصدار جديد"
+ "calendarRemindersDescription": "إعلام عند اقتراب موعد بدء اجتماع مجدول"
},
"clipboard": {
"title": "الحافظة",
@@ -3021,6 +3017,8 @@
}
},
"updates": {
+ "automaticUpdates": "التحديثات التلقائية",
+ "automaticUpdatesDescription": "تنزيل التحديثات وتثبيتها في الخلفية",
"badges": {
"dev": "تطوير",
"latest": "الأحدث",
@@ -3059,16 +3057,13 @@
"updateAvailable": {
"description": "التحديث متاح: v{{version}}",
"title": "تحديث متاح"
- },
- "updateError": {
- "description": "حدث خطأ ما في التحديث. يرجى المحاولة مرة أخرى.",
- "title": "خطأ في التحديث"
}
},
"downloadUpdate": "تنزيل التحديث {{version}}",
"downloading": "جاري التنزيل... {{progress}}%",
"installAndRestart": "تثبيت وإعادة التشغيل",
"latestVersion": "أنت تستخدم أحدث إصدار",
+ "managedByPackageManager": "يتم تثبيت التحديثات عبر مدير الحزم لديك",
"newVersion": "يتوفر إصدار أحدث",
"newVersionAvailable": "يتوفر إصدار جديد",
"restarting": "جاري إعادة التشغيل...",
@@ -4111,11 +4106,6 @@
"dismiss": "تجاهل"
}
},
- "updateNotification": {
- "title": "تحديث OpenWhispr متوفر",
- "body": "الإصدار {{version}} جاهز للتنزيل",
- "cta": "تحديث الآن"
- },
"permissionsGate": {
"title": "الأذونات مطلوبة",
"description": "يحتاج OpenWhispr إلى بعض الأذونات للعمل على هذا الكمبيوتر.",
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index 732f8ff88..02e53704b 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Update bereit zur Installation",
"readyDescription": "Klicken Sie auf 'Update installieren', um mit der neuesten Version neu zu starten.",
- "problemTitle": "Beim Update ist ein Problem aufgetreten",
- "problemDescription": "Das Update konnte nicht abgeschlossen werden. Bitte versuchen Sie es später erneut.",
"installTitle": "Update installieren",
"installDescription": "OpenWhispr startet neu, um das Update anzuwenden. Laufende Arbeit wird gespeichert.",
"couldNotInstallTitle": "Update konnte nicht installiert werden",
@@ -2193,9 +2191,7 @@
"meetingDetection": "Meeting-Erkennung",
"meetingDetectionDescription": "Benachrichtigen, wenn ein Meeting erkannt wird, um die Aufnahme zu starten",
"calendarReminders": "Kalendererinnerungen",
- "calendarRemindersDescription": "Benachrichtigen, wenn ein geplantes Meeting bald beginnt",
- "updates": "App-Updates",
- "updatesDescription": "Benachrichtigen, wenn eine neue Version verfügbar ist"
+ "calendarRemindersDescription": "Benachrichtigen, wenn ein geplantes Meeting bald beginnt"
},
"clipboard": {
"title": "Zwischenablage",
@@ -2294,6 +2290,8 @@
}
},
"updates": {
+ "automaticUpdates": "Automatische Updates",
+ "automaticUpdatesDescription": "Updates im Hintergrund herunterladen und installieren",
"badges": {
"dev": "Dev",
"latest": "Aktuell",
@@ -2332,16 +2330,13 @@
"updateAvailable": {
"description": "Update verfügbar: v{{version}}",
"title": "Update verfügbar"
- },
- "updateError": {
- "description": "Beim Update ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.",
- "title": "Update-Fehler"
}
},
"downloadUpdate": "Update {{version}} herunterladen",
"downloading": "Wird heruntergeladen... {{progress}}%",
"installAndRestart": "Installieren & neu starten",
"latestVersion": "Sie verwenden die neueste Version",
+ "managedByPackageManager": "Updates werden über deinen Paketmanager installiert",
"newVersion": "Eine neuere Version ist verfügbar",
"newVersionAvailable": "Neue Version verfügbar",
"restarting": "Wird neu gestartet...",
@@ -3986,11 +3981,6 @@
"dismiss": "Schließen"
}
},
- "updateNotification": {
- "title": "OpenWhispr-Update verfügbar",
- "body": "Version {{version}} steht zum Download bereit",
- "cta": "Jetzt aktualisieren"
- },
"permissionsGate": {
"title": "Berechtigungen erforderlich",
"description": "OpenWhispr benötigt einige Berechtigungen, um auf diesem Computer zu funktionieren.",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 6cae5494f..582cd02f7 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Update ready to install",
"readyDescription": "Click 'Install Update' to restart with the latest version.",
- "problemTitle": "Update ran into a problem",
- "problemDescription": "We couldn't complete the update. Please try again later.",
"installTitle": "Install Update",
"installDescription": "OpenWhispr will restart to apply the update. Any in-progress work will be saved.",
"couldNotInstallTitle": "Couldn't install update",
@@ -2193,9 +2191,7 @@
"meetingDetection": "Meeting detection",
"meetingDetectionDescription": "Notify when a meeting is detected so you can start recording",
"calendarReminders": "Calendar reminders",
- "calendarRemindersDescription": "Notify when a scheduled meeting is about to start",
- "updates": "App updates",
- "updatesDescription": "Notify when a new version is available"
+ "calendarRemindersDescription": "Notify when a scheduled meeting is about to start"
},
"clipboard": {
"title": "Clipboard",
@@ -2294,6 +2290,8 @@
}
},
"updates": {
+ "automaticUpdates": "Automatic updates",
+ "automaticUpdatesDescription": "Download and install updates in the background",
"badges": {
"dev": "Dev",
"latest": "Latest",
@@ -2332,16 +2330,13 @@
"updateAvailable": {
"description": "Update available: v{{version}}",
"title": "Update Available"
- },
- "updateError": {
- "description": "Something went wrong with the update. Please try again.",
- "title": "Update Error"
}
},
"downloadUpdate": "Download Update {{version}}",
"downloading": "Downloading... {{progress}}%",
"installAndRestart": "Install & Restart",
"latestVersion": "You're on the latest version",
+ "managedByPackageManager": "Updates are installed through your package manager",
"newVersion": "A newer version is available",
"newVersionAvailable": "New version available",
"restarting": "Restarting...",
@@ -3986,11 +3981,6 @@
"dismiss": "Dismiss"
}
},
- "updateNotification": {
- "title": "OpenWhispr Update Available",
- "body": "Version {{version}} is ready to download",
- "cta": "Update Now"
- },
"permissionsGate": {
"title": "Permissions Required",
"description": "OpenWhispr needs a few permissions to work on this computer.",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index dedfb23ba..4afd70c8f 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Actualización lista para instalar",
"readyDescription": "Haz clic en 'Instalar actualización' para reiniciar con la última versión.",
- "problemTitle": "Hubo un problema con la actualización",
- "problemDescription": "No pudimos completar la actualización. Inténtalo más tarde.",
"installTitle": "Instalar actualización",
"installDescription": "OpenWhispr se reiniciará para aplicar la actualización. Se guardará el trabajo en curso.",
"couldNotInstallTitle": "No se pudo instalar la actualización",
@@ -1952,9 +1950,7 @@
"meetingDetection": "Detección de reuniones",
"meetingDetectionDescription": "Notificar cuando se detecta una reunión para iniciar la grabación",
"calendarReminders": "Recordatorios del calendario",
- "calendarRemindersDescription": "Notificar cuando una reunión programada está a punto de comenzar",
- "updates": "Actualizaciones",
- "updatesDescription": "Notificar cuando hay una nueva versión disponible"
+ "calendarRemindersDescription": "Notificar cuando una reunión programada está a punto de comenzar"
},
"clipboard": {
"title": "Portapapeles",
@@ -2053,6 +2049,8 @@
}
},
"updates": {
+ "automaticUpdates": "Actualizaciones automáticas",
+ "automaticUpdatesDescription": "Descargar e instalar actualizaciones en segundo plano",
"badges": {
"dev": "Dev",
"latest": "Última",
@@ -2091,16 +2089,13 @@
"updateAvailable": {
"description": "Actualización disponible: v{{version}}",
"title": "Actualización disponible"
- },
- "updateError": {
- "description": "Algo salió mal con la actualización. Inténtalo de nuevo.",
- "title": "Error de actualización"
}
},
"downloadUpdate": "Descargar actualización {{version}}",
"downloading": "Descargando... {{progress}}%",
"installAndRestart": "Instalar y reiniciar",
"latestVersion": "Tienes la última versión",
+ "managedByPackageManager": "Las actualizaciones se instalan a través de tu gestor de paquetes",
"newVersion": "Hay una versión más reciente disponible",
"newVersionAvailable": "Nueva versión disponible",
"restarting": "Reiniciando...",
@@ -3910,11 +3905,6 @@
"dismiss": "Cerrar"
}
},
- "updateNotification": {
- "title": "Actualización de OpenWhispr disponible",
- "body": "La versión {{version}} está lista para descargar",
- "cta": "Actualizar ahora"
- },
"permissionsGate": {
"title": "Permisos necesarios",
"description": "OpenWhispr necesita algunos permisos para funcionar en este ordenador.",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index e1af18c21..18559d5f8 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Mise à jour prête à installer",
"readyDescription": "Cliquez sur « Installer la mise à jour » pour redémarrer avec la dernière version.",
- "problemTitle": "Problème pendant la mise à jour",
- "problemDescription": "Nous n'avons pas pu terminer la mise à jour. Réessayez plus tard.",
"installTitle": "Installer la mise à jour",
"installDescription": "OpenWhispr va redémarrer pour appliquer la mise à jour. Le travail en cours sera sauvegardé.",
"couldNotInstallTitle": "Impossible d'installer la mise à jour",
@@ -2193,9 +2191,7 @@
"meetingDetection": "Détection de réunion",
"meetingDetectionDescription": "Prévenir quand une réunion est détectée pour lancer l'enregistrement",
"calendarReminders": "Rappels de calendrier",
- "calendarRemindersDescription": "Prévenir quand une réunion planifiée va commencer",
- "updates": "Mises à jour",
- "updatesDescription": "Prévenir quand une nouvelle version est disponible"
+ "calendarRemindersDescription": "Prévenir quand une réunion planifiée va commencer"
},
"clipboard": {
"title": "Presse-papiers",
@@ -2294,6 +2290,8 @@
}
},
"updates": {
+ "automaticUpdates": "Mises à jour automatiques",
+ "automaticUpdatesDescription": "Télécharger et installer les mises à jour en arrière-plan",
"badges": {
"dev": "Dev",
"latest": "À jour",
@@ -2332,16 +2330,13 @@
"updateAvailable": {
"description": "Mise à jour disponible : v{{version}}",
"title": "Mise à jour disponible"
- },
- "updateError": {
- "description": "Un problème est survenu pendant la mise à jour. Veuillez réessayer.",
- "title": "Erreur de mise à jour"
}
},
"downloadUpdate": "Télécharger la mise à jour {{version}}",
"downloading": "Téléchargement... {{progress}}%",
"installAndRestart": "Installer et redémarrer",
"latestVersion": "Vous avez la dernière version",
+ "managedByPackageManager": "Les mises à jour sont installées via votre gestionnaire de paquets",
"newVersion": "Une version plus récente est disponible",
"newVersionAvailable": "Nouvelle version disponible",
"restarting": "Redémarrage...",
@@ -3986,11 +3981,6 @@
"dismiss": "Fermer"
}
},
- "updateNotification": {
- "title": "Mise à jour OpenWhispr disponible",
- "body": "La version {{version}} est prête à télécharger",
- "cta": "Mettre à jour"
- },
"permissionsGate": {
"title": "Autorisations requises",
"description": "OpenWhispr a besoin de quelques autorisations pour fonctionner sur cet ordinateur.",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index 7914a8c2d..31cb5983c 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Aggiornamento pronto da installare",
"readyDescription": "Fai clic su 'Installa aggiornamento' per riavviare con l'ultima versione.",
- "problemTitle": "Si è verificato un problema con l'aggiornamento",
- "problemDescription": "Non siamo riusciti a completare l'aggiornamento. Riprova più tardi.",
"installTitle": "Installa aggiornamento",
"installDescription": "OpenWhispr verrà riavviato per applicare l'aggiornamento. Il lavoro in corso verrà salvato.",
"couldNotInstallTitle": "Impossibile installare l'aggiornamento",
@@ -1900,9 +1898,7 @@
"meetingDetection": "Rilevamento riunioni",
"meetingDetectionDescription": "Avvisa quando viene rilevata una riunione per avviare la registrazione",
"calendarReminders": "Promemoria calendario",
- "calendarRemindersDescription": "Avvisa quando una riunione programmata sta per iniziare",
- "updates": "Aggiornamenti app",
- "updatesDescription": "Avvisa quando è disponibile una nuova versione"
+ "calendarRemindersDescription": "Avvisa quando una riunione programmata sta per iniziare"
},
"clipboard": {
"title": "Appunti",
@@ -2001,6 +1997,8 @@
}
},
"updates": {
+ "automaticUpdates": "Aggiornamenti automatici",
+ "automaticUpdatesDescription": "Scarica e installa gli aggiornamenti in background",
"badges": {
"dev": "Dev",
"latest": "Aggiornato",
@@ -2039,16 +2037,13 @@
"updateAvailable": {
"description": "Aggiornamento disponibile: v{{version}}",
"title": "Aggiornamento disponibile"
- },
- "updateError": {
- "description": "Qualcosa è andato storto con l'aggiornamento. Riprova.",
- "title": "Errore di aggiornamento"
}
},
"downloadUpdate": "Scarica aggiornamento {{version}}",
"downloading": "Download in corso... {{progress}}%",
"installAndRestart": "Installa e riavvia",
"latestVersion": "Hai già l'ultima versione",
+ "managedByPackageManager": "Gli aggiornamenti vengono installati tramite il gestore pacchetti",
"newVersion": "È disponibile una versione più recente",
"newVersionAvailable": "Nuova versione disponibile",
"restarting": "Riavvio...",
@@ -3858,11 +3853,6 @@
"dismiss": "Chiudi"
}
},
- "updateNotification": {
- "title": "Aggiornamento OpenWhispr disponibile",
- "body": "La versione {{version}} è pronta per il download",
- "cta": "Aggiorna ora"
- },
"permissionsGate": {
"title": "Autorizzazioni necessarie",
"description": "OpenWhispr ha bisogno di alcune autorizzazioni per funzionare su questo computer.",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 255d28b7f..71af41a42 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "アップデートの準備完了",
"readyDescription": "「アップデートをインストール」をクリックして最新バージョンで再起動します。",
- "problemTitle": "アップデートで問題が発生しました",
- "problemDescription": "アップデートを完了できませんでした。後でもう一度お試しください。",
"installTitle": "アップデートをインストール",
"installDescription": "OpenWhispr はアップデートを適用するために再起動します。作業中のデータは保存されます。",
"couldNotInstallTitle": "アップデートをインストールできませんでした",
@@ -1900,9 +1898,7 @@
"meetingDetection": "会議の検出",
"meetingDetectionDescription": "会議が検出されたときに通知して録音を開始できるようにする",
"calendarReminders": "カレンダーリマインダー",
- "calendarRemindersDescription": "予定された会議がまもなく始まるときに通知する",
- "updates": "アプリの更新",
- "updatesDescription": "新しいバージョンが利用可能になったときに通知する"
+ "calendarRemindersDescription": "予定された会議がまもなく始まるときに通知する"
},
"clipboard": {
"title": "クリップボード",
@@ -2001,6 +1997,8 @@
}
},
"updates": {
+ "automaticUpdates": "自動アップデート",
+ "automaticUpdatesDescription": "アップデートをバックグラウンドでダウンロードしてインストールします",
"badges": {
"dev": "開発版",
"latest": "最新",
@@ -2039,16 +2037,13 @@
"updateAvailable": {
"description": "アップデートあり: v{{version}}",
"title": "アップデートあり"
- },
- "updateError": {
- "description": "アップデート中に問題が発生しました。もう一度お試しください。",
- "title": "アップデートエラー"
}
},
"downloadUpdate": "アップデート v{{version}} をダウンロード",
"downloading": "ダウンロード中... {{progress}}%",
"installAndRestart": "インストールして再起動",
"latestVersion": "最新バージョンをお使いです",
+ "managedByPackageManager": "アップデートはパッケージマネージャーから行われます",
"newVersion": "新しいバージョンがあります",
"newVersionAvailable": "新しいバージョンが利用可能",
"restarting": "再起動中...",
@@ -3858,11 +3853,6 @@
"dismiss": "閉じる"
}
},
- "updateNotification": {
- "title": "OpenWhispr のアップデートあり",
- "body": "バージョン {{version}} がダウンロード可能です",
- "cta": "今すぐ更新"
- },
"permissionsGate": {
"title": "権限が必要です",
"description": "OpenWhispr がこのコンピュータで動作するために、いくつかの権限が必要です。",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index 241aca4b8..26feec944 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -559,8 +559,6 @@
"update": {
"readyTitle": "Atualização pronta para instalar",
"readyDescription": "Clique em 'Instalar atualização' para reiniciar com a versão mais recente.",
- "problemTitle": "Houve um problema na atualização",
- "problemDescription": "Não foi possível concluir a atualização. Tente novamente mais tarde.",
"installTitle": "Instalar atualização",
"installDescription": "O OpenWhispr será reiniciado para aplicar a atualização. O trabalho em andamento será salvo.",
"couldNotInstallTitle": "Não foi possível instalar a atualização",
@@ -1879,9 +1877,7 @@
"meetingDetection": "Detecção de reuniões",
"meetingDetectionDescription": "Notificar quando uma reunião for detectada para iniciar a gravação",
"calendarReminders": "Lembretes do calendário",
- "calendarRemindersDescription": "Notificar quando uma reunião agendada está prestes a começar",
- "updates": "Atualizações do app",
- "updatesDescription": "Notificar quando uma nova versão estiver disponível"
+ "calendarRemindersDescription": "Notificar quando uma reunião agendada está prestes a começar"
},
"clipboard": {
"title": "Área de transferência",
@@ -1980,6 +1976,8 @@
}
},
"updates": {
+ "automaticUpdates": "Atualizações automáticas",
+ "automaticUpdatesDescription": "Baixar e instalar atualizações em segundo plano",
"badges": {
"dev": "Dev",
"latest": "Mais recente",
@@ -2018,16 +2016,13 @@
"updateAvailable": {
"description": "Atualização disponível: v{{version}}",
"title": "Atualização disponível"
- },
- "updateError": {
- "description": "Algo deu errado com a atualização. Tente novamente.",
- "title": "Erro de atualização"
}
},
"downloadUpdate": "Baixar atualização {{version}}",
"downloading": "Baixando... {{progress}}%",
"installAndRestart": "Instalar e reiniciar",
"latestVersion": "Você está na versão mais recente",
+ "managedByPackageManager": "As atualizações são instaladas pelo seu gerenciador de pacotes",
"newVersion": "Uma versão mais recente está disponível",
"newVersionAvailable": "Nova versão disponível",
"restarting": "Reiniciando...",
@@ -3858,11 +3853,6 @@
"dismiss": "Fechar"
}
},
- "updateNotification": {
- "title": "Atualização do OpenWhispr disponível",
- "body": "A versão {{version}} está pronta para download",
- "cta": "Atualizar agora"
- },
"permissionsGate": {
"title": "Permissões necessárias",
"description": "O OpenWhispr precisa de algumas permissões para funcionar neste computador.",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index 7c1200e81..5376e0647 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "Обновление готово к установке",
"readyDescription": "Нажмите «Установить обновление», чтобы перезапустить приложение с новой версией.",
- "problemTitle": "Проблема с обновлением",
- "problemDescription": "Не удалось завершить обновление. Попробуйте позже.",
"installTitle": "Установить обновление",
"installDescription": "OpenWhispr перезапустится для применения обновления. Текущая работа будет сохранена.",
"couldNotInstallTitle": "Не удалось установить обновление",
@@ -1904,9 +1902,7 @@
"meetingDetection": "Обнаружение встреч",
"meetingDetectionDescription": "Уведомлять при обнаружении встречи для начала записи",
"calendarReminders": "Напоминания календаря",
- "calendarRemindersDescription": "Уведомлять, когда запланированная встреча скоро начнётся",
- "updates": "Обновления приложения",
- "updatesDescription": "Уведомлять о доступности новой версии"
+ "calendarRemindersDescription": "Уведомлять, когда запланированная встреча скоро начнётся"
},
"clipboard": {
"title": "Буфер обмена",
@@ -2005,6 +2001,8 @@
}
},
"updates": {
+ "automaticUpdates": "Автоматические обновления",
+ "automaticUpdatesDescription": "Загружать и устанавливать обновления в фоновом режиме",
"badges": {
"dev": "Dev",
"latest": "Последняя",
@@ -2043,16 +2041,13 @@
"updateAvailable": {
"description": "Доступно обновление: v{{version}}",
"title": "Доступно обновление"
- },
- "updateError": {
- "description": "Произошла ошибка при обновлении. Попробуйте ещё раз.",
- "title": "Ошибка обновления"
}
},
"downloadUpdate": "Скачать обновление {{version}}",
"downloading": "Загрузка... {{progress}}%",
"installAndRestart": "Установить и перезапустить",
"latestVersion": "У вас установлена последняя версия",
+ "managedByPackageManager": "Обновления устанавливаются через ваш менеджер пакетов",
"newVersion": "Доступна новая версия",
"newVersionAvailable": "Доступна новая версия",
"restarting": "Перезапуск...",
@@ -3904,11 +3899,6 @@
"dismiss": "Закрыть"
}
},
- "updateNotification": {
- "title": "Доступно обновление OpenWhispr",
- "body": "Версия {{version}} готова к загрузке",
- "cta": "Обновить"
- },
"permissionsGate": {
"title": "Требуются разрешения",
"description": "OpenWhispr нужны некоторые разрешения для работы на этом компьютере.",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index a97feddb2..fc77f5447 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "更新已准备就绪",
"readyDescription": "点击“安装更新”以重启并安装最新版本。",
- "problemTitle": "更新遇到问题",
- "problemDescription": "无法完成更新,请稍后再试。",
"installTitle": "安装更新",
"installDescription": "OpenWhispr 将重启以应用更新。当前进行中的工作将被保存。",
"couldNotInstallTitle": "无法安装更新",
@@ -1900,9 +1898,7 @@
"meetingDetection": "会议检测",
"meetingDetectionDescription": "检测到会议时通知您以便开始录音",
"calendarReminders": "日历提醒",
- "calendarRemindersDescription": "预定会议即将开始时通知您",
- "updates": "应用更新",
- "updatesDescription": "有新版本可用时通知您"
+ "calendarRemindersDescription": "预定会议即将开始时通知您"
},
"clipboard": {
"title": "剪贴板",
@@ -2001,6 +1997,8 @@
}
},
"updates": {
+ "automaticUpdates": "自动更新",
+ "automaticUpdatesDescription": "在后台下载并安装更新",
"badges": {
"dev": "开发版",
"latest": "最新",
@@ -2039,16 +2037,13 @@
"updateAvailable": {
"description": "有可用更新:v{{version}}",
"title": "有可用更新"
- },
- "updateError": {
- "description": "更新出错,请重试。",
- "title": "更新错误"
}
},
"downloadUpdate": "下载更新 {{version}}",
"downloading": "下载中... {{progress}}%",
"installAndRestart": "安装并重启",
"latestVersion": "你已经是最新版本",
+ "managedByPackageManager": "更新通过您的包管理器安装",
"newVersion": "有更新的版本可用",
"newVersionAvailable": "有新版本可用",
"restarting": "正在重启...",
@@ -3858,11 +3853,6 @@
"dismiss": "关闭"
}
},
- "updateNotification": {
- "title": "OpenWhispr 有可用更新",
- "body": "版本 {{version}} 已可下载",
- "cta": "立即更新"
- },
"permissionsGate": {
"title": "需要权限",
"description": "OpenWhispr 需要一些权限才能在此电脑上正常运行。",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index 9c18b1eab..ab63f8f5c 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -580,8 +580,6 @@
"update": {
"readyTitle": "更新已準備就緒",
"readyDescription": "點擊「安裝更新」以重新啟動並套用最新版本。",
- "problemTitle": "更新遇到問題",
- "problemDescription": "無法完成更新。請稍後再試。",
"installTitle": "安裝更新",
"installDescription": "OpenWhispr 將重新啟動以套用更新。進行中的工作會自動儲存。",
"couldNotInstallTitle": "無法安裝更新",
@@ -1900,9 +1898,7 @@
"meetingDetection": "會議偵測",
"meetingDetectionDescription": "偵測到會議時通知您以便開始錄音",
"calendarReminders": "行事曆提醒",
- "calendarRemindersDescription": "預定會議即將開始時通知您",
- "updates": "應用程式更新",
- "updatesDescription": "有新版本可用時通知您"
+ "calendarRemindersDescription": "預定會議即將開始時通知您"
},
"clipboard": {
"title": "剪貼簿",
@@ -2001,6 +1997,8 @@
}
},
"updates": {
+ "automaticUpdates": "自動更新",
+ "automaticUpdatesDescription": "在背景下載並安裝更新",
"badges": {
"dev": "開發版",
"latest": "最新",
@@ -2039,16 +2037,13 @@
"updateAvailable": {
"description": "有可用更新:v{{version}}",
"title": "有可用更新"
- },
- "updateError": {
- "description": "更新時發生錯誤。請再試一次。",
- "title": "更新錯誤"
}
},
"downloadUpdate": "下載更新 {{version}}",
"downloading": "下載中... {{progress}}%",
"installAndRestart": "安裝並重新啟動",
"latestVersion": "你使用的是最新版本",
+ "managedByPackageManager": "更新透過您的套件管理器安裝",
"newVersion": "有更新的版本可用",
"newVersionAvailable": "有新版本可用",
"restarting": "重新啟動中...",
@@ -3858,11 +3853,6 @@
"dismiss": "關閉"
}
},
- "updateNotification": {
- "title": "OpenWhispr 有可用更新",
- "body": "版本 {{version}} 已可下載",
- "cta": "立即更新"
- },
"permissionsGate": {
"title": "需要權限",
"description": "OpenWhispr 需要一些權限才能在此電腦上正常運作。",
diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.ts
index 62e750ffe..063a1281b 100644
--- a/src/stores/settingsStore.ts
+++ b/src/stores/settingsStore.ts
@@ -240,6 +240,17 @@ function migrateMicrophoneSelectionMode() {
migrateMicrophoneSelectionMode();
+// Automatic updates default on for new installs only. An install that already
+// finished onboarding keeps the manual download-and-install flow until the
+// user opts in.
+function initializeAutoUpdatesDefault() {
+ if (!isBrowser || localStorage.getItem("autoUpdatesEnabled") !== null) return;
+ const isExistingInstall = localStorage.getItem("onboardingCompleted") === "true";
+ localStorage.setItem("autoUpdatesEnabled", String(!isExistingInstall));
+}
+
+initializeAutoUpdatesDefault();
+
const BOOLEAN_SETTINGS = new Set([
"useLocalWhisper",
"meetingUseLocalWhisper",
@@ -282,7 +293,7 @@ const BOOLEAN_SETTINGS = new Set([
"notificationsEnabled",
"notifyMeetingDetection",
"notifyCalendarReminders",
- "notifyUpdates",
+ "autoUpdatesEnabled",
"gcalPrimaryOnly",
"mcalPrimaryOnly",
"appleCalendarConnected",
@@ -849,7 +860,7 @@ export interface SettingsState
notificationsEnabled: boolean;
notifyMeetingDetection: boolean;
notifyCalendarReminders: boolean;
- notifyUpdates: boolean;
+ autoUpdatesEnabled: boolean;
gcalPrimaryOnly: boolean;
mcalPrimaryOnly: boolean;
appleCalendarConnected: boolean;
@@ -1158,7 +1169,7 @@ export interface SettingsState
setNotificationsEnabled: (value: boolean) => void;
setNotifyMeetingDetection: (value: boolean) => void;
setNotifyCalendarReminders: (value: boolean) => void;
- setNotifyUpdates: (value: boolean) => void;
+ setAutoUpdatesEnabled: (enabled: boolean) => void;
setGcalPrimaryOnly: (value: boolean) => void;
setMcalPrimaryOnly: (value: boolean) => void;
setAppleCalendarConnected: (value: boolean) => void;
@@ -1578,7 +1589,7 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({
notificationsEnabled: readBoolean("notificationsEnabled", true),
notifyMeetingDetection: readBoolean("notifyMeetingDetection", true),
notifyCalendarReminders: readBoolean("notifyCalendarReminders", true),
- notifyUpdates: readBoolean("notifyUpdates", true),
+ autoUpdatesEnabled: readBoolean("autoUpdatesEnabled", true),
...(() => {
let accounts: CalendarAccount[] = [];
try {
@@ -2376,7 +2387,11 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({
setNotificationsEnabled: createBooleanSetter("notificationsEnabled"),
setNotifyMeetingDetection: createBooleanSetter("notifyMeetingDetection"),
setNotifyCalendarReminders: createBooleanSetter("notifyCalendarReminders"),
- setNotifyUpdates: createBooleanSetter("notifyUpdates"),
+ setAutoUpdatesEnabled: (enabled: boolean) => {
+ if (isBrowser) localStorage.setItem("autoUpdatesEnabled", String(enabled));
+ set({ autoUpdatesEnabled: enabled });
+ if (isBrowser) window.electronAPI?.setAutoUpdatesEnabled?.(enabled);
+ },
setGcalPrimaryOnly: (value: boolean) => {
if (isBrowser) localStorage.setItem("gcalPrimaryOnly", String(value));
useSettingsStore.setState({ gcalPrimaryOnly: value });
@@ -3475,7 +3490,6 @@ export async function initializeSettings(): Promise<void> {
notificationsEnabled: currentState.notificationsEnabled,
notifyMeetingDetection: currentState.notifyMeetingDetection,
notifyCalendarReminders: currentState.notifyCalendarReminders,
- notifyUpdates: currentState.notifyUpdates,
});
} catch (err) {
logger.warn(
@@ -3485,6 +3499,18 @@ export async function initializeSettings(): Promise<void> {
);
}
+ try {
+ await window.electronAPI.setAutoUpdatesEnabled?.(
+ useSettingsStore.getState().autoUpdatesEnabled
+ );
+ } catch (err) {
+ logger.warn(
+ "Failed to sync automatic updates preference on startup",
+ { error: (err as Error).message },
+ "settings"
+ );
+ }
+
// The main-process DB is the source of truth for the Apple Calendar connection
try {
const status = await window.electronAPI.acalGetConnectionStatus?.();
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 9fc68307f..0630d1a8a 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -828,6 +828,7 @@ export interface UpdateStatusResult {
updateAvailable: boolean;
updateDownloaded: boolean;
isDevelopment: boolean;
+ isSupported: boolean;
}
export interface UpdateInfoResult {
@@ -1969,6 +1970,7 @@ declare global {
markBundleMigrationDismissed: () => Promise<void>;
getUpdateStatus: () => Promise<UpdateStatusResult>;
getUpdateInfo: () => Promise<UpdateInfoResult | null>;
+ setAutoUpdatesEnabled: (enabled: boolean) => Promise<{ success: boolean }>;
// Update event listeners
onUpdateAvailable: (callback: (event: any, info: any) => void) => () => void;
@@ -3150,15 +3152,6 @@ declare global {
folderId: number | null;
} | null>;
onNoteNavigationPending?: (callback: () => void) => () => void;
- onUpdateNotificationData?: (
- callback: (data: { version: string; releaseDate?: string }) => void
- ) => () => void;
- getUpdateNotificationData?: () => Promise<{
- version: string;
- releaseDate?: string;
- } | null>;
- updateNotificationReady?: () => Promise<void>;
- updateNotificationRespond?: (action: string) => Promise<{ success: boolean }>;
onPreviewText?: (callback: (text: string) => void) => () => void;
onPreviewAppend?: (callback: (text: string) => void) => () => void;
onPreviewHold?: (callback: (payload: { showCleanup: boolean }) => void) => () => void;
diff --git a/src/updater.js b/src/updater.js
index 0924a528e..8b6305fc3 100644
--- a/src/updater.js
+++ b/src/updater.js
@@ -1,5 +1,8 @@
const { autoUpdater } = require("electron-updater");
-const { appUpdatesEnabled } = require("./helpers/updateCheckPolicy");
+
+// electron-updater can only replace an AppImage on Linux; deb, rpm and tar.gz
+// installs are updated by the package manager instead.
+const isUpdaterSupported = process.platform !== "linux" || Boolean(process.env.APPIMAGE);
class UpdateManager {
constructor() {
@@ -13,7 +16,8 @@ class UpdateManager {
this.eventListeners = [];
this.updateCheckInterval = null;
this.windowManager = null;
- this._suppressNotification = false;
+ // null until the renderer syncs the preference, so nothing downloads unasked.
+ this.autoUpdatesEnabled = null;
this.setupAutoUpdater();
}
@@ -87,17 +91,10 @@ class UpdateManager {
};
}
this.notifyRenderers("update-available", info);
- const notifAllowed = appUpdatesEnabled(this.windowManager?.notificationPrefs);
- if (this.windowManager && info && !this._suppressNotification && notifAllowed) {
- this.windowManager.showUpdateNotification(info).catch((err) => {
- console.error("Failed to show update notification:", err);
- });
- }
- this._suppressNotification = false;
+ this._autoDownloadIfEnabled();
},
"update-not-available": (info) => {
this.updateAvailable = false;
- this._suppressNotification = false;
if (!this.updateDownloaded) {
this.isDownloading = false;
this.lastUpdateInfo = null;
@@ -106,7 +103,6 @@ class UpdateManager {
},
error: (err) => {
console.error("❌ Auto-updater error:", err);
- this._suppressNotification = false;
this.isDownloading = false;
this.notifyRenderers("update-error", err);
},
@@ -169,8 +165,14 @@ class UpdateManager {
};
}
+ if (!isUpdaterSupported) {
+ return {
+ updateAvailable: false,
+ message: "Updates are installed through the system package manager",
+ };
+ }
+
console.log("🔍 Checking for updates...");
- this._suppressNotification = true;
const result = await autoUpdater.checkForUpdates();
if (result?.isUpdateAvailable && result?.updateInfo) {
@@ -284,6 +286,7 @@ class UpdateManager {
updateAvailable: this.updateAvailable,
updateDownloaded: this.updateDownloaded,
isDevelopment: process.env.NODE_ENV === "development",
+ isSupported: isUpdaterSupported,
};
} catch (error) {
console.error("❌ Error getting update status:", error);
@@ -300,13 +303,22 @@ class UpdateManager {
}
}
- // Prefs are read at fire time, not scheduling time, so flipping the
- // "App updates" toggle takes effect without a restart (#1605).
+ setAutoUpdatesEnabled(enabled) {
+ this.autoUpdatesEnabled = enabled;
+ // The startup check may have found an update before the renderer synced.
+ if (enabled) this._autoDownloadIfEnabled();
+ }
+
+ _autoDownloadIfEnabled() {
+ if (!this.autoUpdatesEnabled || !this.updateAvailable) return;
+ // downloadUpdate() is a no-op while a download is in flight or complete;
+ // failures surface through the shared "error" handler and the renderers.
+ this.downloadUpdate().catch(() => {});
+ }
+
+ // Checks always run so the sidebar can offer a manual download when automatic
+ // updates are off; a failed background check is logged and never surfaced.
_autoCheckForUpdates(label) {
- if (!appUpdatesEnabled(this.windowManager?.notificationPrefs)) {
- console.log(`⏭️ ${label} update check skipped (app updates disabled)`);
- return;
- }
console.log(`🔄 ${label} update check...`);
autoUpdater.checkForUpdates().catch((err) => {
console.error(`${label} update check failed:`, err);
@@ -314,7 +326,7 @@ class UpdateManager {
}
checkForUpdatesOnStartup() {
- if (process.env.NODE_ENV !== "development") {
+ if (process.env.NODE_ENV !== "development" && isUpdaterSupported) {
setTimeout(() => {
this._autoCheckForUpdates("Startup");
}, 3000);
diff --git a/test/helpers/updateCheckPolicy.test.js b/test/helpers/updateCheckPolicy.test.js
deleted file mode 100644
index e564f269e..000000000
--- a/test/helpers/updateCheckPolicy.test.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const test = require("node:test");
-const assert = require("node:assert/strict");
-
-const load = () => import("../../src/helpers/updateCheckPolicy.js");
-
-test("the App updates toggle gates automatic checks, not just the popup", async () => {
- const { appUpdatesEnabled } = await load();
-
- // Regression guard for #1605: with the toggle off, the app kept hitting the
- // update feed at startup and every 4 hours, and offline machines surfaced
- // the resulting connection errors as dialogs when Settings opened.
- assert.equal(appUpdatesEnabled({ notifyUpdates: false }), false);
- assert.equal(appUpdatesEnabled({ notificationsEnabled: true, notifyUpdates: false }), false);
-});
-
-test("the master notifications switch also disables automatic checks", async () => {
- const { appUpdatesEnabled } = await load();
-
- assert.equal(appUpdatesEnabled({ notificationsEnabled: false, notifyUpdates: true }), false);
-});
-
-test("checks stay enabled by default before renderer prefs arrive", async () => {
- const { appUpdatesEnabled } = await load();
-
- // Same tri-state convention as the other notification prefs: only an
- // explicit false disables; missing prefs keep check-by-default behavior.
- assert.equal(appUpdatesEnabled(undefined), true);
- assert.equal(appUpdatesEnabled({}), true);
- assert.equal(appUpdatesEnabled({ notificationsEnabled: true, notifyUpdates: true }), true);
-});
diff --git a/test/helpers/updater.test.js b/test/helpers/updater.test.js
index 150a180a4..a5cc947a3 100644
--- a/test/helpers/updater.test.js
+++ b/test/helpers/updater.test.js
@@ -7,6 +7,8 @@ process.env.NODE_ENV = "test";
const updaterModulePath = require.resolve("../../src/updater.js");
const originalLoad = Module._load;
+const originalPlatform = process.platform;
+const originalAppImage = process.env.APPIMAGE;
const STARTUP_DELAY_MS = 3000;
const PERIODIC_INTERVAL_MS = 4 * 60 * 60 * 1000;
@@ -15,6 +17,7 @@ function makeAutoUpdater({ offline = false } = {}) {
const listeners = {};
const autoUpdater = {
calls: 0,
+ downloads: 0,
listeners,
setFeedURL() {},
on(event, handler) {
@@ -31,6 +34,10 @@ function makeAutoUpdater({ offline = false } = {}) {
}
return Promise.resolve({ isUpdateAvailable: false });
},
+ downloadUpdate() {
+ autoUpdater.downloads += 1;
+ return Promise.resolve();
+ },
};
return autoUpdater;
}
@@ -60,6 +67,10 @@ function makeRendererWindow(sent) {
};
}
+function setPlatform(platform) {
+ Object.defineProperty(process, "platform", { value: platform, configurable: true });
+}
+
beforeEach((t) => {
t.mock.method(console, "log", () => {});
t.mock.method(console, "error", () => {});
@@ -67,135 +78,134 @@ beforeEach((t) => {
afterEach(() => {
Module._load = originalLoad;
+ setPlatform(originalPlatform);
+ if (originalAppImage === undefined) delete process.env.APPIMAGE;
+ else process.env.APPIMAGE = originalAppImage;
});
-test("with App updates off, startup and periodic checks never reach the update feed", (t) => {
- t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
- const autoUpdater = makeAutoUpdater();
- const manager = createUpdateManager(autoUpdater);
- manager.setWindowManager({
- notificationPrefs: { notificationsEnabled: true, notifyUpdates: false },
- });
+test("startup and periodic checks run whether or not automatic updates are on", (t) => {
+ for (const enabled of [true, false, null]) {
+ t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
+ const autoUpdater = makeAutoUpdater();
+ const manager = createUpdateManager(autoUpdater);
+ if (enabled !== null) manager.setAutoUpdatesEnabled(enabled);
- manager.checkForUpdatesOnStartup();
- t.mock.timers.tick(STARTUP_DELAY_MS);
- assert.equal(autoUpdater.calls, 0, "startup check must be skipped");
- t.mock.timers.tick(PERIODIC_INTERVAL_MS);
- assert.equal(autoUpdater.calls, 0, "periodic check must be skipped");
+ manager.checkForUpdatesOnStartup();
+ t.mock.timers.tick(STARTUP_DELAY_MS);
+ assert.equal(autoUpdater.calls, 1, `startup check with preference ${enabled}`);
+ t.mock.timers.tick(PERIODIC_INTERVAL_MS);
+ assert.equal(autoUpdater.calls, 2, `periodic check with preference ${enabled}`);
- manager.cleanup();
+ manager.cleanup();
+ t.mock.timers.reset();
+ }
});
-test("with App updates on, startup and periodic checks run as before", (t) => {
- t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
+test("before the renderer syncs the preference, an available update is not downloaded", () => {
const autoUpdater = makeAutoUpdater();
const manager = createUpdateManager(autoUpdater);
- manager.setWindowManager({
- notificationPrefs: { notificationsEnabled: true, notifyUpdates: true },
- });
- manager.checkForUpdatesOnStartup();
- t.mock.timers.tick(STARTUP_DELAY_MS);
- assert.equal(autoUpdater.calls, 1);
- t.mock.timers.tick(PERIODIC_INTERVAL_MS);
- assert.equal(autoUpdater.calls, 2);
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 0);
manager.cleanup();
});
-test("prefs are read at fire time, so toggling App updates takes effect without a restart", (t) => {
- t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
+test("with automatic updates on, an available update downloads itself exactly once", () => {
const autoUpdater = makeAutoUpdater();
const manager = createUpdateManager(autoUpdater);
- const windowManager = {
- notificationPrefs: { notificationsEnabled: true, notifyUpdates: false },
- };
- manager.setWindowManager(windowManager);
- manager.checkForUpdatesOnStartup();
- t.mock.timers.tick(STARTUP_DELAY_MS);
- assert.equal(autoUpdater.calls, 0);
+ manager.setAutoUpdatesEnabled(true);
+
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 1);
- windowManager.notificationPrefs.notifyUpdates = true;
- t.mock.timers.tick(PERIODIC_INTERVAL_MS);
- assert.equal(autoUpdater.calls, 1, "next periodic tick runs once re-enabled");
+ // A periodic re-check while the download is in flight must not start another.
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 1);
- windowManager.notificationPrefs.notifyUpdates = false;
- t.mock.timers.tick(PERIODIC_INTERVAL_MS);
- assert.equal(autoUpdater.calls, 1, "and is skipped again once disabled");
+ autoUpdater.listeners["update-downloaded"]({ version: "9.9.9" });
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 1, "a downloaded update is never fetched again");
manager.cleanup();
});
-test("before renderer prefs arrive, checks keep today's check-by-default behavior", (t) => {
- t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
+test("with automatic updates off, an available update waits for the user", () => {
const autoUpdater = makeAutoUpdater();
const manager = createUpdateManager(autoUpdater);
+ manager.setAutoUpdatesEnabled(false);
- manager.checkForUpdatesOnStartup();
- t.mock.timers.tick(STARTUP_DELAY_MS);
- assert.equal(autoUpdater.calls, 1);
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 0);
manager.cleanup();
});
-test("a manual Check for Updates is never gated by the toggle", async () => {
+test("enabling automatic updates after the startup check found one starts the download", () => {
const autoUpdater = makeAutoUpdater();
const manager = createUpdateManager(autoUpdater);
- manager.setWindowManager({
- notificationPrefs: { notificationsEnabled: false, notifyUpdates: false },
- });
- const result = await manager.checkForUpdates();
+ autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ assert.equal(autoUpdater.downloads, 0, "preference unknown, so nothing downloads yet");
- assert.equal(autoUpdater.calls, 1);
- assert.equal(result.updateAvailable, false);
+ manager.setAutoUpdatesEnabled(true);
+ assert.equal(autoUpdater.downloads, 1);
+
+ manager.setAutoUpdatesEnabled(true);
+ assert.equal(autoUpdater.downloads, 1, "re-syncing the preference does not restart it");
+
+ manager.cleanup();
});
-test("offline with App updates off, no update-error reaches the renderers (#1605)", (t) => {
+test("a failed background check only reaches renderers as update-error", (t) => {
t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
const autoUpdater = makeAutoUpdater({ offline: true });
const manager = createUpdateManager(autoUpdater);
const sent = [];
- const windowManager = {
- notificationPrefs: { notificationsEnabled: true, notifyUpdates: false },
+ manager.setWindowManager({
mainWindow: makeRendererWindow(sent),
controlPanelWindow: makeRendererWindow(sent),
- };
- manager.setWindowManager(windowManager);
+ });
manager.checkForUpdatesOnStartup();
t.mock.timers.tick(STARTUP_DELAY_MS);
- assert.deepEqual(sent, [], "a skipped check produces no renderer traffic at all");
-
- windowManager.notificationPrefs.notifyUpdates = true;
- t.mock.timers.tick(PERIODIC_INTERVAL_MS);
- assert.ok(sent.includes("update-error"));
+ assert.deepEqual([...new Set(sent)], ["update-error"]);
manager.cleanup();
});
-test("the update-available popup honors the same App updates gate", () => {
- const cases = [
- { prefs: { notificationsEnabled: true, notifyUpdates: true }, shown: 1 },
- { prefs: { notificationsEnabled: true, notifyUpdates: false }, shown: 0 },
- { prefs: { notificationsEnabled: false, notifyUpdates: true }, shown: 0 },
- ];
+test("on macOS and Windows the updater reports itself as supported", async () => {
+ for (const platform of ["darwin", "win32"]) {
+ setPlatform(platform);
+ const manager = createUpdateManager(makeAutoUpdater());
+ assert.equal((await manager.getUpdateStatus()).isSupported, true, platform);
+ manager.cleanup();
+ }
+});
+
+test("a Linux AppImage is supported, but deb/rpm/tar.gz installs never touch the feed", async (t) => {
+ t.mock.timers.enable({ apis: ["setTimeout", "setInterval"] });
+ setPlatform("linux");
- for (const { prefs, shown } of cases) {
- const autoUpdater = makeAutoUpdater();
- const manager = createUpdateManager(autoUpdater);
- const popups = [];
- manager.setWindowManager({
- notificationPrefs: prefs,
- showUpdateNotification(info) {
- popups.push(info);
- return Promise.resolve();
- },
- });
+ process.env.APPIMAGE = "/opt/OpenWhispr.AppImage";
+ const appImage = createUpdateManager(makeAutoUpdater());
+ assert.equal((await appImage.getUpdateStatus()).isSupported, true);
+ appImage.cleanup();
- autoUpdater.listeners["update-available"]({ version: "9.9.9" });
+ delete process.env.APPIMAGE;
+ const autoUpdater = makeAutoUpdater();
+ const packaged = createUpdateManager(autoUpdater);
+ packaged.setAutoUpdatesEnabled(true);
+ assert.equal((await packaged.getUpdateStatus()).isSupported, false);
- assert.equal(popups.length, shown, JSON.stringify(prefs));
- manager.cleanup();
- }
+ packaged.checkForUpdatesOnStartup();
+ t.mock.timers.tick(STARTUP_DELAY_MS + PERIODIC_INTERVAL_MS);
+ assert.equal(autoUpdater.calls, 0, "no automatic checks are scheduled");
+
+ const result = await packaged.checkForUpdates();
+ assert.equal(autoUpdater.calls, 0, "a manual check short-circuits too");
+ assert.equal(result.updateAvailable, false);
+ assert.match(result.message, /package manager/);
+
+ packaged.cleanup();
});
diff --git a/test/helpers/windowManagerMeetingNotification.test.js b/test/helpers/windowManagerMeetingNotification.test.js
index bfdef5beb..156c625b5 100644
--- a/test/helpers/windowManagerMeetingNotification.test.js
+++ b/test/helpers/windowManagerMeetingNotification.test.js
@@ -343,13 +343,10 @@ test("push-to-talk dictation follows the companion pill's availability", () => {
test("window manager starts fail-closed and suppresses normal-app popup surfaces", async () => {
const manager = new WindowManager();
- const update = { version: "2.0.0", releaseDate: "2026-08-20" };
assert.equal(manager.isMeetingInputAllowed(), false);
assert.equal(await manager.showMeetingNotification({ detectionId: "onboarding" }), false);
assert.equal(await manager.showTranscriptionPreview("partial transcript"), undefined);
- assert.equal(await manager.showUpdateNotification(update), false);
- assert.deepEqual(manager._deferredUpdateNotificationInfo, update);
assert.deepEqual(createdWindows, []);
});