-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: add @metamask/profile-metrics-controller
#38177
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
Conversation
|
@metamaskbot update-policies |
Builds ready [79faff7]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
✨ Files requiring CODEOWNER review ✨🕵️ @MetaMask/extension-privacy-reviewers (1 files, +8 -0)
📜 @MetaMask/policy-reviewers (5 files, +160 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (1 files, +8 -0)
|
Builds ready [643579d]
UI Startup Metrics (1231 ± 114 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [4509806]
UI Startup Metrics (1230 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [47d05e5]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [3e50238]
UI Startup Metrics (1338 ± 119 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
Builds ready [3ddfd9a]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [5a6a98d]
UI Startup Metrics (1313 ± 124 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
@metamask/user-profile-controller@metamask/profile-metrics-controller
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [df5cb5e]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
|
No policy changes |
Builds ready [e430975]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
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. |
Builds ready [ef50503]
UI Startup Metrics (1271 ± 120 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [353c946]
UI Startup Metrics (1252 ± 105 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d61b9ae]
UI Startup Metrics (1247 ± 121 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Builds ready [c162dab]
UI Startup Metrics (1242 ± 111 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
cryptodev-2s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
seaona
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA files LGTM
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
State log/policy changes look good 👍
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> The `@metamask/profile-metrics-controller` package is being added to the extension. The package ships two new components and their messengers: - `ProfileMetricsController` - `ProfileMetricsService` Preview build coming from MetaMask/core#7196 [](https://codespaces.new/MetaMask/metamask-extension/pull/38177?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** * Related to https://consensyssoftware.atlassian.net/browse/WPC-179 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Integrates `@metamask/profile-metrics-controller` (controller + service) with messengers, initialization, state wiring, LavaMoat policies, and adds E2E/unit tests and fixtures. > > - **Controllers/Services** > - Add `ProfileMetricsController` and `ProfileMetricsService` to controller list/types and initialization (`app/scripts/controller-init/*`, `metamask-controller.js`). > - Wire controller state into persisted/mem stores and `ControllerFlatState`. > - **Messengers** > - Introduce restricted messengers: `getProfileMetricsControllerMessenger` and `getProfileMetricsServiceMessenger`, plus registry entries (`messengers/index.ts`). > - **Initialization** > - New inits: `profile-metrics-controller-init.ts` (feature-flag + MetaMetrics gated, interval config) and `profile-metrics-service-init.ts` (bind `fetch`, set SDK env). > - **Security/Build** > - Update LavaMoat Browserify/Webpack policies to allow profile-metrics modules and deps. > - Add dependency `@metamask/profile-metrics-controller` in `package.json`. > - **Tests/Fixtures** > - Add unit tests for messengers and inits. > - Add E2E tests validating API calls based on feature flag and MetaMetrics opt-in. > - Update E2E fixtures/state snapshots to include `ProfileMetricsController` state. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c162dab. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: MetaMask Bot <[email protected]> Co-authored-by: Mark Stacey <[email protected]> Co-authored-by: Elliot Winkler <[email protected]>
Description
The
@metamask/profile-metrics-controllerpackage is being added to the extension. The package ships two new components and their messengers:ProfileMetricsControllerProfileMetricsServicePreview build coming from MetaMask/core#7196
Changelog
CHANGELOG entry: null
Related issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Integrates
@metamask/profile-metrics-controller(controller + service) with messengers, initialization, state wiring, LavaMoat policies, and adds E2E/unit tests and fixtures.ProfileMetricsControllerandProfileMetricsServiceto controller list/types and initialization (app/scripts/controller-init/*,metamask-controller.js).ControllerFlatState.getProfileMetricsControllerMessengerandgetProfileMetricsServiceMessenger, plus registry entries (messengers/index.ts).profile-metrics-controller-init.ts(feature-flag + MetaMetrics gated, interval config) andprofile-metrics-service-init.ts(bindfetch, set SDK env).@metamask/profile-metrics-controllerinpackage.json.ProfileMetricsControllerstate.Written by Cursor Bugbot for commit c162dab. This will update automatically on new commits. Configure here.