From d019347e03cf8f5e9bf0c84cf4c543254e5afb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 23:06:35 -0400 Subject: [PATCH] fix(notification): close visible notifications during destroy on Windows --- src/main/notification-service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/notification-service.ts b/src/main/notification-service.ts index d2e1b1d0..aaf62ef3 100644 --- a/src/main/notification-service.ts +++ b/src/main/notification-service.ts @@ -195,6 +195,11 @@ export function createNotificationService(deps: NotificationServiceDependencies) clearTimeout(batch.timer); } activeBatches.clear(); + // Dismiss any still-visible notifications so Windows toast host does not + // leave ghost toasts after quit. + for (const notification of activeNotifications) { + try { notification.close(); } catch { /* toast may have already closed */ } + } activeNotifications.clear(); }