feat: health scoring#182
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new “Health Score” feature to the MageForge Inspector toolbar, including a footer gauge that summarizes audit results and a “Run All Tests” action, with an admin configuration toggle to show/hide the feature.
Changes:
- Adds a configurable Health Score gauge + “Run All Tests”/reset controls to the toolbar footer.
- Implements a “run all audits then compute aggregate score (0–100)” flow and updates related UI state.
- Wires the new config option through Magento config, block/template data attributes, and i18n strings; updates toolbar styling.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/view/frontend/web/js/toolbar/ui.js | Builds the new footer UI (gauge, run-all, reset) and adds gauge update/reset helpers. |
| src/view/frontend/web/js/toolbar/audits.js | Adds runAllAuditsForScore() to execute all audits and compute a score from their statuses. |
| src/view/frontend/web/js/toolbar.js | Updates Alpine component state to track new footer button refs. |
| src/view/frontend/web/css/toolbar.css | Adds styles for the gauge, button row, reset button, and credit heart. |
| src/view/frontend/templates/inspector.phtml | Passes data-show-health-score to the frontend component. |
| src/Model/Config/Inspector.php | Adds the XML config path constant for the new setting. |
| src/i18n/en_US.csv | Adds admin UI translation strings for the new setting. |
| src/i18n/de_DE.csv | Adds German translation strings for the new setting. |
| src/etc/config.xml | Sets the default config value for show_health_score to enabled. |
| src/etc/adminhtml/system.xml | Adds the admin configuration field for enabling/disabling the Health Score feature. |
| src/Block/Inspector.php | Exposes getShowHealthScore() for templates/frontend. |
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 introduces a new "Health Score" feature to the MageForge Inspector toolbar, allowing users to view an overall health score gauge and run all audits at once from the toolbar footer. It adds configuration options for this feature, updates the UI and translations, and refactors related frontend logic and styles.
Feature: Health Score Gauge and "Run All Tests" Button
show_health_score) to the admin panel, config XML, and translations, allowing store owners to enable or disable the health score gauge and "Run All Tests" button in the toolbar footer. [1] [2] [3] [4] [5]getShowHealthScore()inInspector.phpto expose the configuration to the frontend, and passed its value as a data attribute to the toolbar template. [1] [2]Frontend UI and Functionality
runAllAuditsForScoremethod to execute all audits, compute an aggregate health score (0–100), and update the gauge. AddedresetScoreandupdateHealthScoremethods to manage the gauge state. [1] [2]Styling and Visual Enhancements
toolbar.cssto style the new health score gauge, "Run All Tests" button, and reset button, as well as minor improvements to the credit line. [1] [2] [3]These changes collectively provide a more informative and interactive toolbar experience, making it easier for users to assess and improve their store's health at a glance.