--- description: Push notifications and deep linking for {{PROJECT_NAME}} globs: ["lib/**/*.dart", "android/**", "ios/**", "test/**/*.dart"] alwaysApply: false --- # Push & deep linking — {{PROJECT_NAME}} ## Context Special capabilities from `project-brief.yaml`: **{{SPECIAL_FEATURES}}**. Native and server configuration must stay consistent. ## Constraints - **Push:** request permissions through the platform flow; handle denial gracefully; no silent failures on token registration - **Routing:** deep links and notification taps MUST go through **{{ROUTING}}** (no ad-hoc `Navigator` stacks for inbound links) - **Payloads:** map FCM/APNs/Supabase payloads to domain models in the data layer — no JSON parsing scattered in widgets - **iOS:** exercise push on a **physical device** when possible (simulator limitations) - **Android:** declare required permissions explicitly; target API behaviour for POST_NOTIFICATIONS where applicable ## Testing - Unit-test payload → domain mapping and routing targets - Integration/E2E: cold start, background, and foreground tap-to-open flows when `testing.depth` allows