Athena — roomy-mobile/features/archive/2026-01-05-fix-notification-permissions/proposal.md

Change: Fix Notification Permissions Flow

Why

The current notification implementation lacks OS permission handling. Users can toggle Firestore preferences but notifications won't arrive if OS permission is denied. There's no consent flow, no permission status detection, and no way to open system settings when permission is denied.

What Changes

  • NEW permission_handler package integration for notification permission status
  • NEW Home screen CTA banner for notification consent (visible when permission is undetermined)
  • NEW Consent bottom sheet with artwork and Accept/Cancel buttons
  • NEW osPermissionGranted: bool? field in NotificationPreferencesDto to track user's permission decision history
  • NEW Permission status sync service to reconcile OS permission with Firestore preferences
  • NEW Full analytics funnel for notification permission flow
  • MODIFIED NotificationSettingsView to show disabled state with "Open Settings" when OS permission denied
  • MODIFIED NotificationSettingsViewModel to sync toggle state with OS permission
  • MODIFIED NotificationPreferencesService to handle OS permission sync on app startup

Impact

  • Affected specs: notification-preferences (MODIFIED)
  • Affected code:
    • lib/notifications/ - Permission handling service, consent widgets
    • lib/households/views/home/ - CTA banner integration
    • pubspec.yaml - Add permission_handler dependency

Reacties

Nog geen reacties