Skip to content

Conversation

@ieow
Copy link
Contributor

@ieow ieow commented Nov 20, 2025

Description

In some device on edge cases, sometime the MetaMask riv logo does not appear during the onboarding screen animation.
This is due to race conditions between state triggers and the rive onPlay state.

This PR wait for onPlay state before fire the inputState

Changelog

CHANGELOG entry: null

Related issues

Fixes:
#23048

  • race condition in rive animations when animation fail to start.

Manual testing steps

Feature: onboarding

  Scenario: user open the app after install
    Given user open the app after install
    Then user should see the Metamask riv logo 

Screenshots/Recordings

Before

IMG_0012.MOV

After

IMG_0014.MOV

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

Delay animation triggers until Rive reports onPlay, fixing race conditions that caused onboarding/fox animations to not start.

  • UI
    • FoxAnimation: add isPlaying state and onPlay handler; trigger fireState('FoxRaiseUp', ...) only after play starts; remove autoplay usage.
    • OnboardingAnimation: gate startRiveAnimation on isPlaying; add onPlay to set ready state; remove autoplay usage.
  • Testing/Mocks
    • Update app/__mocks__/rive-react-native.tsx to accept onPlay and invoke it on mount for tests.

Written by Cursor Bugbot for commit b36851c. This will update automatically on new commits. Configure here.

@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Nov 20, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.27%. Comparing base (bf56c9a) to head (50d6ae0).

Files with missing lines Patch % Lines
...nts/UI/OnboardingAnimation/OnboardingAnimation.tsx 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22982      +/-   ##
==========================================
- Coverage   78.28%   78.27%   -0.02%     
==========================================
  Files        3901     3901              
  Lines      100591   100593       +2     
  Branches    19861    19861              
==========================================
- Hits        78749    78738      -11     
- Misses      16432    16443      +11     
- Partials     5410     5412       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ieow ieow marked this pull request as ready for review November 20, 2025 13:28
grvgoel81
grvgoel81 previously approved these changes Nov 20, 2025
Copy link
Contributor

@grvgoel81 grvgoel81 left a comment

Choose a reason for hiding this comment

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

lgtm

@grvgoel81 grvgoel81 enabled auto-merge November 20, 2025 15:28
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeCore, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeWalletUX, SmokeAssets, SmokeSwaps, SmokeStake, SmokeCard, SmokeNotifications, SmokeRewards, SmokePerps, SmokeRamps, SmokeMultiChainPermissions, SmokeAnalytics, SmokeMultiChainAPI, SmokePredictions
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

Fallback: AI analysis did not complete successfully. Running all tests.

View GitHub Actions results

@sonarqubecloud
Copy link

@ieow ieow changed the title fix: start animate when rive onPlay ( ready ) fix: start animate when rive onPlay ( ready ) cp-7.60.0 Nov 20, 2025
@grvgoel81 grvgoel81 added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@grvgoel81 grvgoel81 added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 2ab978e Nov 21, 2025
93 checks passed
@grvgoel81 grvgoel81 deleted the fix/animate-onplay branch November 21, 2025 04:41
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-S team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants