fix(desktop): enable native Windows toast notifications - #6689
Open
fatima-n09 wants to merge 2 commits into
Open
fix(desktop): enable native Windows toast notifications#6689fatima-n09 wants to merge 2 commits into
fatima-n09 wants to merge 2 commits into
Conversation
The show_native_notification command only handled Linux and macOS. On Windows it returned an error, forcing the frontend to fall through to window.Notification (WebKit API). WebView2's Notification.permission reports 'denied' even when the WinRT toast API is available, so the app never appeared in Windows Settings > System > Notifications and the settings toggle was stuck showing 'Desktop notifications are blocked.' - Add tauri-winrt-notification as a Windows-specific dependency - Add a windows module in notifications.rs that posts WinRT toasts using the app's Tauri identifier as AppUserModelID (this is what registers the app with Windows notification settings) - Handle click actions through WinRT Activated handler, forwarding to the same native-notification-activated event that Linux uses - Add isWindowsPlatform() helper to platform.ts - Skip WebView2 Notification.permission check on Windows in getDesktopNotificationPermissionState() — use the Tauri plugin's isPermissionGranted() which queries native WinRT status - Route Windows through the native show_native_notification path in sendDesktopNotification() - Skip the Tauri plugin's onAction listener on Windows (click actions come through the native WinRT event instead) Fixes block#6377 Signed-off-by: Fatima Nur <fatimanur424@example.com>
fatima-n09
force-pushed
the
fix/windows-desktop-notifications
branch
from
August 24, 2026 14:03
cb080fd to
cbc66de
Compare
4 tasks
Chessing234
suggested changes
Aug 25, 2026
Chessing234
left a comment
Contributor
There was a problem hiding this comment.
this overlaps #6678 — both add a windows toast path (winrt vs the tauri plugin). please pick one; if this is the native path, drop the plugin send on windows so we don't double-fire.
Add explicit comment in sendDesktopNotification() stating that the Tauri notification plugin's sendNotification() must not be used on Windows — the native WinRT path handles delivery and click actions exclusively. This clarifies the design intent for reviewers and prevents future contributors from adding a duplicate Tauri plugin path on Windows. Signed-off-by: Fatima Nur <fatimanur424@example.com>
Author
|
@Chessing234 Thanks for the review! You're right about the overlap with #6678. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Root cause
Fix
Files:
Tests added: