feat: social login attribution#29775
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 1 potential issue.
❌ 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 4cd0e59. Configure here.
| ReduxService.store.dispatch(saveAttribution(persistedPayload)); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Duplicate save path overwrites attribution_id on warm start
High Severity
When a deeplink with attribution_id (snake_case) opens the app from background, handleDeeplink correctly saves the full attribution (including attribution_id) via attributionPayloadFromDeeplink, which reads both attributionId and attribution_id from URL params. However, ~2 seconds later, processAppStateChange fires for the same deeplink and re-saves attribution via processAttribution, which only destructures attributionId (camelCase) from params — missing the snake_case variant entirely. Because the new payload lacks attribution_id, savePayloadMatchesExistingRecord sees a mismatch and overwrites the correct record, permanently losing the attribution_id field.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4cd0e59. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
The Performance Test Selection: |
|





Description
Changelog
CHANGELOG entry: null
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
Note
Medium Risk
Adds new persisted attribution state and wires deeplink/app-resume handling to save/expire/clear it based on marketing consent, which can affect analytics payloads and persistence behavior. Low functional user risk, but moderate risk of unintended attribution capture or regressions in onboarding analytics flows.
Overview
Adds a new persisted Redux
attributionslice (MMKV-backed, TTL-expiring) to store acquisition fields (utm_*,attribution_id) captured from deeplinks/app-open attribution processing, gated bysecurity.dataCollectionForMarketing.Updates onboarding analytics to automatically attach these persisted attribution properties to
WALLET_SETUP_COMPLETED(new wallet + SRP import) and toSOCIAL_LOGIN_COMPLETED, and ensures attribution is cleared onCLEAR_ONBOARDINGor when marketing consent is disabled. Includes unit tests plus E2E fixture/expectation coverage to assert the attribution properties appear on wallet setup events.Reviewed by Cursor Bugbot for commit 4cd0e59. Configure here.