medium priority low complexity documentation pending documentor Tier 6

Acceptance Criteria

End-to-end manual walkthrough on a physical iOS device (TestFlight build) and Android emulator confirms the full flow executes without errors: toggle off → no banner appears; toggle on → banner appears → tap → detail view renders → marked as read
Manual E2E walkthrough is executed with VoiceOver enabled on iOS to verify the accessible flow is unbroken
Component contract document for notification-preferences-screen includes: public API (constructor params, required providers), Riverpod provider dependencies (names and types), side effects (Supabase writes), and WCAG compliance summary
Component contract document for in-app-notification-banner includes: trigger mechanism (Realtime channel name and event type), dismiss behaviour (timer duration, manual dismiss), navigation callback signature, and WCAG compliance summary
Component contract document for scenario-notification-detail-view includes: required route arguments, repository calls and their timing (mount vs user action), deep-link router invocation contract, and WCAG compliance summary
Riverpod provider dependency diagram (text-based or Mermaid) is included showing provider relationships across the three components
WCAG compliance notes reference specific WCAG 2.2 success criteria by number (e.g., SC 1.4.3, SC 2.5.5) and state the compliance status (pass) for each
All documentation is written in English and committed to the repository under docs/features/scenario-push-engagement/
Documentation reviewed and approved by at least one other team member before the epic is closed

Technical Requirements

frameworks
Flutter
Riverpod
apis
scenario-notification-repository (579)
scenario-deep-link-router (578)
Supabase Realtime
data models
ScenarioNotification
ScenarioType
NotificationPreference
ScenarioPayload
security requirements
Documentation must not include real user data, production credentials, or sensitive payload examples — use anonymised placeholder data in all examples

Execution Context

Execution Tier
Tier 6

Tier 6 - 158 tasks

Can start after Tier 5 completes

Implementation Notes

Use Mermaid diagrams (supported natively in GitHub Markdown) for the Riverpod provider dependency graph — this is easy to maintain and renders in the repository. Structure each component contract document with consistent headings: Overview, Public API, Provider Dependencies, Side Effects, Navigation, WCAG Compliance. Keep documentation concise and developer-focused; avoid prose-heavy descriptions. Link from each component contract to the relevant source file path and test file path for quick navigation.

The WCAG audit checklist produced in task-011 should be referenced (not duplicated) from the component contracts. This documentation will be referenced during onboarding of new team members and during future accessibility reviews for the organisations (NHF, Blindeforbundet, HLF) which have contractual accessibility obligations.

Testing Requirements

No new automated tests in this task. E2E validation is manual: execute the full scenario flow on TestFlight (iOS) and Android emulator, recording pass/fail for each step in a checklist. If any step fails, create a bug issue referencing the relevant implementation task before closing the epic. VoiceOver walkthrough should be conducted by the developer or a designated tester familiar with screen reader usage.

Epic Risks (2)
medium impact medium prob technical

The in-app notification banner depends on a Supabase Realtime subscription to detect new notification records. If the subscription reconnects slowly after an app resume from background, or if Realtime delivery is delayed under high load, the banner may not appear within the 2-second acceptance criterion.

Mitigation & Contingency

Mitigation: Implement an explicit subscription reconnect handler on app foreground events using Flutter's AppLifecycleState.resumed hook, and add a polling fallback that queries for unread notifications once per app foreground event as a safety net against missed Realtime events.

Contingency: If Realtime proves unreliable in production, promote the polling fallback to the primary mechanism with a 30-second interval, accepting slight latency in exchange for reliability.

medium impact medium prob technical

Cold-start deep linking (app not running when push notification is tapped) requires deferred navigation after the Flutter engine and Supabase session are fully initialised. If the deep link is consumed before authentication completes, the router may navigate to a protected route without a valid session, causing an error or redirect loop.

Mitigation & Contingency

Mitigation: Implement a deferred navigation queue in scenario-deep-link-router that holds the parsed deep-link target until the auth session restoration lifecycle event fires, following the existing deep-link-handler pattern used in the BankID and Vipps authentication flows.

Contingency: If deferred navigation is not achievable within the epic's scope, fall back to navigating the user to the notification centre (which is always accessible post-login) where the relevant notification record is visible and tappable.