Skip to content

refactor: migrate ManualBackupStep1 to design system components and T…#27677

Merged
smgv merged 3 commits into
mainfrom
refactor/manualBackup1-migration
Mar 20, 2026
Merged

refactor: migrate ManualBackupStep1 to design system components and T…#27677
smgv merged 3 commits into
mainfrom
refactor/manualBackup1-migration

Conversation

@smgv

@smgv smgv commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

…ailwind CSS

Description

  • Component migration (View → Box, StyleSheet → twClassName/tw.style(), deleted styles.ts)
  • Test optimizations (consolidated setup functions, removed duplicates, cleaner descriptions)
  • Added @metamask/design-system-twrnc-preset mock

Jira Link: https://consensyssoftware.atlassian.net/browse/TO-604

Changelog

CHANGELOG entry: migrate ManualBackupStep1 to design system components and Tailwind CSS

Related issues

Fixes:

Manual testing steps

Feature: ManualBackupStep1 seed phrase reveal screen

  Background:
    Given I have just created a new MetaMask wallet
    And I am on the "Secure your wallet" screen (step 2 of 3)

  Scenario: user sees blurred seed phrase before revealing
    Given the seed phrase is hidden behind a blur overlay

    Then I should see the title "Write down your Secret Recovery Phrase"
    And I should see "Tap to reveal your Secret Recovery Phrase"
    And the "Continue" button should be disabled

  Scenario: user reveals seed phrase by tapping the blur overlay
    Given the seed phrase is hidden behind a blur overlay

    When user taps the blur overlay
    Then the blur overlay should disappear
    And I should see 12 seed phrase words displayed in a 3-column grid
    And the "Continue" button should be enabled

  Scenario: user proceeds to seed phrase confirmation after revealing
    Given user has tapped the blur overlay to reveal the seed phrase

    When user taps the "Continue" button
    Then I should be taken to the seed phrase confirmation screen (step 3 of 3)

  Scenario: user opens the Secret Recovery Phrase definition
    Given the seed phrase reveal screen is visible

    When user taps the "Secret Recovery Phrase" inline link in the description
    Then a modal explaining what a Secret Recovery Phrase is should appear

  Scenario: user skips backup during onboarding with no funds
    Given I am on the seed phrase reveal screen during onboarding
    And my wallet has no funds

    Then I should see a "Remind me later" button

    When user taps "Remind me later"
    Then I should be taken past the backup flow to the onboarding success screen

Screenshots/Recordings

Before

After

Screenshot 2026-03-19 at 3 45 57 PM Screenshot 2026-03-19 at 3 46 03 PM Screenshot 2026-03-19 at 3 46 27 PM Screenshot 2026-03-19 at 3 46 31 PM

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

Medium Risk
Refactors a security-sensitive SRP backup screen’s UI (seed phrase reveal + password unlock) to new design-system primitives and tailwind styling, which could introduce subtle layout/accessibility regressions across platforms/themes. Core navigation and seed phrase handling logic is largely unchanged but should be spot-checked in-app.

Overview
Migrates ManualBackupStep1 from bespoke StyleSheet/legacy UI components to @metamask/design-system-react-native primitives (Box, Button, TextField, TextButton, Icon) and tailwind-driven styling via useTailwind, and removes the dedicated styles.ts.

Updates the seed-phrase reveal and password-confirmation views to the new components (including Android-specific bottom spacing and some accessibility props), and rewrites/streamlines the Jest tests and snapshots (new tailwind mock, consolidated setup helpers, updated theme snapshot expectations).

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

@smgv smgv self-assigned this Mar 19, 2026
@smgv smgv requested a review from a team as a code owner March 19, 2026 10:33
@github-actions

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.

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Mar 19, 2026
@github-actions github-actions Bot added size-XL risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 19, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 19, 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.

Comment thread app/components/Views/ManualBackupStep1/index.test.tsx Outdated
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokePerps, SmokeRamps, SmokeMultiChainAPI, SmokePredictions, FlaskBuildTests
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

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

Performance Test Selection:
Fallback: AI analysis did not complete successfully. Running all performance tests.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@smgv smgv enabled auto-merge March 19, 2026 12:02

@LeVinhGithub LeVinhGithub 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 qa

@tylerc-consensys tylerc-consensys 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

Comment on lines +29 to +45
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
undefined,
undefined,

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.

nit: tw.style mock generated many false / undefined, u can ask AI to assist in this

@smgv smgv added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 2da84f5 Mar 20, 2026
110 of 111 checks passed
@smgv smgv deleted the refactor/manualBackup1-migration branch March 20, 2026 00:46
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 20, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 20, 2026
@smgv smgv added the QA Passed QA testing has been completed and passed label Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.72.0 Issue or pull request that will be included in release 7.72.0 risk-high Extensive testing required · High bug introduction risk size-XL team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants