Skip to content

feat: convert choosePassword code from javascript to typescript.#23483

Merged
grvgoel81 merged 7 commits intomainfrom
feat-choosepassword-to-tsx
Jan 7, 2026
Merged

feat: convert choosePassword code from javascript to typescript.#23483
grvgoel81 merged 7 commits intomainfrom
feat-choosepassword-to-tsx

Conversation

@grvgoel81
Copy link
Copy Markdown
Contributor

@grvgoel81 grvgoel81 commented Dec 1, 2025

Description

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Screen.Recording.2025-12-01.at.8.56.02.PM.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

Migrates ChoosePassword to a TypeScript functional component with extracted styles/types, updates tests, and tweaks the password visibility toggle to a pressable accessory.

  • Frontend (ChoosePassword):
    • Migrates Views/ChoosePassword from class-based JS (index.js) to a TypeScript functional component (index.tsx) using React hooks, useNavigation/useRoute, and Redux hooks.
    • Extracts styles to ChoosePassword.styles.ts and route/types to ChoosePassword.types.ts.
    • Refactors password visibility endAccessory to be pressable via TouchableOpacity around the eye icon.
    • Maintains analytics/tracing, authentication, vault recreation, and navigation flows with typed contexts.
  • Tests:
    • Updates index.test.tsx to target the new TSX component, hooks-based navigation/metrics, and mocks; refreshes snapshot to reflect the pressable eye icon and loading animation.
    • Adds/updates tracing and marketing opt-in cases; adjusts Engine/Auth mocks for seed phrase export and account restore.

Written by Cursor Bugbot for commit 47a5e0c. Configure here.

@grvgoel81 grvgoel81 self-assigned this Dec 1, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 1, 2025

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.

@grvgoel81 grvgoel81 marked this pull request as ready for review December 2, 2025 03:41
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.80000% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.30%. Comparing base (80b13d3) to head (0696ca1).
⚠️ Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
app/components/Views/ChoosePassword/index.tsx 82.37% 30 Missing and 13 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23483      +/-   ##
==========================================
+ Coverage   79.11%   79.30%   +0.19%     
==========================================
  Files        4053     4056       +3     
  Lines      106578   106749     +171     
  Branches    21592    21672      +80     
==========================================
+ Hits        84321    84662     +341     
+ Misses      16379    16197     -182     
- Partials     5878     5890      +12     

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

});

(
navigation as unknown as {
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.

do we need casting here?

if (loading) {
// update navigationOptions
(
navigation as unknown as { setParams: (params: object) => void }
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.

do we need casting?

}
}, [loading, navigation, EmptyHeaderLeft]);

useEffect(
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.

Add comment for the unmounting useEffect
Move the unmouting to line 659 as passwordSetupAttemptTraceCtx is being used there

useEffect(() => {
if (error && !keyringControllerPasswordSet.current) {
if (mounted.current) {
captureException(new Error(error));
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.

where is this code from?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 6, 2026

🔍 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
Copy Markdown

sonarqubecloud bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

@ieow ieow 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 added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit fd5e185 Jan 7, 2026
158 of 163 checks passed
@grvgoel81 grvgoel81 deleted the feat-choosepassword-to-tsx branch January 7, 2026 04:25
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-onboarding release-7.62.0 Issue or pull request that will be included in release 7.62.0 size-XL team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants