Release 2026.31 - #422
Merged
Merged
Release 2026.31#422
Conversation
Add a 'Send Test' button on the mobile dashboard so a signed-in user can send a push notification to their own approved device(s) and verify that push delivery is working end-to-end. - server: new notifications.sendTest Meteor method that uses this.userId (never a client-supplied id), reuses getApprovedFCMTokensByUserId, and sends a plain, non-actionable notification. Counts only real deliveries. - client: self-contained TestNotificationButton component with loading and success/error feedback, wired into LandingPage.
- Relocate the test-notification action from the center of the dashboard into the header utility icon group (it is a debug/utility action, not a primary feature). - Enable iOS forceShow so foreground pushes display an OS banner, matching the existing Android behavior (previously iOS suppressed the banner while the app was in the foreground). - Add a reusable error variant to SuccessToaster for failure feedback.
Users who deny/dismiss the OS notification prompt previously had no in-app way to re-enable notifications (required uninstall/reinstall). Since the OS won't re-prompt once denied, the app now detects the disabled state and deep-links users to the OS app-settings screen. - Detect status via the existing push plugin's PushNotification.hasPermission() (no new runtime permissions) - Open OS settings via cordova.plugins.diagnostic core module (switchToSettings); restricted to core-only via modules preference to avoid pulling in Location/Bluetooth/Camera permissions - Re-check permission on deviceready and resume - New Notifications settings page at /settings/notifications, reachable from a Bell button in the dashboard header - Covers new and existing users (runtime check, no migration)
- SuccessToaster: drive the auto-close timer off message changes and read onClose from a ref, so inline-lambda callbacks no longer restart or skip the timer, and no timer runs when there is no message. - firebase.js: attach the iOS approval category (Approve/Reject buttons, incl. Apple Watch mirroring) only when the payload carries approval actions, so the test notification stays plain and non-actionable.
Revert iOS forceShow:true — with it the push plugin only shows the OS banner for foreground pushes and defers the JS 'notification' event until tap, which stopped the approve/reject modal from auto-opening. Instead: - Foreground test pushes are surfaced via an in-app toast explaining that the OS only shows a banner when the app is backgrounded. - notifications.sendTest accepts an optional delaySeconds (0-60); delayed sends are scheduled server-side so the user can background/close the app to verify the system banner. - Test button now opens a small menu: send now / in 5s / 10s / 30s. - SuccessToaster respects the iOS safe-area inset, caps its width, and wraps long messages so it no longer overlaps the header.
feat: add test push notification button (mobile)
…push-notifications # Conflicts: # client/mobile/src/ui/components/DashboardHeader.jsx
The header had six cramped icons including two near-identical bells (Notify + Test). Consolidate secondary actions into a single More (overflow) menu built with the design-system Dropdown, keeping only Refresh, theme toggle, and Logout inline. - Move test-send logic into a useTestNotification hook so its toasts render at the header root and survive the menu closing on selection - Test options (Send now / 5s / 10s / 30s) are hidden until the user expands the 'Test notification' row - Rename the misleading 'Notifications' entry to 'Notification permission' - Remove the now-unused TestNotificationButton component
feat: let users re-enable push notifications after denial
Closed
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 introduces a comprehensive OS-level push notification permission check and user experience improvements for the mobile app. It adds a new notification settings screen, integrates permission status checks and recovery into the app lifecycle, and refines notification handling and UI feedback. Additionally, the dashboard header now provides quick access to notification settings and test notifications via an overflow menu.
Push Notification Permission Management
cordova.plugins.diagnosticdependency to enable deep-linking users to OS app settings for notification permissions. (.meteor/cordova-plugins)checkNotificationPermissionandopenAppSettingsinclient/mobile/notification-permissions.jsto check and manage OS-level notification permission, storing the result inSessionfor UI access.client/main.jsx, ensuring the UI always reflects the current permission state. [1] [2]User Interface Enhancements
NotificationSettingsscreen (client/mobile/src/ui/NotificationSettings.jsx) that displays the current notification permission state, provides user guidance, and allows opening system settings to re-enable notifications./settings/notificationson mobile. [1] [2]DashboardHeader.jsx) with an overflow menu for notification settings, help, and test notifications, improving accessibility and decluttering the main header. [1] [2] [3] [4]Notification Handling Improvements
UI Feedback and Toaster Improvements
SuccessToastercomponent to prevent timer resets on unrelated re-renders and improved its appearance and safe-area handling. [1] [2]These changes ensure users are better informed about their notification permission status, can easily recover from denied permissions, and benefit from a more intuitive and robust notification experience.