Skip to content

feat: add Security & Password tab#40959

Merged
NidhiKJha merged 11 commits intomainfrom
CEUX-910-add-security-and-password
Mar 19, 2026
Merged

feat: add Security & Password tab#40959
NidhiKJha merged 11 commits intomainfrom
CEUX-910-add-security-and-password

Conversation

@NidhiKJha
Copy link
Member

@NidhiKJha NidhiKJha commented Mar 17, 2026

Add a new "Security & Password" settings page to Settings V2 with:

  • Manage wallet recovery item (links to SRP reveal, shows "Back up incomplete" tag)
  • Password item (links to password change)
  • Auto-lock item with sub-page for selecting lock duration from presets
  • Phishing detection toggle

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Added Security & Password page to the redesigned settings

Related issues

Fixes:

Manual testing steps

  1. Enable Settings V2 menu item in the hamburger menu
  2. Open Settings (V2) and click "Security & Password"
  3. Verify all 4 items render correctly
  4. Test the "Back up incomplete" tag visibility
  5. Test auto-lock sub-page selection and navigation
  6. Test phishing detection toggle

Screenshots/Recordings

Before

After

Screen.Recording.2026-03-17.at.11.58.47.AM.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

Medium Risk
Adds new Settings V2 navigation and UI that updates security-related preferences (notably auto-lock timer) via Redux actions; incorrect routing or value handling could impact locking behavior and user security expectations.

Overview
Adds a new Settings V2 tab, Security and password, with menu/route registry entries and i18n strings for its labels.

The tab introduces items to manage wallet recovery (links to SRP reveal and shows a Back up incomplete tag when SRP isn’t backed up), change password, toggle phishing detection, and view/edit auto-lock. Auto-lock now has a dedicated sub-page with preset durations (including Never), a formatter for preset/custom labels (rounding long decimals), and new route wiring in settings-v2.tsx.

Updates/extends Jest console baselines and adds unit tests covering the new tab, auto-lock formatting/selection flow, and wallet recovery tag behavior.

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

Add a new "Security & Password" settings page to Settings V2 with:
- Manage wallet recovery item (links to SRP reveal, shows "Back up incomplete" tag)
- Password item (links to password change)
- Auto-lock item with sub-page for selecting lock duration from presets
- Phishing detection toggle

Includes route constants, settings registry entry, lazy-loaded routing,
i18n keys (en/en_GB), and comprehensive unit tests (23 tests across 5 files).

Made-with: Cursor
@metamaskbot metamaskbot added the team-core-extension-ux Core Extension UX team label Mar 17, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 18, 2026

Builds ready [5a2c9d6]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28627231517279315
total28627231517279315
Confirm Txconfirm_tx6046601060732260626073
total6046601060732260626073
Bridge User Actionsbridge_load_page30625933026324330
bridge_load_asset_picker23620727329270273
bridge_search_token73369777531748775
total1294128013121313121312
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14561235179611014951658
load12041008149610312371399
domContentLoaded11971002148910012331393
domInteractive2917103182578
firstPaint166711223132210312
backgroundConnect21619426314221248
firstReactRender20143942129
initialActions107124
loadScripts99681612959810251189
setupStore1465061523
numNetworkReqs393180153876
Power User HomeuiStartup62402372181123442664414864
load13141152209114713341603
domContentLoaded12931146201613913101589
domInteractive40192414133134
firstPaint230891717179284365
backgroundConnect2668310144183253349911566
firstReactRender25175362735
initialActions103112
loadScripts1063925168612710771336
setupStore1674881832
numNetworkReqs2179335563253325
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192192200219220
srpButtonToSrpForm96959719797
confirmSrpToPwForm23222412324
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen19152752227
doneButtonToHomeScreen6045966157603615
openAccountMenuToAccountListLoaded291629052930929162930
total3920389239683239493968
Onboarding New WalletcreateWalletToSocialScreen2232222241223224
srpButtonToPwForm1191141243121124
createPwToRecoveryScreen10101001010
skipBackupToMetricsScreen45444824648
agreeButtonToOnboardingSuccess19192112021
doneButtonToAssetList5145125161516516
total9319239355935935
Asset DetailsassetClickToPriceChart81461182491118
total81461182491118
Solana Asset DetailsassetClickToPriceChart105991114107111
total105991114107111
Import Srp HomeloginToHomeScreen2320227523533023412353
openAccountMenuAfterLogin845511324101113
homeAfterImportWithNewWallet1628580231983823152319
total40522985482285347734822
Send TransactionsopenSendPageFromHome29253542835
selectTokenToSendFormLoaded462576196176
reviewTransactionToConfirmationPage831669943108915943
total90972010461229791046
SwapopenSwapPageFromHome975612225114122
fetchAndDisplaySwapQuotes267926772681126792681
total2784275928011527932801
🌐 Dapp Page Load Benchmarks

Current Commit: 5a2c9d6 | Date: 3/18/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±49ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±69ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 87ms (±42ms) 🟢 | historical mean value: 84ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 49ms 1.01s 1.39s 1.11s 1.39s
domContentLoaded 730ms 69ms 693ms 1.34s 769ms 1.34s
firstPaint 87ms 42ms 68ms 504ms 92ms 504ms
firstContentfulPaint 87ms 42ms 68ms 504ms 92ms 504ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 8.34 KiB (0.1%)
  • common: 673 Bytes (0.01%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 18, 2026

Builds ready [1129887]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2842792883285288
total2842792883285288
Confirm Txconfirm_tx6063603760821660766082
total6063603760821660766082
Bridge User Actionsbridge_load_page29528131312298313
bridge_load_asset_picker27623532835305328
bridge_search_token7457427483747748
total1294126413141913041314
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup15001237182411315501700
load1237103215129712821399
domContentLoaded1231102515069612781393
domInteractive3117111222794
firstPaint164701207125212255
backgroundConnect21919927814223243
firstReactRender21145572235
initialActions2011225
loadScripts102782512529210691184
setupStore1473761824
numNetworkReqs393186163780
Power User HomeuiStartup5361232715092233665219204
load13551138218316513851711
domContentLoaded13311127217615913601675
domInteractive41212134035135
firstPaint221861657170276356
backgroundConnect193528511637210128945038
firstReactRender24175052636
initialActions105113
loadScripts1103925192615411361432
setupStore1673361928
numNetworkReqs22512736251259318
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2212162253222225
srpButtonToSrpForm94929729397
confirmSrpToPwForm23212822428
pwFormToMetricsScreen15151601516
metricsToWalletReadyScreen16151811618
doneButtonToHomeScreen61158662618626626
openAccountMenuToAccountListLoaded2910289429351829352935
total3895385939433139183943
Onboarding New WalletcreateWalletToSocialScreen2192182190219219
srpButtonToPwForm1111101131113113
createPwToRecoveryScreen999099
skipBackupToMetricsScreen41394324343
agreeButtonToOnboardingSuccess17171801718
doneButtonToAssetList52449055626551556
total92289495625948956
Asset DetailsassetClickToPriceChart58516665666
total58516665666
Solana Asset DetailsassetClickToPriceChart82501212599121
total82501212599121
Import Srp HomeloginToHomeScreen2399228325007524362500
openAccountMenuAfterLogin846296139596
homeAfterImportWithNewWallet59049464956637649
total3031296530854430523085
Send TransactionsopenSendPageFromHome372558124258
selectTokenToSendFormLoaded36343923839
reviewTransactionToConfirmationPage1038707138025112791380
total1110788147525513381475
SwapopenSwapPageFromHome1222918956151189
fetchAndDisplaySwapQuotes269126862695426952695
total2812271828845728462884
🌐 Dapp Page Load Benchmarks

Current Commit: 1129887 | Date: 3/18/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±47ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 761ms (±63ms) 🟢 | historical mean value: 731ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 97ms (±133ms) 🟢 | historical mean value: 84ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 47ms 1.04s 1.45s 1.13s 1.45s
domContentLoaded 761ms 63ms 729ms 1.34s 789ms 1.34s
firstPaint 97ms 133ms 68ms 1.42s 96ms 1.42s
firstContentfulPaint 97ms 133ms 68ms 1.42s 96ms 1.42s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 8.33 KiB (0.1%)
  • common: 673 Bytes (0.01%)

ameliejyc
ameliejyc previously approved these changes Mar 18, 2026
@NidhiKJha NidhiKJha enabled auto-merge March 18, 2026 15:17
sahar-fehri
sahar-fehri previously approved these changes Mar 18, 2026
@NidhiKJha NidhiKJha added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 18, 2026
@NidhiKJha NidhiKJha added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Mar 18, 2026
Copy link

@cursor cursor bot left a comment

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 2 potential issues.

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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@NidhiKJha NidhiKJha added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 5e49246 Mar 19, 2026
203 of 205 checks passed
@NidhiKJha NidhiKJha deleted the CEUX-910-add-security-and-password branch March 19, 2026 10:33
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2026
@metamaskbot metamaskbot added the release-13.24.0 Issue or pull request that will be included in release 13.24.0 label Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.24.0 Issue or pull request that will be included in release 13.24.0 size-L team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants