Implement escalation acknowledgement actions
epic-assignment-follow-up-reminders-ui-task-004 — Add acknowledgement action buttons to CoordinatorEscalationNotificationCard: acknowledge (closes the escalation loop) and navigate-to-assignment. Wire both actions to the Riverpod provider managing escalation state, ensuring that acknowledging updates the notification record in the in-app notification repository and removes the card from the coordinator's notifications list.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
Model the loading state directly in the Riverpod notifier: `AsyncValue
File location: extend `lib/features/notifications/widgets/coordinator_escalation_notification_card.dart` and update the corresponding Riverpod notifier under `lib/features/notifications/providers/escalation_notification_notifier.dart`.
Testing Requirements
Widget tests using flutter_test with a mocked Riverpod provider and mocked in-app notification repository (mocktail/ProviderScope override): (1) tapping Acknowledge dispatches acknowledgeEscalation with the correct notification ID; (2) loading spinner appears during async call; (3) card is removed from the notifications list on success; (4) card is restored and error snackbar shown when repository throws; (5) tapping View Assignment does not call acknowledgeEscalation. Use `ProviderScope` with overrides to inject mock providers in widget tests. All tests pass without a live Supabase connection.
The deep-link from the notification card to the assignment detail screen depends on the assignment detail route being stable and accepting an assignment ID parameter. If the routing contract is undocumented or changes during parallel development, the CTA will silently navigate to a fallback screen.
Mitigation & Contingency
Mitigation: Confirm the assignment detail route path and parameter contract with the team building or maintaining that screen before implementing the CTA. Add an integration test that asserts navigating from a mock notification card with a known assignment ID lands on the correct route.
Contingency: If the route is unstable, implement the deep-link as a late-bound string resolved from a central route registry, allowing the target route to be updated without changing the notification card.
Visually distinguishing escalation cards from standard reminder cards using colour alone fails WCAG 1.4.1 (use of colour). Blindeforbundet users relying on screen readers must receive equivalent contextual information through semantics, not just visual styling.
Mitigation & Contingency
Mitigation: Use both colour and an icon/label difference to distinguish card types. Add explicit Semantics widgets with descriptive labels ('Escalation alert: peer mentor has not responded') so screen readers announce the type without visual context.
Contingency: If accessibility review flags the distinction, add a text badge ('Escalation') alongside the visual treatment as a code-change-only fix with no schema or service impact.