Resume an Interrupted Activity Registration Draft
The Activity Registration Service implements partial save (draft persistence) throughout the wizard flow. After each step is validated and the user advances, the current wizard state is written to a dedicated drafts table in Supabase via the Activity Repository. If the user exits the app or navigates away before completing registration, the draft is preserved. On the next wizard launch, if a draft exists, the user is offered the choice to 'Resume Draft' or 'Start New'. Resuming loads the wizard at the step following the last completed step, with all previously entered fields restored. Drafts are scoped per user and automatically deleted upon successful submission or explicit cancellation. WCAG cognitive accessibility guidelines recommend this pattern specifically to support users with attention or memory challenges who may be interrupted mid-task.
User Story
Acceptance Criteria
- Given the user has advanced through at least one wizard step, when they close the app or navigate away, then the current wizard state is saved as a draft in Supabase
- Given a saved draft exists, when the user launches the activity registration flow again, then a prompt offers 'Resume Draft' (with a brief description of the draft's contents) or 'Start New'
- Given the user selects 'Resume Draft', when the wizard reopens, then it navigates to the first incomplete step with all previously entered data restored in all preceding steps
- Given the user selects 'Start New', when the wizard launches, then the draft is discarded and the wizard begins fresh with default values
- Given the user completes a draft registration and submits successfully, when the submission is confirmed, then the draft record is deleted from Supabase
- Given a user has a draft older than 30 days, when they launch the wizard, then the stale draft is automatically discarded and the user is notified that a previous draft was cleared
Business Value
Peer mentors typically register activities in the field immediately after a visit, often on a smartphone with frequent interruptions. Without draft persistence, any interruption (phone call, notification, accidental app switch) would force the user to restart registration entirely, increasing frustration and likelihood of abandonment. For users with cognitive impairments (a specific NHF requirement for stroke patient accessibility), losing progress mid-task is particularly disorienting. Draft persistence aligns with WCAG 2.2 AA error prevention guidelines and directly reduces registration abandonment rates.
Components
- Activity Wizard Screen ui
- Activity Registration Service service
- Activity Repository data