Feature: Disable Review notes until minimum content threshold is reached#545
Feature: Disable Review notes until minimum content threshold is reached#545coderGtm wants to merge 5 commits into
Conversation
# Conflicts: # src/experiments/review-notes/hooks/useReviewNotes.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #545 +/- ##
=============================================
+ Coverage 71.20% 71.35% +0.15%
Complexity 1150 1150
=============================================
Files 67 67
Lines 5563 5565 +2
=============================================
+ Hits 3961 3971 +10
+ Misses 1602 1594 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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. |
What?
Closes #390
Adds the same minimum-content gating used by Content Summarization to Review Notes, requiring at least 100 characters before Review Notes can run, making that threshold filterable, and showing descriptive disabled-state text in the editor UI.
Why?
Review Notes could previously be triggered on very short or empty post content, which does not provide enough content for meaningful AI review suggestions.
Content Summarization already avoids this by requiring a minimum amount of content before enabling the feature. This change aligns Review Notes with that existing behavior so users get a more consistent UX across AI editor features, and so Review Notes only becomes available when there is enough content to review.
How?
This PR updates the Review Notes experiment to follow the same enablement pattern as Content Summarization.
Implementation details:
wpai_review_notes_min_content_length, with a default value of100minContentLengthGenerate Review Notesbutton when post content is below the thresholdGenerate Review Notemenu action when the post content is below the thresholdUse of AI Tools
AI assistance: Yes
Tool(s): GitHub Copilot
Model(s): GPT-5-class model via Copilot
Used for: Implementation guidance, test updates, and PR drafting; final code and description were reviewed and edited by me.
Testing Instructions
Review Notesexperiment.Generate Review Notesbutton is visible but disabled.Generate Review Notesbutton becomes enabled.Generate Review Noteis disabled when the post is below the threshold.Generate Review Notebecomes available once the post content meets the threshold.wpai_review_notes_min_content_lengthand verify the threshold changes accordingly.Screenshots or screencast
Changelog Entry