Conversation
…rate error management for suggestions and outline. Update SuggestionsPanel to accept error and retry props.
…api' into 1142-connect-content-planner-frontend-with-backend-endpoints-
…ine structure in the slice.
…-the-2nd-request-to-ai-api' into 1142-connect-content-planner-frontend-with-backend-endpoints-
…-the-2nd-request-to-ai-api 1132 create endpoint for sending the 2nd request to ai api
…ntend-with-backend-endpoints-' into 1137-add-error-handling-content-planner # Conflicts: # packages/js/src/ai-content-planner/components/content-outline-modal.js # packages/js/src/ai-content-planner/store/content-outline.js
…x-loading-state-discrepancies-in-content-planner-modals
…oints-' into fix-loading-state-discrepancies-in-content-planner-modals
After positioning the spark notification outside the panel.
Also fix a bug where the message related to being out of free sparks was never rendered
This is done to have one source of truth for the suggestion.
We want to keep the focus in the modal when going back to suggestions.
…gnment Align the usage counter vertically
…ent-planner-route-and-content-planner-endpoint Rename get suggestion endpoint classes
…test.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…e-and-meta-description-changes-the-in-the-content-suggestion Update the suggestion in the content suggestion state
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…edly-on-premium Refactor upsell logic to include premium subscription validation
Coverage Report for CI Build 4Warning No base build found for commit Coverage: 56.588%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
…tion 1175 fix spark notification position
…73-add-learn-more-link-to-approve-modal # Conflicts: # packages/js/src/ai-content-planner/containers/approve-modal.js
…ove-modal 1173 add learn more link to approve modal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Adds the Content Planner feature to Yoast SEO. This feature helps users discover and plan new content by analyzing their existing site and suggesting new post topics, complete with titles, focus keyphrases, meta descriptions, content outlines, and category suggestions — all powered by the Yoast AI.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
yoast/content-planner-banner) is inserted into new posts to serve as the entry point for the Content Planner. It is removed from the post content after the outline is applied.yoast/v1/ai_content_planner/get_suggestions(GET) andyoast/v1/ai_content_planner/get_outline(POST), which proxy requests to the Yoast AI staging/production API.The following PRs were merged into this feature branch:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
1. Inline banner — entry point
2. Consent flow
3. Approve modal (sidebar/metabox entry point)
wp.data.dispatch("yoast-seo/ai-generator").setUsageCount(10)in the console), then open a post with existing content and click "Get content suggestions".4. Content suggestions modal
5. Content outline modal
get_outlinerequest).get_outlinerequest is made.6. Meta description progress bar
7. Applying the outline
Empty post (no confirmation modal):
Post with existing content (confirmation modal):
Applying the inline banner suggestion:
8. Spark counter and notifications (free users)
AI Generator integration:
Premium (100 sparks/month limit):
9. Error handling
Suggestions errors (set
window._testOutlineOnly = false, then click "Get content suggestions"):window._testErrorCode = 500; window._testErrorIdentifier = "";window._testErrorCode = 429; window._testErrorIdentifier = "";window._testErrorCode = 408; window._testErrorIdentifier = "";window._testErrorCode = 400; window._testErrorIdentifier = "SITE_UNREACHABLE";window._testErrorCode = 400; window._testErrorIdentifier = "WP_HTTP_REQUEST_ERROR";For each: verify the modal stays open, the correct error message is shown, UsageCounter is hidden, "Try again" re-triggers the fetch, and reopening the modal starts in a clean state.
Outline errors — same table but set
window._testOutlineOnly = truebefore clicking a suggestion card. Verify the modal transitions from "Content suggestions" to "Content outline" and shows the error.Cleanup:
window.fetch = window._originalFetch;10. Category handling
'EXISTING CATEGORY'andIDwith a real category):11. AI features disabled
12. Elementor and Classic editor
Ads regression test (block editor only):
_yoast_alerts_dismissedtoa:1:{s:26:"webinar-promo-notification";b:0;}).src/promotions/domain/black-friday-promotion.phpto 2027).13. Intent badge styling
14. Accessibility
15. Spark notification position
16. Approve modal design and spark limit states
wp.data.dispatch("yoast-seo/ai-generator").setUsageCount(10)in the console).Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
yoast/content-planner-bannerblock andyoast/content-planner-suggestionblocks are injected.get_suggestions,get_outline).search-metadata-previewspackage — new helper for progress bar color calculation.@yoast/ui-librarypackage — tooltip arrow styling and sparkles gradient icon.Other environments
Documentation
Quality assurance
grunt build:imagesand committed the results, if my PR introduces or edits images or SVGs.Innovation
innovationlabel.Fixes #