fix(engagement): latch startup marketing consent prompt cp-7.80.0#30808
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why no E2E tags are needed:
Performance Test Selection: |
Description
Fixes an issue where the marketing_consent notification pre-prompt could be re-triggered during the same app session after the user turned marketing consent off in Settings.
The pre-prompt is intended to behave as a startup flow. This change latches the marketing consent value used for startup prompt resolution, so once startup eligibility has resolved, later Redux updates from user actions do not cause the prompt to appear unexpectedly.
Social-login marketing consent backfill is still respected as part of startup resolution. If backfill is pending, the prompt waits for it to clear, then decides once using the resolved consent value.
Risk
Low risk.
This change is scoped to usePushPrePromptVariant, which only decides which notification pre-prompt variant to show. It does not change notification registration, OS permission requests, Settings behavior, analytics opt-in/out behavior, or persisted storage keys.
The change preserves existing behavior for the main paths:
Users without OS push permission still resolve to the push permission prompt first.
Users who already saw the pre-prompt remain suppressed by PUSH_PRE_PROMPT_SHOWN.
Users with marketing consent enabled do not see the marketing consent prompt.
Users with marketing consent disabled at startup can still see the one-time startup prompt if otherwise eligible.
Social-login users still wait for marketing consent backfill before the marketing prompt decision is made.
The risk is low because the fix narrows when the marketing consent prompt can appear rather than expanding eligibility. The only behavior removed is the unintended mid-session re-trigger after Settings opt-out.
Changelog
CHANGELOG entry: Fixed an issue where the marketing consent notification pre-prompt could reappear after turning marketing consent off in Settings.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist