Manage Personal Notification Preferences for Scenario Prompts
The notification preferences screen presents the peer mentor with a grouped list of notification types. The scenario-based engagement category is one group, listing individual scenario types (inactivity reminder, check-in prompt, escalation alert, etc.) with per-type toggles for push delivery and in-app banner display. Preference changes are persisted immediately to the notification preferences repository and synced with the backend so that the scenario evaluation edge function respects the mentor's choices at dispatch time. Changes take effect on the next evaluation cycle without requiring an app restart.
User Story
Acceptance Criteria
- Given the mentor navigates to notification preferences, When the screen loads, Then all scenario notification types are listed with their current push and in-app toggle states correctly reflecting stored preferences
- Given the mentor toggles off push notifications for the inactivity reminder scenario, When the scenario evaluation edge function next runs and finds an inactivity condition for that mentor, Then no FCM push notification is sent but an in-app notification record is still created if in-app is enabled
- Given the mentor toggles off all channels for a scenario type, When the condition for that scenario is met, Then no notification of any kind is created for that scenario type for that mentor
- Given the mentor saves their preferences, When they force-close and reopen the app, Then the preference toggles reflect the previously saved state
- Given the preferences screen is open, When the mentor has multiple FCM tokens (multiple devices), Then preference changes apply across all devices for that user account
Business Value
Giving peer mentors control over notification frequency prevents notification fatigue, which is a leading cause of users disabling all notifications entirely. Respecting autonomy increases long-term engagement and reduces the risk of mentors opting out of the entire communication system.