fix: remove INP metric tracking from performance and vitals modules#165
Merged
fix: remove INP metric tracking from performance and vitals modules#165
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes client-side support for the INP (Interaction to Next Paint) metric from the MageForge Inspector frontend, simplifying web-vitals collection and the performance UI.
Changes:
- Removed INP tracking from the
webVitalsstate structure. - Stopped collecting INP data by removing the
PerformanceObserverforfirst-input. - Removed INP rendering from the Browser Metrics UI (method + call site).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/view/frontend/web/js/inspector/vitals.js | Removes INP collection logic (first-input observer) from vitals tracking. |
| src/view/frontend/web/js/inspector/performance.js | Removes INP metric rendering (call site and renderINPMetric implementation). |
| src/view/frontend/web/js/inspector.js | Drops the inp field from the webVitals state initialization. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request removes support for the INP (Interaction to Next Paint) performance metric from the inspector's frontend code. The changes eliminate INP data collection, storage, and display, simplifying the performance metrics logic.
Performance Metrics Removal
webVitalsdata structure ininspector.js, so INP values are no longer tracked.PerformanceObserverfor the'first-input'event invitals.js.renderINPMetricfunction and its invocation fromperformance.js, so INP is no longer displayed in the UI. [1] [2]