only show OS notifications when the app is hidden#5155
Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit intoJul 20, 2026
Conversation
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
July 20, 2026 17:28
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Suppresses native Windows and macOS notifications while the main window is visible, using in-app notifications where appropriate.
Changes:
- Tracks whether the main window is visible and not minimized.
- Routes macOS notifications by level and fallback policy.
- Prevents Windows OS toasts while the app is on screen.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
MainWindow.axaml.cs |
Tracks thread-safe on-screen window state. |
WindowsAppNotificationBridge.cs |
Suppresses native toasts while visible. |
MacOsNotificationBridge.cs |
Adds notification levels and context-aware delivery. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Jul 20, 2026
Gabriel Dufresne (GabrielDuf)
deleted the
feat/os-notifications-only-when-hidden
branch
July 20, 2026 19:57
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.
This pull request improves the notification system for both macOS and Windows by making notifications more context-aware and reducing redundant OS toasts when the application window is visible. It introduces a new mechanism to suppress native notifications while the user is actively viewing the app, ensuring that only in-app notifications are shown in this case. The changes also add support for specifying notification levels and controlling in-app fallback behavior.
Notification delivery improvements:
DeliverNotificationinMacOsNotificationBridge.csto accept aRuntimeNotificationLeveland anallowInAppFallbackflag, allowing finer control over notification type and delivery method. Now, if the main window is visible, notifications are shown in-app instead of as OS toasts.MacOsNotificationBridge.cs(ShowProgress,ShowSuccess,ShowError,ShowUpdatesAvailableNotification,ShowUpgradingPackagesNotification,ShowSelfUpdateAvailableNotification,ShowNewShortcutsNotification) now specify the notification level and, where appropriate, disable in-app fallback to ensure consistent behavior.Windows notification logic:
ShowinWindowsAppNotificationBridge.csto only show native OS toasts if the main window is not on screen, preventing duplicate notifications when the user is already looking at the app.Main window state tracking:
_isOnScreenproperty toMainWindow.axaml.csto track whether the window is visible and not minimized, and exposed it viaIsWindowOnScreenfor use by notification bridges._isOnScreenup to date, ensuring notification logic always reflects the current UI state.