Skip to content

feat(onboarding): TMCU-833 crypto experience questionnaire screen#30767

Merged
wachunei merged 8 commits into
mainfrom
feat/TMCU-833-onboarding-crypto-experience
Jun 3, 2026
Merged

feat(onboarding): TMCU-833 crypto experience questionnaire screen#30767
wachunei merged 8 commits into
mainfrom
feat/TMCU-833-onboarding-crypto-experience

Conversation

@wachunei

@wachunei wachunei commented May 28, 2026

Copy link
Copy Markdown
Member

Description

Adds the onboarding crypto experience questionnaire (“What’s your experience with crypto?”) and wires it into the post–opt-in flow after the interest questionnaire (TMCU-792).

  • New OnboardingCryptoExperienceQuestionnaire screen: single-select rows (new, beginner, intermediate, advanced) with inline skill-bar indicator and check when selected.
  • Interest questionnaire Continue navigates to the experience screen; experience Continue calls onComplete().
  • New route Routes.ONBOARDING.CRYPTO_EXPERIENCE_QUESTIONNAIRE, navigation types, and Stack.Screen registration.
  • Analytics: ONBOARDING_CRYPTO_EXPERIENCE_QUESTION_VIEWED and ONBOARDING_CRYPTO_EXPERIENCE_QUESTION_SUBMITTED (experience_level, skipped, optional account_type).
  • i18n in en.json only (onboarding_crypto_experience_questionnaire).

Depends on: TMCU-792 (merged via #30753).

Changelog

CHANGELOG entry: Added an onboarding crypto experience questionnaire shown after the interest questionnaire during onboarding.

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-833

Manual testing steps

Feature: Onboarding crypto experience questionnaire (TMCU-833)

  Scenario: user completes interest then experience questionnaires after opting in
    Given the user is eligible for the onboarding interest questionnaire
    And the user has opted in to basic usage data on OptinMetrics

    When the user completes the interest questionnaire and taps Continue
    Then the crypto experience questionnaire is shown with four single-select options
    And the user can select one experience level or skip by tapping Continue without a selection
    And tapping Continue on the experience screen proceeds with onboarding (onComplete)

  Scenario: experience analytics on submit
    Given the user is on the crypto experience questionnaire

    When the user selects "Intermediate" and taps Continue
    Then analytics records experience_level "intermediate" with skipped false

    When the user taps Continue without selecting an option
    Then analytics records experience_level null with skipped true

Screenshots/Recordings

Before

After

exp_quest_2.mp4
exp_quest_1.mp4
Light Mode Dark Mode
q_light q_dark
q_selected_light q_selected_dark

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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
Onboarding UI and analytics-only changes with no auth, payments, or sensitive data handling.

Overview
Adds an onboarding crypto experience step after the interest questionnaire: users pick one of four levels (new through advanced) with a skill-bar indicator, or skip by continuing without a selection.

Flow: Interest questionnaire Continue now navigates to Routes.ONBOARDING.CRYPTO_EXPERIENCE_QUESTIONNAIRE (forwarding onComplete and optional accountType); the experience screen’s Continue invokes onComplete. Hardware back stays blocked on both steps.

Instrumentation: Generic MetaMetrics events ONBOARDING_QUESTION_VIEWED / ONBOARDING_QUESTION_SUBMITTED with question_type: 'crypto_experience', name, skipped, and optional account_type. English copy in en.json.

Tests: Component/unit coverage, App route registration test, and E2E wallet flows tap through the new screen via OnboardingCryptoExperienceQuestionnaireView.

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

Add single-select crypto experience step after the interest questionnaire,
with analytics events and navigation wiring through to onComplete.
@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-ux Mobile UX team label May 28, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.66%. Comparing base (974aa0c) to head (725541b).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
...nnaire/OnboardingCryptoExperienceQuestionnaire.tsx 91.17% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30767      +/-   ##
==========================================
+ Coverage   82.58%   82.66%   +0.08%     
==========================================
  Files        5519     5536      +17     
  Lines      141453   141734     +281     
  Branches    32578    32686     +108     
==========================================
+ Hits       116818   117166     +348     
+ Misses      16836    16741      -95     
- Partials     7799     7827      +28     

☔ 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.

wachunei added 4 commits May 28, 2026 16:36
Align TMCU-834 Segment payload: rename experience_level to name (null when skipped).
Add a page object for the onboarding crypto experience screen and tap
Continue after the interest questionnaire in CreateNewWallet and import
wallet flows so analytics smoke tests reach onboarding success.
@wachunei wachunei marked this pull request as ready for review May 29, 2026 16:06
@wachunei wachunei requested review from a team as code owners May 29, 2026 16:06
@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label May 29, 2026

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 02878ac. Configure here.

…perience

Align with segment-schema #590: fire Onboarding Question Viewed/Submitted
with question_type crypto_experience instead of crypto-specific event names.
wachunei added 2 commits June 1, 2026 16:18
Replace Pressable with TouchableOpacity and activeOpacity={0.7} to match
onboarding touch target conventions.
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeSeedlessOnboarding, SmokeAccounts, SmokeIdentity
  • Selected Performance tags: @PerformanceOnboarding
  • Risk Level: high
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR introduces a new OnboardingCryptoExperienceQuestionnaire screen that is inserted into the onboarding flow AFTER the existing OnboardingInterestQuestionnaire. The critical change is in tests/flows/wallet.flow.ts where both importWalletWithRecoveryPhrase and CreateNewWallet flows now include a step to tap the continue button on the new questionnaire screen (when optInToMetrics: true).

Direct Impact:

  1. SmokeWalletPlatform - The analytics tests (new-wallet.spec.ts, import-wallet.spec.ts) use CreateNewWallet() and importWalletWithRecoveryPhrase() with metrics opt-in. These tests now go through the new questionnaire screen. The wallet.flow.ts has been updated to handle it, but these tests need to be run to verify the full flow works correctly, including analytics event tracking.

  2. SmokeSeedlessOnboarding - The seedless onboarding flow (completeSocialLoginOnboarding) also goes through MetaMetrics opt-in and may encounter the new questionnaire. The wallet-setup-completed-attribution.spec.ts uses SmokeSeedlessOnboarding tag and calls importWalletWithRecoveryPhrase. The seedless utils don't explicitly handle the new questionnaire screen, which could cause test failures.

  3. SmokeAccounts - Account management tests that go through onboarding flows (import wallet, create wallet) may be affected. The multi-SRP architecture tests use loginToApp (not affected) but some account tests use the full onboarding flow.

  4. SmokeIdentity - Identity/sync tests use loginToApp primarily, but some may go through onboarding. Selected as a precaution given the onboarding flow change.

Why these tags specifically:

  • The core change is to the onboarding flow - specifically the questionnaire sequence
  • wallet.flow.ts is the shared flow used by many tests, and the new questionnaire step is only triggered when optInToMetrics: true
  • Tests that use loginToApp (fixture-based) are NOT affected since they skip onboarding entirely
  • The FixtureValidation tag is not in the available tags list but uses CreateNewWallet()
  • SmokeWalletPlatform is the primary tag for wallet analytics/onboarding tests
  • SmokeSeedlessOnboarding is critical because seedless onboarding flows go through the full onboarding sequence and the completeSocialLoginOnboarding utility doesn't explicitly handle the new questionnaire screen (uses try/catch for optional screens, but the new screen is now mandatory in the flow)

Performance Test Selection:
The onboarding flow has been extended with a new screen (OnboardingCryptoExperienceQuestionnaire) inserted between the interest questionnaire and the onboarding completion. This adds a new UI screen to the onboarding sequence which could impact onboarding flow performance metrics. The @PerformanceOnboarding tag covers wallet creation and SRP import flows which are directly affected by this new screen insertion.

View GitHub Actions results

wachunei added a commit that referenced this pull request Jun 2, 2026
…step

Migrate interest questionnaire from Onboarding Interest Question Viewed/Submitted
to Onboarding Question Viewed/Submitted with question_type interest, aligned
with segment-schema #590 and crypto experience instrumentation on #30767.
@wachunei wachunei enabled auto-merge June 3, 2026 15:43

@Cal-L Cal-L 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

@wachunei wachunei added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 72e26bb Jun 3, 2026
268 of 272 checks passed
@wachunei wachunei deleted the feat/TMCU-833-onboarding-crypto-experience branch June 3, 2026 19:21
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:medium AI analysis: medium risk size-L team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants