feat: add push pre-prompt integration (part 3) cp-7.80.0#30476
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
299042a to
02a85c5
Compare
02a85c5 to
404275d
Compare
404275d to
fca1ddd
Compare
- Add useNotificationsRuntimeGate (isUnlocked, isSignedIn, isBasicFunctionality, featureFlag) - Wire as default enabled in useNotificationsMarketingConsent; prevents pre-auth AUS calls - Add missing isSignedIn gate (present in useRegisterAndFetchNotifications, absent here) - Simplify usePushPrePromptVariant: compose runtime gate + prompt-local conditions into canShowPrePrompt
…In gate - Split canShowPrePrompt into lightweight push-permission gate (completedOnboarding + featureFlag + basicFunctionality, no isSignedIn) and full marketing-consent gate (existing runtimeGate behaviour) - Push-permission sheet now shows immediately after onboarding without waiting for AuthenticationController.performSignIn() network round-trip - Gate useNotificationsMarketingConsent on the full gate so user-storage queries are not initiated on the new-user fast path
47f781d to
819d884
Compare
…atform - Add isPushPermissionGranted and isPushPermissionPromptable helpers in NotificationService (Notifee) with explicit intent names - Switch push-notification-status and pre-prompt eligibility to use isPushPermissionGranted (Notifee) directly - Use isPushPermissionPromptable in PushNotificationOnboarding to guard the OS prompt call on both platforms Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #30476 +/- ##
==========================================
+ Coverage 82.32% 82.38% +0.06%
==========================================
Files 5542 5568 +26
Lines 149438 150033 +595
Branches 34455 34595 +140
==========================================
+ Hits 123028 123610 +582
+ Misses 18036 18027 -9
- Partials 8374 8396 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cc05c94 to
5e9974d
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR introduces a push notification pre-prompt system with several key changes:
Why other tags are NOT selected:
Performance Test Selection: |
|
weitingsun
left a comment
There was a problem hiding this comment.
mobile platform codeowner files app/util/metrics/UserSettingsAnalyticsMetaData/UserProfileAnalyticsMetaData.types.ts and app/core/Analytics/MetaMetrics.events.ts LGTM



Description
This is PR 3 of the GE-217 push pre-prompt rollout.
This PR mounts the push notification onboarding pre-prompt from
Nav/Mainand wires the production flow for the two currently supported startup variants:push_permission: shown to eligible users who have not granted OS push permission or do not yet have notification preferences.marketing_consent: shown to eligible existing users with push notifications enabled but marketing notification preferences disabled.The prompt resolver now gates display on notification runtime eligibility, completed onboarding, the default-on feature flag, one-time “shown” storage, OS push permission status, Authenticated User Storage notification preferences, and pending social-login marketing-consent backfill. AUS preference reads stay behind the runtime gate, and resetting the developer “push pre prompt shown” flag does not immediately reopen the prompt until the app is restarted.
This PR also adds shared notification preference helpers used by Settings and startup onboarding, background enablement for the push pre-prompt path, marketing notification preference updates, toast copy, and MetaMetrics/identify instrumentation for pre-prompt actions, OS prompt responses, marketing consent, and push notification enablement.
Changelog
CHANGELOG entry: Added a startup prompt for eligible users to enable push notifications.
Related issues
Fixes: GE-217
Manual testing steps
Manual Testing Steps
Preconditions
Flow 1: New User / Push Permission Pre-Prompt
Setup
Steps
Also Verify
Flow 2: Existing User / App Update With Push Enabled But Marketing Consent Disabled
Setup
Steps
Flow 3: Existing User / App Update With Marketing Consent Enabled But Push Disabled
Setup
Steps
Regression Checks
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
For performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist