Skip to content

feat: health scoring#182

Merged
dermatz merged 5 commits into
mainfrom
feat/health-scoring
May 11, 2026
Merged

feat: health scoring#182
dermatz merged 5 commits into
mainfrom
feat/health-scoring

Conversation

@dermatz
Copy link
Copy Markdown
Member

@dermatz dermatz commented May 11, 2026

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

image
  • Added a new "Show Health Score" configuration option (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]
  • Added a new method getShowHealthScore() in Inspector.php to expose the configuration to the frontend, and passed its value as a data attribute to the toolbar template. [1] [2]

Frontend UI and Functionality

  • Refactored the toolbar footer to include a health score gauge, "Run All Tests" button, and a reset button, with dynamic rendering based on the configuration. The gauge visually represents the overall audit score, and the "Run All Tests" button triggers all audits and updates the score. [1] [2] [3]
  • Implemented the runAllAuditsForScore method to execute all audits, compute an aggregate health score (0–100), and update the gauge. Added resetScore and updateHealthScore methods to manage the gauge state. [1] [2]

Styling and Visual Enhancements

  • Updated and expanded toolbar.css to 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.

Copilot AI review requested due to automatic review settings May 11, 2026 07:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/view/frontend/web/js/toolbar/ui.js
Comment thread src/view/frontend/web/js/toolbar/ui.js
Comment thread src/view/frontend/web/js/toolbar/audits.js Outdated
Copilot AI review requested due to automatic review settings May 11, 2026 07:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Comment thread src/view/frontend/web/js/toolbar/ui.js
Comment thread src/view/frontend/web/js/toolbar/ui.js
Comment thread src/view/frontend/web/js/toolbar/audits.js
Comment thread src/i18n/de_DE.csv Outdated
Comment thread src/view/frontend/web/css/toolbar.css Outdated
@dermatz dermatz merged commit 89bba7c into main May 11, 2026
16 of 17 checks passed
@dermatz dermatz deleted the feat/health-scoring branch May 11, 2026 08:27
@github-actions github-actions Bot mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants