Skip to content

fix(money): gate onboarding stepper animation behind feature flag (MUSD-865)#31007

Merged
Kureev merged 2 commits into
mainfrom
kureev/MUSD-865
Jun 3, 2026
Merged

fix(money): gate onboarding stepper animation behind feature flag (MUSD-865)#31007
Kureev merged 2 commits into
mainfrom
kureev/MUSD-865

Conversation

@Kureev

@Kureev Kureev commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

The Rive animation on the money account onboarding screen crashes the app on Android. The native Rive SurfaceView is released during the navigation transition while its render thread is still drawing, producing a fatal SIGSEGV (Surface has already been released).

This gates the animation behind the money-enable-onboarding-stepper-animation remote feature flag, which is off by default. When the flag is disabled the stepper no longer mounts the Rive view and renders its gradient background and per-step content (progress bar, titles, body, footer, buttons) only. Not mounting the native view removes the crash path entirely while keeping the onboarding flow intact.

RiveOnboardingStepper gains a generic enableRiveAnimation prop (defaults to true, so existing behaviour is unchanged); MoneyOnboardingView wires it to the flag.

Changelog

CHANGELOG entry: Fixed a crash that could occur on the money account onboarding screen.

Related issues

Fixes: MUSD-865

Manual testing steps

Feature: Money onboarding stepper animation flag

  Scenario: Animation disabled (flag off, default)
    Given the money-enable-onboarding-stepper-animation flag is off
    When the user opens the money account onboarding screen
    Then the onboarding steps and text render without the animation
    And the app does not crash

  Scenario: Animation enabled (flag on)
    Given the money-enable-onboarding-stepper-animation flag is on
    When the user opens the money account onboarding screen
    Then the Rive animation plays as before

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.17.-.2026-06-03.at.12.57.20.mov

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

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 UI/native-renderer change with safe default (flag off) and broad test coverage; no auth, payments, or data-handling changes.

Overview
Gates the money account onboarding Rive stepper behind the remote flag moneyEnableOnboardingStepperAnimation (registered with enabled: false by default), so production avoids mounting the native Rive view that was crashing on Android during navigation.

RiveOnboardingStepper now accepts enableRiveAnimation (default true). When it is false, the Rive component is not mounted, isRiveReady starts true so UI is not stuck behind the onPlay opacity gate, and step advances without firing Rive triggers. MoneyOnboardingView reads selectMoneyOnboardingStepperAnimationEnabled and passes that into the stepper.

Adds selector/tests and E2E registry entry for the new flag.

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

…SD-865)

The Rive animation on the money onboarding screen crashes the app on
Android. The native Rive SurfaceView is released during the navigation
transition while its render thread is still drawing, producing a SIGSEGV.

Gate the animation behind the money-enable-onboarding-stepper-animation
remote flag (off by default). When disabled, the stepper no longer mounts
the Rive view and renders its background and step content only, removing
the crash while keeping the onboarding flow intact.
@Kureev Kureev added team-earn pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 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 size-M label Jun 3, 2026
@Kureev Kureev 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 3, 2026
@Kureev Kureev self-assigned this Jun 3, 2026
@Kureev Kureev marked this pull request as ready for review June 3, 2026 11:25
@Kureev Kureev requested a review from a team as a code owner June 3, 2026 11:25
@github-actions github-actions Bot added the risk:low AI analysis: low risk label Jun 3, 2026
…ation flag

The flag is delivered by the client-config API as the camelCase key
moneyEnableOnboardingStepperAnimation with a version-gated
{ enabled, minimumVersion } shape, not a plain boolean. Read it through
validatedVersionGatedFeatureFlag and register it in the feature flag
registry so the registry check passes.
@Kureev Kureev requested a review from a team as a code owner June 3, 2026 11:45
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are narrowly scoped to the Money/Card onboarding flow:

  1. New feature flag selector (selectMoneyOnboardingStepperAnimationEnabled) - adds a new remote feature flag moneyEnableOnboardingStepperAnimation that controls whether the Rive animation plays during Money card onboarding. Defaults to false in production, so no behavioral change unless explicitly enabled.

  2. MoneyOnboardingView - Reads the new feature flag via useSelector and passes enableRiveAnimation prop to RiveOnboardingStepper. This is the Money card onboarding screen.

  3. RiveOnboardingStepper - Added enableRiveAnimation prop (defaults to true). When false, the Rive animation component is not mounted and isRiveReady starts as true so content is immediately visible without waiting for onPlay.

  4. Feature flag registry - Registers the new flag with enabled: false as production default.

  5. Unit tests - Comprehensive unit test coverage added for all new behavior.

Impact assessment:

  • Changes are entirely within the Money/Card onboarding UI flow
  • The feature flag defaults to false (disabled), so no behavioral change in production unless remotely enabled
  • No changes to core navigation, confirmations, accounts, networks, or other wallet flows
  • SmokeMoney is the appropriate tag as it covers MetaMask Card and fiat flows including the card home screen and onboarding flows
  • No dependent tags required (no swap/confirmation flows are triggered by this onboarding animation change)
  • No performance impact - this is a UI animation toggle, not a data loading or rendering performance concern

Performance Test Selection:
The changes add a feature flag to toggle a Rive animation in the Money onboarding stepper. The flag defaults to disabled in production, and the change is a simple conditional render (mount/unmount of the Rive component). This does not affect app startup, account list rendering, login flows, swap performance, or asset loading. No performance tests are warranted.

View GitHub Actions results

@Kureev Kureev enabled auto-merge June 3, 2026 12:38
@Kureev Kureev added this pull request to the merge queue Jun 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 3, 2026
@Kureev Kureev added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 869acd6 Jun 3, 2026
186 of 189 checks passed
@Kureev Kureev deleted the kureev/MUSD-865 branch June 3, 2026 14:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.81.0 Issue or pull request that will be included in release 7.81.0 label Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.81.0 Issue or pull request that will be included in release 7.81.0 risk:low AI analysis: low risk size-M team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants