Skip to content

Content Classification: Dynamicize taxonomy error messages - #916

Merged
dkotter merged 9 commits into
WordPress:developfrom
Infinite-Null:fix/content-classification-taxonomy-labels
Aug 24, 2026
Merged

Content Classification: Dynamicize taxonomy error messages#916
dkotter merged 9 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>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@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 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.52%. Comparing base (441dcbb) to head (0549deb).

Files with missing lines Patch % Lines
.../Content_Classification/Content_Classification.php 89.47% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #916      +/-   ##
=============================================
+ Coverage      74.42%   74.52%   +0.10%     
- Complexity      3116     3124       +8     
=============================================
  Files            132      132              
  Lines          12179    12193      +14     
=============================================
+ Hits            9064     9087      +23     
+ Misses          3115     3106       -9     
Flag Coverage Δ
unit 74.52% <89.47%> (+0.10%) ⬆️

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
@jeffpaul jeffpaul moved this from Triage to Needs review in WordPress AI Roadmap Aug 10, 2026
jeffpaul
jeffpaul previously approved these changes Aug 10, 2026

@jeffpaul jeffpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests well on Playground, will await @dkotter's review before merging

@jeffpaul
jeffpaul requested a review from dkotter August 10, 2026 16:47
@jeffpaul jeffpaul mentioned this pull request Aug 10, 2026
48 tasks
Comment thread includes/Abilities/Content_Classification/Content_Classification.php Outdated
Comment thread includes/Abilities/Content_Classification/Content_Classification.php Outdated
Comment thread tests/Integration/Includes/Abilities/Content_ClassificationTest.php
@dkotter dkotter modified the milestones: 1.3.0, 1.4.0 Aug 13, 2026
…e conversion in content classification logic
@Infinite-Null

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I’ve reworked the changes. Could you please review the updated changes when you get a chance. Thank you.

cc: @jeffpaul @dkotter

@dkotter
dkotter merged commit 2e28193 into WordPress:develop Aug 24, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Needs review to Done in WordPress AI Roadmap Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants