Skip to content

Suggested Tags/Categories when selected are removed from view irrespective of end result being a failure. (Content Classification exp) #771

Description

@Intenzi

Description

The Content Classification Experiment feature provides AI suggestions for tags/categories to add to a post.

Expected: When a tag/category is selected (by clicking on it), if it fails to be added, it should be visible again for re-attempting to add it.

What currently happens: When a tag/category is selected, the frontend will always remove it first and will not add it back to the list if an error occurs in the api call resolving it.

Why this is a bug: It leads to a missing AI suggestion which could have still been utilised by re-attempting/manually entering it. It causes poor User Experience.

Step-by-step reproduction instructions

Ensure the AI features are enabled and Content Classification experiment is enabled.

  1. Open the post editor.
  2. Make a new post with atleast 150 words of content.
  3. Open the Post sidebar.
  4. Click Suggest Tags (or Categories) to get suggestions. Wait for suggestions to appear.
  5. Turn off your internet connection or perform a simulation of it via developer console.
  6. Click one of the suggested tag pills.
  7. Result: The pill disappears immediately. When the network request fails, the pill never returns to the list and is lost forever.

Other possible reproduction steps can be: an unresponsive backend, a nonce expiry, an error in the backend which gets shown but will thus also lead to pill disappearance.

Screenshots, screen recording, code snippet

Screen.Recording.2026-06-24.at.4.37.04.PM.mov

Environment info

  • WordPress v7.0 , AI Plugin Version 1.0.2 - dev branch , Twenty Twenty-Five Theme
  • Opera GX browser
  • using Macbook with MacOS Tahoe v26

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions