Skip to content

Release 2026.31 - #422

Merged
abroa01 merged 10 commits into
mainfrom
development
Jul 31, 2026
Merged

abroa01 merged 10 commits into
mainfrom
development

Conversation

@abroa01

@abroa01 abroa01 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added a new cordova.plugins.diagnostic dependency to enable deep-linking users to OS app settings for notification permissions. (.meteor/cordova-plugins)
  • Implemented checkNotificationPermission and openAppSettings in client/mobile/notification-permissions.js to check and manage OS-level notification permission, storing the result in Session for UI access.
  • Integrated permission checks into the app startup and resume lifecycle in client/main.jsx, ensuring the UI always reflects the current permission state. [1] [2]

User Interface Enhancements

  • Added a new NotificationSettings screen (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.
  • Updated app routes to include the new notification settings page, accessible via /settings/notifications on mobile. [1] [2]
  • Enhanced the dashboard header (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

  • Improved handling of test notifications in the foreground by surfacing an in-app toast instead of silently ignoring them.
  • Added notes and safeguards around push notification configuration to prevent breaking in-app actions.

UI Feedback and Toaster Improvements

  • Refined the SuccessToaster component 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.

abroa01 and others added 10 commits July 31, 2026 13:19
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
@abroa01
abroa01 merged commit d6883ec into main Jul 31, 2026
2 checks passed
@abroa01 abroa01 linked an issue Aug 10, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release 2026.31

1 participant