fix: backfill-consent-event cp-7.73.0#28080
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e1c2f11. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR introduces a one-time analytics backfill mechanism for social login (seedless onboarding) users. Key changes:
Tag Selection Rationale:
The changes are primarily analytics/tracking infrastructure and don't affect core wallet functionality like transactions, swaps, or network management, so other tags are not warranted. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
Social login (Google / Apple) users who completed onboarding before the
ANALYTICS_PREFERENCE_SELECTEDevent was emitted on the marketing-consentscreen never had that event fired for them. This PR introduces a one-time
post-rehydration backfill so those users are counted correctly in analytics.
How it works (three-step design kept intentionally pure):
Migration 131 – runs at startup before the Redux store is live. If the
persisted state contains a
SeedlessOnboardingController.authConnectionvalue, it writes a
marker into
onboarding.seedless.pendingSocialLoginMarketingConsentBackfill.The migration never fires analytics itself; it only stamps the persisted
state so the side effect can be done safely after rehydration.
Redux slice – a new
SET_PENDING_SOCIAL_LOGIN_MARKETING_CONSENT_BACKFILLaction/reducer/selector manages the marker in
state.onboarding.seedless.Saga –
backfillSocialLoginMarketingConsentruns once insidestartAppServices(aftersetAppServicesReady). It reads the marker fromthe live store, fires
ANALYTICS_PREFERENCE_SELECTEDwithsaveDataRecording: true, callsupdateDataRecordingFlag, and clears themarker. If the marketing consent is no longer enabled at run time (e.g. user
toggled it off between migrations) the marker is cleared without sending any
analytics. If
trackEventthrows, the marker is left in place so a futurerun can retry.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new persisted onboarding marker, a state migration, and a login-triggered saga that sends analytics/updates consent flags; mistakes could cause missed or duplicate analytics and unexpected consent state changes after rehydration.
Overview
Adds a one-time post-rehydration analytics backfill for legacy social login (Google/Apple) users who never emitted
ANALYTICS_PREFERENCE_SELECTEDfor marketing consent.This introduces a new onboarding state marker (
pendingSocialLoginMarketingConsentBackfill) with action/reducer/selector support, sets it via newmigration 131based onSeedlessOnboardingController.authConnection, and runs a newbackfillSocialLoginMarketingConsentSagaafterLOGINto optionally query OAuth marketing opt-in, emit the analytics identify/event (withsaveDataRecording: true), update recording viaupdateDataRecordingFlag, then clear the marker and syncsetDataCollectionForMarketing.Wallet deletion now also clears the marker, and tests were added/updated across onboarding reducer/selectors, migrations, and sagas.
Reviewed by Cursor Bugbot for commit 2a0bacd. Bugbot is set up for automated code reviews on this repo. Configure here.