From 9fe89a1998b30a83aea7f6581420649f51a9526c Mon Sep 17 00:00:00 2001 From: Cynthia Rohr Date: Mon, 24 Aug 2026 09:44:30 +0200 Subject: [PATCH] fix(desktop): deliver Windows notifications and clear false "blocked" banner On Windows the desktop app misreported notification permission and never posted native toasts, which also suppressed the in-app notification sound. - getDesktopNotificationPermissionState() trusted the WebView2 DOM Notification.permission, which defaults to "denied" on Windows even though native toasts are delivered by the Tauri notification plugin. That surfaced a false "Desktop notifications are blocked" banner and bounced the enable toggle; because no notification "sent", playNotificationSound() never fired. Read the plugin (the real delivery path here) as the source of truth on Windows instead. - sendDesktopNotification() posted only via the DOM Notification API on Windows, which WebView2 does not surface as an OS toast. Route Windows through the plugin's sendNotification (native Windows toast); click-through arrives via the existing onAction listener, and silent avoids doubling the in-app sound. Adds isWindowsPlatform(); macOS and Linux paths are unchanged. Signed-off-by: Cynthia Rohr --- .../src/features/notifications/lib/desktop.ts | 40 ++++++++++++++++++- desktop/src/shared/lib/platform.ts | 9 +++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/desktop/src/features/notifications/lib/desktop.ts b/desktop/src/features/notifications/lib/desktop.ts index 0844c24de51..f5089bb8689 100644 --- a/desktop/src/features/notifications/lib/desktop.ts +++ b/desktop/src/features/notifications/lib/desktop.ts @@ -5,8 +5,13 @@ import { isPermissionGranted, onAction, requestPermission, + sendNotification, } from "@tauri-apps/plugin-notification"; -import { isLinuxPlatform, isMacPlatform } from "@/shared/lib/platform"; +import { + isLinuxPlatform, + isMacPlatform, + isWindowsPlatform, +} from "@/shared/lib/platform"; // Backend event emitted when a native Linux notification is clicked or a // queued macOS activation becomes available. See src-tauri notification code. @@ -146,6 +151,19 @@ export async function getDesktopNotificationPermissionState(): Promise