Skip to content

Conversation

lionellbriones
Copy link
Contributor

@lionellbriones lionellbriones commented Oct 9, 2025

Description

Added toasts to display Shield subscription's error states.

Shield payment declined

  • Requirements to show:
    • Subscription is paused
    • User has not clicked or closed the toast before
  • When user clicks on the action button, set closed/closed flag to true then app will redirect to shield settings page
  • When user clicks closes, set closed/closed flag to true

Shield coverage ending

  • Requirements to show:
    • Subscription is cancelled
    • is Crypto payment
    • User has not clicked or closed the toast before
  • When user clicks on the action button, set closed/closed flag to true then app will redirect to shield settings page
  • When user clicks closes, set closed/closed flag to true

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Added shield subscription error toasts

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Screenshot 2025-10-09 at 5 47 06 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

Adds Shield “payment declined” and “coverage ending” toasts, with persisted dismiss state, selectors, and subscription paused/ending logic, plus i18n and tests.

  • UI/Toasts:
    • Add ShieldPausedToast and ShieldEndingToast in toast-master.js; wire into ToastMaster and navigate to TRANSACTION_SHIELD_ROUTE on action.
    • New selectors selectShowShieldPausedToast and selectShowShieldEndingToast.
    • Background actions to persist dismiss timestamps via setShieldPausedToastLastClickedOrClosed and setShieldEndingToastLastClickedOrClosed.
  • State/Controllers:
    • App state: add shieldPausedToastLastClickedOrClosed and shieldEndingToastLastClickedOrClosed (defaults, metadata, setters) in app-state-controller.ts, exposed via metamask-controller.js.
    • Include new fields in sentry-state allowlist and background/UI types.
  • Shield logic (shared/lib/shield.ts):
    • Factor out getShieldSubscription; add getIsShieldSubscriptionPaused and getIsShieldSubscriptionEndingSoon; keep getIsShieldSubscriptionActive.
    • New PausedSubscriptionStatuses in shared/constants/subscriptions.ts.
    • Use new helpers in transaction-shield.tsx.
  • i18n:
    • Add messages for coverage ending and payment declined (titles, actions, descriptions) in app/_locales/en*.json.
  • Tests/Metrics:
    • Add unit tests for new setters; update e2e metrics masks and state snapshots; adjust test fixtures to include new state fields.

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 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.

@metamaskbot metamaskbot added the team-web3auth Web3Auth team label Oct 9, 2025
@github-actions github-actions bot added the size-M label Oct 9, 2025
Base automatically changed from feat/new-toast to main October 11, 2025 01:30
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: a5dae8b | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 737ms (±70ms) 🟢 | historical mean value: 737ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.33s 1.30s 1.33s
domContentLoaded 737ms 70ms 700ms 998ms 984ms 998ms
firstPaint 76ms 10ms 60ms 160ms 84ms 160ms
firstContentfulPaint 76ms 10ms 60ms 160ms 84ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [a5dae8b]
UI Startup Metrics (1256 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1256114814816912911383
load107997312986510981248
domContentLoaded107294512946610931241
domInteractive17136671727
firstPaint63772127144510841169
backgroundConnect25724138015259272
firstReactRender2719118112848
getState12584101228
initialActions51507618
loadScripts823695104365840987
setupStore96264918
WebpackHomeuiStartup8377081125768561057
load64258495979642901
domContentLoaded63457695078635891
domInteractive171170111543
firstPaint17253908158173600
backgroundConnect22105172730
firstReactRender27173773234
getState841431013
initialActions207235
loadScripts63157493876633878
setupStore84142911
FirefoxBrowserifyHomeuiStartup14541245197213015071740
load1234107615038612981389
domContentLoaded1234107515038612981389
domInteractive1053529660105265
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3320149183468
firstReactRender31265953242
getState9318720633
initialActions8016823250
loadScripts1210105814858312781330
setupStore94579730
WebpackHomeuiStartup15501347225912415731775
load1343119618429213721504
domContentLoaded1342119618429213711503
domInteractive983038157102176
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3318156183666
firstReactRender34268493643
getState827211543
initialActions40538216
loadScripts1317118117018213451472
setupStore12412618748
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 2.26 KiB (0.03%)
  • common: 432 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 6b061bf | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±71ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 745ms (±69ms) 🟢 | historical mean value: 737ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±13ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 71ms 1.02s 1.33s 1.28s 1.33s
domContentLoaded 745ms 69ms 706ms 1.01s 954ms 1.01s
firstPaint 78ms 13ms 60ms 188ms 88ms 188ms
firstContentfulPaint 78ms 13ms 60ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [6b061bf]
UI Startup Metrics (1223 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1223110814395812571327
load105495711834810861134
domContentLoaded104895111724810791128
domInteractive1813135131738
firstPaint676138118042710701128
backgroundConnect2502382737253263
firstReactRender24174962639
getState1256691333
initialActions40436414
loadScripts80471591947831879
setupStore85394915
WebpackHomeuiStartup826700127284846983
load632577112481634832
domContentLoaded624571111780627828
domInteractive16115281436
firstPaint17855898165189592
backgroundConnect20103962231
firstReactRender281773103252
getState83223914
initialActions209236
loadScripts622569110678625818
setupStore84152912
FirefoxBrowserifyHomeuiStartup14091226201713214631662
load1196105914479012661361
domContentLoaded1196105814479012661360
domInteractive1023430249113234
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect281879103045
firstReactRender29255243139
getState8321922513
initialActions4010812214
loadScripts1176104114238812481337
setupStore11422124647
WebpackHomeuiStartup15851389201913616471902
load13781230177310014341546
domContentLoaded13781230177210014331546
domInteractive1073150781106355
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3318113153563
firstReactRender342779103564
getState8316919515
initialActions506410325
loadScripts1353120817489914111520
setupStore12415222747
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 710 Bytes (0.02%)
  • ui: 2.82 KiB (0.04%)
  • common: -26.08 KiB (-0.31%)

@lionellbriones lionellbriones marked this pull request as ready for review October 14, 2025 04:46
cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 00568d5 | Date: 10/14/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±85ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 758ms (±84ms) 🟢 | historical mean value: 739ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±9ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 85ms 1.04s 1.41s 1.35s 1.41s
domContentLoaded 758ms 84ms 719ms 1.09s 1.02s 1.09s
firstPaint 79ms 9ms 64ms 152ms 92ms 152ms
firstContentfulPaint 79ms 9ms 64ms 152ms 92ms 152ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [00568d5]
UI Startup Metrics (1224 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1224109814976612691333
load105495913176010931148
domContentLoaded104894613115910871143
domInteractive17134251633
firstPaint71881118341210651146
backgroundConnect2512382948254262
firstReactRender24184762537
getState12591111329
initialActions40406414
loadScripts803708106359841896
setupStore952031016
WebpackHomeuiStartup773666103760794897
load58853987961591700
domContentLoaded58053386760584695
domInteractive15114881435
firstPaint19453872193163664
backgroundConnect21103862532
firstReactRender25165073133
getState832131014
initialActions2012226
loadScripts57853186059583694
setupStore84172911
FirefoxBrowserifyHomeuiStartup14291221195812915021663
load1214105114399012901381
domContentLoaded1214105114398912891381
domInteractive1033529652104234
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3019116123451
firstReactRender30255663148
getState9319723527
initialActions3087928
loadScripts1192103414188912671340
setupStore11415523655
WebpackHomeuiStartup15641375208612216031802
load1358122216468413921534
domContentLoaded1357122216468413921534
domInteractive983440655101177
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect311991123754
firstReactRender34278093542
getState8312416631
initialActions30275215
loadScripts1334120515908013661501
setupStore1046112746
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 720 Bytes (0.02%)
  • ui: 2.82 KiB (0.04%)
  • common: 1.22 KiB (0.01%)

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: bd18b04 | Date: 10/14/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±70ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 73ms 1.00s 1.31s 1.30s 1.31s
domContentLoaded 731ms 70ms 693ms 1.00s 975ms 1.00s
firstPaint 75ms 11ms 56ms 164ms 88ms 164ms
firstContentfulPaint 75ms 11ms 56ms 164ms 88ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [bd18b04]
UI Startup Metrics (1238 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238110014087212861359
load107196212166611211184
domContentLoaded106595712086511101171
domInteractive18148791735
firstPaint72984122843010951188
backgroundConnect2512392768256268
firstReactRender27174773039
getState1153761426
initialActions50457719
loadScripts82072196564870930
setupStore951931018
WebpackHomeuiStartup811695111668828919
load63457597469641753
domContentLoaded62756996669637747
domInteractive16115691444
firstPaint18457898178188590
backgroundConnect20103762531
firstReactRender25166393135
getState832341016
initialActions2010236
loadScripts62456795568636746
setupStore74152810
FirefoxBrowserifyHomeuiStartup13981223180413014781710
load1192105914468612721333
domContentLoaded1192105914468612721333
domInteractive1023429755105244
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291899103342
firstReactRender29256443035
getState63828616
initialActions2020327
loadScripts1171104314248412481314
setupStore12321528750
WebpackHomeuiStartup15431370204711716011797
load1339119716328813831504
domContentLoaded1339119716328813831504
domInteractive98323936899318
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3218118163561
firstReactRender352684113775
getState9216321619
initialActions30427223
loadScripts1315117316058713581477
setupStore12423027658
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 720 Bytes (0.02%)
  • ui: 2.35 KiB (0.04%)
  • common: 1.22 KiB (0.01%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: d4bd7fb | Date: 10/14/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±74ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±72ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±13ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 74ms 1.01s 1.38s 1.27s 1.38s
domContentLoaded 735ms 72ms 699ms 1.05s 940ms 1.05s
firstPaint 77ms 13ms 60ms 196ms 88ms 196ms
firstContentfulPaint 77ms 13ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [d4bd7fb]
UI Startup Metrics (1224 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1224110313776412711337
load105695012196110871172
domContentLoaded105092812116110831166
domInteractive18135071738
firstPaint680152124242510771165
backgroundConnect24923633711252262
firstReactRender2417113102436
getState1053051122
initialActions40244412
loadScripts80768197561839928
setupStore85223915
WebpackHomeuiStartup810703108463820933
load62357993266628775
domContentLoaded61557292365618767
domInteractive161157101448
firstPaint20155856200183698
backgroundConnect20114862330
firstReactRender26176283134
getState73153911
initialActions208236
loadScripts61357091263617756
setupStore84112910
FirefoxBrowserifyHomeuiStartup14101207196612614641679
load1200104615758812551335
domContentLoaded1199104615748812541334
domInteractive1013435656101223
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect302080113361
firstReactRender30258173243
getState63427518
initialActions2024428
loadScripts1177102915538612291314
setupStore11413217750
WebpackHomeuiStartup15351325205513915821863
load1329118116249213781526
domContentLoaded1329118116249213781526
domInteractive99313816693326
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3417180253574
firstReactRender352578133675
getState8214119624
initialActions30386216
loadScripts1302116415688613501488
setupStore12425028746
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 720 Bytes (0.02%)
  • ui: 2.47 KiB (0.04%)
  • common: 1.22 KiB (0.01%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 541d9fd | Date: 10/14/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±68ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.00s 1.32s 1.25s 1.32s
domContentLoaded 727ms 68ms 696ms 997ms 922ms 997ms
firstPaint 75ms 11ms 60ms 164ms 84ms 164ms
firstContentfulPaint 75ms 11ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [541d9fd]
UI Startup Metrics (1248 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1248110814136813031393
load107896712346111171184
domContentLoaded107196212286011131179
domInteractive1913131131737
firstPaint685122124243710961174
backgroundConnect2532412767257268
firstReactRender27194973144
getState1354081532
initialActions50638716
loadScripts82471798059865931
setupStore953241018
WebpackHomeuiStartup841715105072864997
load65759089175695832
domContentLoaded64958488575667823
domInteractive16114281438
firstPaint19857827194198672
backgroundConnect20114372433
firstReactRender25176293235
getState73193913
initialActions2018337
loadScripts64758287473665812
setupStore84132911
FirefoxBrowserifyHomeuiStartup14871273227615815421808
load1257109814838713291408
domContentLoaded1257109714838713291407
domInteractive1053434362104295
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3220129173458
firstReactRender31255953239
getState10218724619
initialActions6016822218
loadScripts1233108214488413031387
setupStore13426131748
WebpackHomeuiStartup15391361219813915781811
load1332118517489613771522
domContentLoaded1332118517489613771522
domInteractive100303857498340
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect301792133555
firstReactRender362684143778
getState10319326634
initialActions30436217
loadScripts1309116816729313451495
setupStore11312418755
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 743 Bytes (0.02%)
  • ui: 2.1 KiB (0.03%)
  • common: 1.73 KiB (0.02%)

@chaitanyapotti chaitanyapotti added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit c402448 Oct 14, 2025
170 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/shield-subscription-toasts branch October 14, 2025 12:04
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2025
@metamaskbot metamaskbot added the release-13.6.0 Issue or pull request that will be included in release 13.6.0 label Oct 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.6.0 Issue or pull request that will be included in release 13.6.0 size-M team-web3auth Web3Auth team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants