Skip to content

fix: stop rive before navigate#31076

Merged
ieow merged 4 commits into
mainfrom
cw/fix-social-login-crash
Jun 4, 2026
Merged

fix: stop rive before navigate#31076
ieow merged 4 commits into
mainfrom
cw/fix-social-login-crash

Conversation

@ieow

@ieow ieow commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

Social login (seedless) onboarding can crash or glitch on Android when the fox Rive loader on Choose Password keeps running while React Navigation transitions to Onboarding Success. A prior workaround skipped the success-screen Rive animation on Android for seedless flows; that hid the crash but removed the intended celebration animation.

This PR:

  1. Stops the Choose Password fox Rive loader before navigationFoxRiveLoaderAnimation exposes stop via forwardRef / useImperativeHandle, and Choose Password calls it after wallet creation succeeds and before handlePostWalletCreation navigates away.
  2. Restores OnboardingSuccessEndAnimation for seedless onboarding on Android — removes the shouldSkipSuccessAnimation guard now that the loading animation is torn down cleanly first.

Changelog

CHANGELOG entry: Fixed a crash during social login onboarding when completing wallet creation

Related issues

Fixes:

Manual testing steps

Feature: Social login onboarding Rive lifecycle

  Scenario: Complete seedless onboarding on Android without crash
    Given a fresh install on Android
    And social login (Apple/Google) onboarding is available

    When the user completes OAuth sign-in and sets a password on Choose Password
    Then the app navigates to Onboarding Success without crashing
    And the success-screen Rive animation plays

  Scenario: Complete seedless onboarding on iOS
    Given a fresh install on iOS
    And social login onboarding is available

    When the user completes OAuth sign-in and sets a password on Choose Password
    Then the app navigates to Onboarding Success without crashing
    And the success-screen Rive animation plays

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Targeted onboarding UI lifecycle changes with tests; no auth, keyring, or payment logic changes.

Overview
Fixes Android seedless onboarding crashes/glitching when the Choose Password fox Rive loader keeps running during navigation to Onboarding Success.

FoxRiveLoaderAnimation is refactored with forwardRef and exposes stop via useImperativeHandle (typed as FoxRiveLoaderAnimationRef). Choose Password holds a ref and calls foxRiveLoaderRef.current?.stop() after wallet creation succeeds and before handlePostWalletCreation navigates away.

The prior Android workaround that skipped OnboardingSuccessEndAnimation for seedless flows is removed, so the success-screen Rive plays again once the loader is stopped cleanly. Mocks and unit tests cover ref forwarding and the updated success-screen behavior.

Reviewed by Cursor Bugbot for commit b754ba5. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 4, 2026
@mm-token-exchange-service mm-token-exchange-service Bot added the team-onboarding Onboarding team label Jun 4, 2026
@github-actions github-actions Bot added the size-M label Jun 4, 2026
@ieow ieow marked this pull request as ready for review June 4, 2026 14:31
@ieow ieow requested a review from a team as a code owner June 4, 2026 14:31
@github-actions github-actions Bot added the risk:high AI analysis: high risk label Jun 4, 2026
@grvgoel81 grvgoel81 removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 4, 2026

@grvgoel81 grvgoel81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ieow ieow enabled auto-merge June 4, 2026 16:07
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeSeedlessOnboarding, SmokeWalletPlatform
  • Selected Performance tags: @PerformanceOnboarding
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes affect two key onboarding UI components:

  1. FoxRiveLoaderAnimation + ChoosePassword: The animation component is refactored to use forwardRef/useImperativeHandle to expose a stop() method. ChoosePassword now calls foxRiveLoaderRef.current?.stop() after wallet creation completes. This affects all wallet creation flows (new wallet, SRP import). The CreatePasswordView page object is used in both SmokeSeedlessOnboarding tests and performance tests.

  2. OnboardingSuccess: Removes the Android-specific skip of OnboardingSuccessEndAnimation for seedless onboarding. Previously on Android, the animation was hidden for seedless flows; now it always renders. This directly impacts SmokeSeedlessOnboarding tests (google-login-new-user, apple-login-new-user, etc.) which use OnboardingSuccessView and go through this screen.

SmokeSeedlessOnboarding is the primary tag because:

  • The OnboardingSuccess change directly affects the seedless onboarding flow (removed Android animation skip)
  • All seedless smoke tests (google/apple login new user, existing user, lock/unlock, reset wallet, add SRP) go through CreatePasswordView and OnboardingSuccessView
  • The utils.ts in tests/smoke/seedless/ uses both CreatePasswordView and OnboardingSuccessView

SmokeWalletPlatform is included because:

  • It covers wallet lifecycle analytics tracking for new wallet creation and SRP import events
  • The ChoosePassword animation stop change affects the wallet creation flow timing
  • Wallet setup completed attribution test (wallet-setup-completed-attribution.spec.ts) uses SmokeSeedlessOnboarding tag but is in the wallet analytics directory

Other tags (SmokeAccounts, SmokeIdentity) are not selected because the changes are purely UI/animation changes in the onboarding flow, not affecting account management logic or sync functionality.

Performance Test Selection:
The ChoosePassword and OnboardingSuccess components are directly used in performance test specs (tests/performance/onboarding/new-wallet-account-creation.spec.ts, seedless-google-onboarding.spec.ts, seedless-apple-onboarding.spec.ts, import-wallet.spec.ts). The animation stop timing change in ChoosePassword could affect the measured time between wallet creation completion and navigation to the success screen. The OnboardingSuccess animation change (always rendering on Android for seedless) could affect rendering performance metrics. @PerformanceOnboarding covers wallet creation and SRP import flows which are directly impacted.

View GitHub Actions results

@ieow ieow added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit a98df02 Jun 4, 2026
211 of 213 checks passed
@ieow ieow deleted the cw/fix-social-login-crash branch June 4, 2026 17:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:high AI analysis: high risk size-M team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants