Receive Push Notification When Mentor Changes Availability Status
The Coordinator Notification Service is triggered automatically on every availability status change within the Pause Management Service. It resolves the correct coordinator for the affected mentor's organisation, constructs a notification payload containing the mentor's full name, the new status (paused or active), and the optional pause reason if provided, then dispatches the notification via a Supabase Edge Function through the push notification gateway. The notification deep-links to the mentor's profile in the app for rapid context switching. Notifications are also recorded in the notification repository for later reference in the Notifications Screen.
User Story
Acceptance Criteria
- Given a peer mentor in my organisation pauses their availability, when the status change is saved, then I receive a push notification within 10 seconds containing the mentor's name and new status
- Given the mentor provided a pause reason, when I receive the notification, then the notification body includes the reason text
- Given a peer mentor resumes active status, when the change is saved, then I receive a push notification indicating the mentor is available again
- Given I tap the availability change notification, when the app opens, then I am navigated directly to that mentor's profile detail screen
- Given my notification settings have availability alerts disabled, when a mentor changes status, then I do not receive a push notification but the change is still recorded in the notification repository
- Given the push notification gateway is temporarily unavailable, when a status change occurs, then the notification is queued and delivered when connectivity is restored
Business Value
Coordinators manage multiple peer mentors simultaneously and cannot be expected to monitor a dashboard continuously. Real-time push notifications on availability changes are the only scalable mechanism for keeping coordinators informed in time to adjust assignment planning. This directly addresses the workshop finding that 40% of peer mentors felt under-followed-up by coordinators — accurate availability data enables proactive engagement.
Components
- Coordinator Notification Service service
- Availability Repository data