Skip to content

Conversation

lionellbriones
Copy link
Contributor

@lionellbriones lionellbriones commented Oct 15, 2025

Show skeleton loader when loading status for Shield Coverage

https://www.figma.com/design/HTAO1SrmixV4ppv7qIvLoa/Metamask-Transaction-Shield?node-id=12570-88009&t=mNinFtkACmFpqbjG-4

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Show skeleton loader when loading status for Shield Coverage

Related issues

Fixes:

Manual testing steps

  1. Login/Create to an account with Shield subscription
  2. Open https://metamask.github.io/test-dapp/ and Connect
  3. Run a Malicious ETH Transfer
  4. Observe the Transaction Shield coverage status just above the footer

Screenshots/Recordings

Before

tx-shield-no-loader.mov

After

tx-shield-with-loader.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

Adds a skeleton loader for the Shield coverage indicator and makes subscription hooks refetchable, updating settings and plan pages to always fetch latest data.

  • UI
    • ConfirmInfoAlertRow: adds showAlertLoader prop and renders Skeleton when alerts are not yet loaded; used in shield-footer-coverage-indicator.
  • Hooks
    • useUserSubscriptions: accepts { refetch }, fetches only when signed-in and unlocked; uses useAsyncResult.
    • useSubscriptionPricing: accepts { refetch }, switched to useAsyncResult for loading/error state.
    • useEnableShieldCoverageChecks: simplified to derive from subscriptions with useMemo.
  • Pages
    • Settings transaction-shield and shield-plan: call hooks with { refetch: true } and show loaders accordingly.
  • Tests
    • Update expectation for useSubscriptionPricing error to be undefined.

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

@lionellbriones lionellbriones requested a review from a team as a code owner October 15, 2025 12:52
Copy link
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.

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

metamaskbot commented Oct 15, 2025

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (2 files, +6 -9)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 footer/
              • 📁 shield-footer-coverage-indicator/
                • 📄 shield-footer-coverage-indicator.tsx +1 -0
        • 📁 hooks/
          • 📁 transactions/
            • 📄 useEnableShieldCoverageChecks.ts +5 -9

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: bb2917d | Date: 10/15/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±72ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±69ms) 🟢 | historical mean value: 740ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±13ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 72ms 1.01s 1.33s 1.29s 1.33s
domContentLoaded 731ms 69ms 699ms 988ms 975ms 988ms
firstPaint 76ms 13ms 60ms 196ms 88ms 196ms
firstContentfulPaint 76ms 13ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [bb2917d]
UI Startup Metrics (1251 ± 65 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1251112514426512851366
load106997712045511011169
domContentLoaded106296911975510931163
domInteractive1813135131734
firstPaint70977120643310871157
backgroundConnect2522392969255266
firstReactRender27195382945
getState16590111934
initialActions61678717
loadScripts81773095153848909
setupStore1062931016
WebpackHomeuiStartup850732112956877932
load63759378950652768
domContentLoaded63058878249645758
domInteractive171261101440
firstPaint17557780164190601
backgroundConnect22114972536
firstReactRender2817128133335
getState942231115
initialActions3012258
loadScripts62758678046643747
setupStore1052831215
FirefoxBrowserifyHomeuiStartup1393121817928714361524
load1170104713136412121289
domContentLoaded1170104613136412121288
domInteractive943524332103176
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3423116133756
firstReactRender29245752939
getState95526816
initialActions5264946
loadScripts1148103012946211881270
setupStore156327371014
WebpackHomeuiStartup15991434222613016261784
load1364121616448414121522
domContentLoaded1364121616438414111522
domInteractive1063138072102349
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect372299144169
firstReactRender33267793447
getState1047210820
initialActions5114414313
loadScripts1341118816078113831496
setupStore156142211060
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 290 Bytes (0%)
  • common: 10 Bytes (0%)

chaitanyapotti
chaitanyapotti previously approved these changes Oct 15, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: ae42da5 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±75ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 729ms (±72ms) 🟢 | historical mean value: 734ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±14ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 75ms 1.00s 1.34s 1.29s 1.34s
domContentLoaded 729ms 72ms 694ms 1.00s 983ms 1.00s
firstPaint 75ms 14ms 56ms 196ms 88ms 196ms
firstContentfulPaint 75ms 14ms 56ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [ae42da5]
UI Startup Metrics (1261 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1261111416036812991362
load107895513326011251168
domContentLoaded107193913216111201153
domInteractive201490131749
firstPaint676110133044111121178
backgroundConnect25624136914259273
firstReactRender27184763041
getState1654982036
initialActions61528618
loadScripts822686105058867901
setupStore1063851120
WebpackHomeuiStartup8577231137698841017
load64358596671655848
domContentLoaded63657995670643838
domInteractive161167101540
firstPaint17657954179177612
backgroundConnect2294072835
firstReactRender27173773336
getState1041831215
initialActions3015246
loadScripts63357894567641827
setupStore1051631214
FirefoxBrowserifyHomeuiStartup14271231175312214791700
load1196105013878812691340
domContentLoaded1196104913878812691340
domInteractive1013135359101255
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32216083746
firstReactRender30255363045
getState937810818
initialActions4142549
loadScripts1176103313658612451318
setupStore156200261164
WebpackHomeuiStartup15681367194011516231809
load1330118715849013751537
domContentLoaded1330118615849013751537
domInteractive97313766498240
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3720107164367
firstReactRender34268593541
getState115148151022
initialActions6117017414
loadScripts1306116915638613481485
setupStore13667121148
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 290 Bytes (0%)
  • common: 10 Bytes (0%)

cursor[bot]

This comment was marked as outdated.

tuna1207
tuna1207 previously approved these changes Oct 16, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: b4cb0c1 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±75ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 758ms (±73ms) 🟢 | historical mean value: 734ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 75ms 1.04s 1.38s 1.32s 1.38s
domContentLoaded 758ms 73ms 719ms 1.05s 974ms 1.05s
firstPaint 79ms 11ms 60ms 164ms 92ms 164ms
firstContentfulPaint 79ms 11ms 60ms 164ms 92ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [b4cb0c1]
UI Startup Metrics (1238 ± 71 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238111314317112871355
load106296212296511141181
domContentLoaded105695712246511091173
domInteractive17135161635
firstPaint79389124440811001175
backgroundConnect2512372768254272
firstReactRender26174772844
getState1554791834
initialActions60567721
loadScripts81270196264860932
setupStore1152841219
WebpackHomeuiStartup8527241127788631048
load64058596177646863
domContentLoaded63258194976636850
domInteractive16116191436
firstPaint19358888183190613
backgroundConnect22105072732
firstReactRender2817115133339
getState942441215
initialActions3012247
loadScripts63057993874634840
setupStore1062631215
FirefoxBrowserifyHomeuiStartup14711260194412115311733
load1234107414608212911367
domContentLoaded1233107414598212911367
domInteractive1043328550115237
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3824130184171
firstReactRender31257173251
getState10310513826
initialActions6219419412
loadScripts1207105613907912721343
setupStore157183231152
WebpackHomeuiStartup15941385209713016321850
load1352120916098813971535
domContentLoaded1351120916098813971535
domInteractive101333706798347
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect362198144460
firstReactRender33267873441
getState9411811914
initialActions7116118426
loadScripts1327119015458513711505
setupStore156185231158
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 394 Bytes (0.01%)
  • common: 10 Bytes (0%)

cursor[bot]

This comment was marked as outdated.

chaitanyapotti
chaitanyapotti previously approved these changes Oct 16, 2025
cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 9c9e421 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±70ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±67ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 70ms 1.01s 1.32s 1.26s 1.32s
domContentLoaded 735ms 67ms 698ms 1.00s 938ms 1.00s
firstPaint 75ms 12ms 60ms 176ms 88ms 176ms
firstContentfulPaint 75ms 12ms 60ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [9c9e421]
UI Startup Metrics (1241 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1241113114366412711374
load106696912535910951200
domContentLoaded105995012495910881194
domInteractive17134351724
firstPaint665118120742510741131
backgroundConnect25424137113257266
firstReactRender26167092648
getState1653972030
initialActions51445614
loadScripts811700100459844944
setupStore1062631117
WebpackHomeuiStartup844716119467861956
load633584103564639748
domContentLoaded625578101162632742
domInteractive16126881436
firstPaint207551044214191729
backgroundConnect22104472733
firstReactRender27176283234
getState941731113
initialActions3017247
loadScripts62257699759630731
setupStore1052131214
FirefoxBrowserifyHomeuiStartup14061225184911914591667
load1190104914808312531335
domContentLoaded1189104914808312531334
domInteractive1013337754102215
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3322115143757
firstReactRender29255543038
getState12419021839
initialActions521881939
loadScripts1168103214508012321311
setupStore126144161033
WebpackHomeuiStartup15901390189810016381806
load1362121216017914191524
domContentLoaded1362121116007914181524
domInteractive993033445110192
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect4023132194492
firstReactRender33267893439
getState1055991215
initialActions5110811413
loadScripts1334119415737713861480
setupStore1265391136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 338 Bytes (0.01%)
  • common: 10 Bytes (0%)

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

Labels

area-shield release-13.6.0 Issue or pull request that will be included in release 13.6.0 size-S team-confirmations Push issues to confirmations team team-web3auth Web3Auth team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants