refactor(onboarding): migrate OAuthRehydration to design system cp-7.73.0#28315
Conversation
|
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 5349d3b. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The OAuthRehydration screen is part of the seedless/social login (OAuth) onboarding flow. It is navigated to from the Login screen when seedless onboarding errors are detected. This screen is relevant to:
Other tags (SmokeAccounts, SmokeConfirmations, etc.) are not relevant as this change is isolated to the OAuth rehydration login screen UI and does not touch account management, confirmations, network, or trading flows. Risk is low because: (1) only UI/styling changed, not logic; (2) unit tests were updated to match; (3) the component's behavior (password unlock, error handling, navigation) is unchanged. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
Migrates the
OAuthRehydrationview from legacyStyleSheet.create(), rawView/Text, and component-libraryButtonto the design system primitives (Box,Text,Button,Labelfrom@metamask/design-system-react-native) with Tailwind CSS viauseTailwind(). Also adds theme-aware background color to theSafeAreaView.Key changes
View→Boxwith typed layout props (alignItems,gap,paddingHorizontal)Text→ DSTextwithTextVariant/TextColorenumsStyleSheet.create()→twClassNameandtw.style()OldButton (ButtonVariants.Link)→ DSButton (ButtonVariant.Tertiary)backgroundColor: colors.background.defaulttoSafeAreaViewfor proper theme supportfoxImageStyleto module-level constantstyles.tsandstyles.test.tsrenderPasswordField,renderHelperText,renderFooterAction) for cleaner JSXChangelog
CHANGELOG entry: null
Related issues
Fixes: #28505
TO-663
Manual testing steps
Screenshots/Recordings
Light
Dark
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Mostly a UI/styling refactor, but it touches the OAuth rehydration login screen layout and input handling, which could impact a critical unlock flow if rendering/spacing regresses (especially Android status bar/keyboard behavior).
Overview
Migrates
OAuthRehydrationfrom legacyStyleSheet/component-library UI to design-system components (Box,Text,Button,TextField) styled viauseTailwind, including a theme-awareSafeAreaViewbackground.Reworks platform-specific layout behavior by adding Android
StatusBar.currentHeighttop padding and conditional spacing/keyboard scroll height, and extracts small render helpers for the password field, helper text, and footer action.Updates tests to match the new DS components and layout (including an Android-specific spacing/padding assertion), adjusts the password-clear assertion to check rendered value removal, adds a
react-native-qrcode-svgmock, and deletesstyles.tsplus its unit test.Reviewed by Cursor Bugbot for commit c39e3e8. Bugbot is set up for automated code reviews on this repo. Configure here.