Skip to content

Surface checks that failed to run - #1457

Open
sanketio wants to merge 2 commits into
WordPress:trunkfrom
sanketio:fix/1445-surface-failed-checks
Open

Surface checks that failed to run#1457
sanketio wants to merge 2 commits into
WordPress:trunkfrom
sanketio:fix/1445-surface-failed-checks

Conversation

@sanketio

@sanketio sanketio commented Aug 31, 2026

Copy link
Copy Markdown

A failed check request is no longer swallowed: the completion notice names the checks that did not run, instead of reporting "No errors found".

  • /wp-admin/tools.php?page=plugin-check — Performance category on an active plugin: notice lists the five runtime checks whose requests return 400
  • Same screen, Plugin Repo category: unchanged, reports the error/warning counts
  • npm run lint-js

Part of #1445.

Open WordPress Playground Preview

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sanketio <sanketparmar@git.wordpress.org>
Co-authored-by: davidperezgar <davidperez@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, localized to admin UI messaging, and addresses the reported false-positive completion state without introducing risky behavior.

Pull request overview

This PR updates the Plugin Check admin UI completion notice so that when one or more check AJAX requests fail (e.g., returning a non-JSON 0 response), the final notice explicitly lists the checks that did not complete instead of incorrectly implying a clean pass.

Changes:

  • Adds a localized “failed checks” message string to the admin page script data.
  • Tracks check slugs whose runCheck request fails and surfaces them in the final results notice (forcing error severity when present).
File summaries
File Description
includes/Admin/Admin_Page.php Adds a translated message template for listing checks that could not be completed.
assets/js/plugin-check-admin.js Collects failed check slugs and appends them to the completion notice so “No errors found” is not shown on partial/incomplete runs.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread assets/js/plugin-check-admin.js Outdated
Comment on lines 815 to 817
} catch {
// Ignore for now.
failedChecks.push( checks[ i ] );
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Logged in 745f4a8.

Comment thread assets/js/plugin-check-admin.js Outdated
Comment on lines +841 to +844
* @param {string} template The translated format string.
* @param {...string} args Replacement values.
* @return {string} Formatted string with placeholders replaced.
*/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 745f4a8{...(string|number)}.

Comment thread assets/js/plugin-check-admin.js Outdated
Comment on lines +858 to +860
* @param {boolean} isSuccessMessage Whether the message is a success message.
* @param {Object} aiStats AI statistics.
* @param {Array} failedChecks Slugs of checks whose request did not complete.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 745f4a8aiStats is {?Object}, failedChecks is {string[]}.

@davidperezgar

Copy link
Copy Markdown
Member

Thanks for your contribution. You need to fix comments and tests before we can review.

@sanketio

sanketio commented Sep 7, 2026

Copy link
Copy Markdown
Author

Comments fixed in 745f4a8: the caught error is now logged, and the @since tag (n.e.x.t, not 2.1.0) and param types are corrected.

CI was red on infrastructure, not tests — PHP 8.4 - WP trunk (experimental) timed out pulling the mariadb image from Docker Hub and fail-fast cancelled the rest of the matrix, so no tests ran.

The change is JS-only and the repo has no JS test setup; happy to add one if you want coverage here.

@sanketio

sanketio commented Sep 7, 2026

Copy link
Copy Markdown
Author

Re-pushed and CI is still red, but on a repo-wide break rather than this branch: the wp-env PHP 7.4 image fails to build because sudo_1.9.5p2-3+deb11u4 404s from bullseye-security, and fail-fast cancels the rest of the matrix. Trunk's own run (f62f5c3) fails identically. Behat, Lint, Sniffs and codecov are green here.

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.

3 participants