Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds LocalStorageWithOffScreenStore, to be used in the future as a ba… #30241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Feb 11, 2025

…ckup of critical data in PersistedStateManager

Description

This PR adds a class that extends the BaseStore and, in a future PR, will be used with the PersistanceManager to backup vault data in a location separate from storage.local. The data store used in this case is the localStorage within the offscreen document. localStorage is not available to us in the service worker, which is why we are using the one available to us in the offscreen document

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

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.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Feb 11, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [eb231bd]
Page Load Metrics (1577 ± 43 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1403175315768943
domContentLoaded1396171915558440
load1404175715778943
domInteractive23104442814
backgroundConnect106223168
firstReactRender1597522713
getState45812147
initialActions01000
loadScripts1007125511247034
setupStore776212110
uiStartup15522213183315675
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 136 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 100 Bytes (0.00%)

@danjm danjm changed the title Adds LocalStorageWithOffScreenStore, to be used in the future as a ba… Afeat: adds LocalStorageWithOffScreenStore, to be used in the future as a ba… Mar 6, 2025
@danjm danjm marked this pull request as ready for review March 6, 2025 15:26
@danjm danjm requested a review from a team as a code owner March 6, 2025 15:26
@danjm danjm changed the title Afeat: adds LocalStorageWithOffScreenStore, to be used in the future as a ba… feat: adds LocalStorageWithOffScreenStore, to be used in the future as a ba… Mar 6, 2025
@danjm danjm force-pushed the add-offscreenlocalstorage-store branch from eb231bd to a004bbf Compare March 6, 2025 15:33
@metamaskbot
Copy link
Collaborator

Builds ready [a004bbf]
Page Load Metrics (1942 ± 211 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30337961748716344
domContentLoaded162937321909435209
load163437861942440211
domInteractive27412638239
backgroundConnect972352110
firstReactRender1579342110
getState65917167
initialActions01000
loadScripts121229931447368177
setupStore85315136
uiStartup188540422189447214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-extension-platform Extension Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants