Skip to content

Push notification token management#5178

Merged
dgboss merged 37 commits intomainfrom
task/fcm-tokens/4906
Mar 10, 2026
Merged

Push notification token management#5178
dgboss merged 37 commits intomainfrom
task/fcm-tokens/4906

Conversation

@dgboss
Copy link
Collaborator

@dgboss dgboss commented Mar 2, 2026

  • Uses @capacitor-firebase/messaging instead of @capacitor/push-notifications as it simplifies token handling (ie. no need to handle FCM and APNs tokens separately)
  • Uses @capacitor/device to get unique device id for storage of fcm tokens
  • Android and iOS boilerplate to prompt user to allow push notifications
  • DB table for token tracking
  • CRUD ops for token management

Will require local copies of mobile/asa-go/ios/App/App/GoogleService-Info.plist and mobile/asa-go/android/app/google-services.json for iOS and Android builds respectively.

When we implement the sending of push notifications we will need to also implement deactivating unregistered tokens.

Closes: #4906

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 78.12500% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.38%. Comparing base (2bdfad6) to head (c00bbb6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
mobile/asa-go/src/App.tsx 30.76% 7 Missing and 2 partials ⚠️
mobile/asa-go/src/api/pushNotificationsAPI.ts 0.00% 6 Missing ⚠️
...ile/asa-go/src/services/pushNotificationService.ts 85.71% 4 Missing and 1 partial ⚠️
backend/packages/wps-api/src/app/routers/fcm.py 91.17% 2 Missing and 1 partial ⚠️
mobile/asa-go/src/hooks/usePushNotifications.ts 81.25% 3 Missing ⚠️
mobile/asa-go/src/slices/authenticationSlice.ts 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5178      +/-   ##
==========================================
+ Coverage   68.90%   69.38%   +0.48%     
==========================================
  Files         392      463      +71     
  Lines       16373    17804    +1431     
  Branches     1846     2071     +225     
==========================================
+ Hits        11281    12354    +1073     
- Misses       4508     4801     +293     
- Partials      584      649      +65     
Flag Coverage Δ
asa_go 74.36% <69.51%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dgboss dgboss requested review from brettedw and conbrad March 3, 2026 22:48
@dgboss dgboss requested a review from conbrad March 4, 2026 16:18
@dgboss dgboss requested a review from brettedw March 5, 2026 22:06
Copy link
Collaborator

@conbrad conbrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, great work!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@dgboss dgboss temporarily deployed to production March 10, 2026 17:07 Inactive
@dgboss dgboss merged commit 49ba2ac into main Mar 10, 2026
44 of 45 checks passed
@dgboss dgboss deleted the task/fcm-tokens/4906 branch March 10, 2026 17:16
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.

ASA Go: Notifications & Device Tracking

3 participants