Skip to content

Content Classification: Dynamicize taxonomy error messages - #916

Open
Infinite-Null wants to merge 2 commits into
WordPress:developfrom
Infinite-Null:fix/content-classification-taxonomy-labels
Open

Content Classification: Dynamicize taxonomy error messages#916
Infinite-Null wants to merge 2 commits into
WordPress:developfrom
Infinite-Null:fix/content-classification-taxonomy-labels

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What?

This PR updates the error and notice messages in the Content_Classification ability to dynamically display the specific taxonomy label (e.g., "category" or "tag") rather than generic hardcoded "taxonomy" terminology.

Why?

When users interacted with specific taxonomy panels (such as "Suggest Categories" under the Categories sidebar panel), error notices displayed generic phrasing like "No taxonomy suggestions were generated." or "You do not have permission to generate taxonomy suggestions." This caused confusion as users were explicitly generating suggestions for categories.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 4.6
Used for: Validating bug, suggesting a fix.

Testing Instructions

  1. Open a Post.
  2. Open the Categories accordion panel in the right sidebar.
  3. Trigger Category suggestion generation with empty content or under conditions with no results/no permission.
  4. Verify the notice banner displays "Content is required to generate category suggestions." or "No category suggestions were generated." (instead of generic "No taxonomy suggestions were generated.").

Screenshots or screencast

Before

Screen.Recording.2026-08-05.at.1.30.25.PM.mov

After

Screen.Recording.2026-08-05.at.1.29.48.PM.mov

Changelog Entry

Fixed - Display specific taxonomy labels (e.g. category) in Content Classification notice error messages instead of generic terminology.

Open WordPress Playground Preview

@Infinite-Null
Infinite-Null requested a review from a team August 5, 2026 08:01
@github-actions

github-actions Bot commented Aug 5, 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: Infinite-Null <ankitkumarshah@git.wordpress.org>

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

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.44%. Comparing base (5599e9d) to head (0d389bf).

Files with missing lines Patch % Lines
.../Content_Classification/Content_Classification.php 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #916   +/-   ##
==========================================
  Coverage      80.43%   80.44%           
- Complexity      2565     2573    +8     
==========================================
  Files            110      110           
  Lines          10448    10462   +14     
==========================================
+ Hits            8404     8416   +12     
- Misses          2044     2046    +2     
Flag Coverage Δ
unit 80.44% <84.21%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter added this to the 1.3.0 milestone Aug 6, 2026
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.

2 participants