Skip to content

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 8, 2025

The new metadata properties includeInStateLogs and usedInUi have been added to all snaps controllers.

Relates to https://github.com/MetaMask/decisions/blob/main/decisions/core/0014-Expand-Controller-Metadata.md

The new metadata properties `includeInStateLogs` and `usedInUi` have
been added to all snaps controllers.

Relates to https://github.com/MetaMask/decisions/blob/main/decisions/core/0014-Expand-Controller-Metadata.md
@Gudahtt Gudahtt force-pushed the add-new-controller-metadata branch from f027323 to 19b08a7 Compare September 8, 2025 21:21
@@ -82,40 +82,6 @@ describe('SnapInterfaceController', () => {
});
});

describe('constructor', () => {
it('persists notification interfaces', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved below to the metadata describe block, as it seemed like a better fit there.

@@ -305,80 +309,6 @@ describe('SnapController', () => {
snapController.destroy();
});

it('can rehydrate state', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests were moved to the metadata block as well

`);
});

it('strips out large state properties', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new test I wrote to ensure the new state deriver is working as expected

Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (69f2a5a) to head (d667590).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3632   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         417      417           
  Lines       11803    11811    +8     
  Branches     1844     1844           
=======================================
+ Hits        11601    11609    +8     
  Misses        202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Gudahtt Gudahtt marked this pull request as ready for review September 9, 2025 12:50
@Gudahtt Gudahtt requested a review from a team as a code owner September 9, 2025 12:50
Copy link

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need a review from @Mrtenz or @GuillaumeRx, but LGTM at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants