Persist Suggested Tags, Categories in Content Classification experiment#769
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #769 +/- ##
==========================================
Coverage 76.41% 76.41%
Complexity 1828 1828
==========================================
Files 87 87
Lines 7764 7764
==========================================
Hits 5933 5933
Misses 1831 1831
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nt (#769) Fixed - Persistence of suggested terms when running the Content Classification experiment. Co-authored-by: Intenzi <[email protected]> Co-authored-by: dkotter <[email protected]>
What?
Closes #768
Prevents the newly generated suggestions from the Content Classification experiment of
Suggested CategoriesandSuggested Tagsfrom disappearing when re-visited after being hidden from UI due to switch to a different panel/block.Why?
It is necessary to ensure we don't have to repeatedly utilise the feature to call AI for re-generating the same suggestions due to having visually closed the panel.
Helps ensure good User Experience.
How?
Syncs the generated suggestions to a module-level cache to outlive the lifecycle of individual panel mounts during wordpress post editing:
const suggestionsCache: Record<string, TagSuggestion[]> = {};).useStatefrom the cache.useEffecthook wheneversuggestionschange.Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity IDE
Model(s): Gemini 3.5 Flash (Low)
Used for: Identifying the issue, relevant code file and deciding correct resolution, implementation. Implemented the e2e test using it. Final implementation and tests were reviewed and edited by me.
Testing Instructions
Screenshots or screencast
Screen.Recording.2026-06-24.at.4.35.49.PM.mov
Changelog Entry