feat(snaps): Setup StorageService for SnapController#39385
Merged
GuillaumeRx merged 23 commits intogr/bump-snaps-v142from Feb 9, 2026
Merged
feat(snaps): Setup StorageService for SnapController#39385GuillaumeRx merged 23 commits intogr/bump-snaps-v142from
StorageService for SnapController#39385GuillaumeRx merged 23 commits intogr/bump-snaps-v142from
Conversation
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. |
StorageService for SnapControllerStorageService for SnapController
Contributor
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (1 files, +19 -2)
👨🔧 @MetaMask/extension-platform (1 files, +4 -4)
🧪 @MetaMask/qa (1 files, +4 -4)
|
Contributor
Builds ready [980bd1e]
UI Startup Metrics (1288 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
980bd1e to
5342f90
Compare
Contributor
Builds ready [f836d7c]
UI Startup Metrics (1299 ± 117 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [e9c766a]
UI Startup Metrics (1277 ± 121 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Contributor
Builds ready [0ec947e]
UI Startup Metrics (1307 ± 114 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Mrtenz
reviewed
Feb 3, 2026
0ec947e to
0f24f2d
Compare
c27fbb5 to
2f2aaf2
Compare
Contributor
Builds ready [2f2aaf2]
UI Startup Metrics (1354 ± 94 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
Mrtenz
reviewed
Feb 9, 2026
Mrtenz
reviewed
Feb 9, 2026
Mrtenz
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR sets up the
StorageServiceactions in theSnapControllermessenger and migrate the source code of the existing snaps over it.Changelog
CHANGELOG entry: Use
StorageServicefor Snaps.Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new persisted-state migration and changes where snap
sourceCodeis stored/retrieved, which can impact snap execution/installation and upgrade paths if the migration or storage adapter misbehaves.Overview
Snap storage is moved toward
StorageService.SnapController’s restricted messenger now allowsStorageServiceactions (setItem/getItem/removeItem/clear) and subscribes toSnapsRegistry:stateChange.Persisted snap
sourceCodeis migrated out of controller state. New migration193copies each snap’ssourceCodefromSnapController.snapsinto browser storage viaBrowserStorageAdapterand deletes it from state, with defensive error reporting and updated migration/version fixtures.Telemetry/UI sanitization is updated accordingly. State sanitization and tests stop treating snap
sourceCodeas a “large” field to strip, and unit test setup globally mocksBrowserStorageAdapterwith an in-memory adapter (withbrowser-storage-adaptertests opting into the real implementation).Written by Cursor Bugbot for commit e6c7a6b. This will update automatically on new commits. Configure here.