Receive Automatic 10-Day Reminder Trigger and See Overdue Assignments Flagged
A Supabase scheduled Edge Function (Assignment Reminder Service) runs daily and scans all assignment_dispatches records for entries where no acknowledgement has been received within 10 days. For each qualifying record, it dispatches a push notification to the peer mentor via the Push Notification Gateway. On the coordinator side, the Assignment Status Overview Screen displays these same assignments highlighted in an overdue state, giving the coordinator a prioritised view of where manual follow-up may also be needed. The coordinator does not need to configure or trigger this — it runs automatically.
User Story
Acceptance Criteria
- Given an assignment has been dispatched and no read receipt has been recorded after 10 days, when the daily Edge Function cron job runs, then a push notification reminder is sent to the assigned peer mentor
- Given the push notification is dispatched, when the coordinator opens the Assignment Status Overview Screen, then the affected assignment is marked as Overdue with the number of days since dispatch visible
- Given the Edge Function runs and no assignments qualify as overdue, when the job completes, then no spurious notifications are sent and no state changes occur
- Given the peer mentor reads the assignment before or after the 10-day mark, when the read receipt is recorded, then the overdue flag is cleared and no further reminders are sent for that assignment
- Given the coordinator views the status overview, when they filter by overdue, then only assignments exceeding 10 days without acknowledgement are shown
Business Value
Manual follow-up for every unacknowledged assignment is unsustainable and a known coordinator pain point. The automatic 10-day reminder eliminates the risk of assignments being silently forgotten, directly improving the quality and timeliness of peer support services. It also reduces coordinator workload by only escalating cases that have genuinely gone unaddressed.
Components
- Assignment Reminder Service service
- Assignment Status Overview Screen ui
- Task Assignment Repository data
- Push Notification Gateway infrastructure
- Encryption Infrastructure infrastructure