Skip to content

1143 content planner add results of post suggestions api to front end#23142

Merged
vraja-pro merged 25 commits intofeature/content-plannerfrom
1143-content-planner-add-results-of-post-suggestions-api-to-front-end
Apr 15, 2026
Merged

1143 content planner add results of post suggestions api to front end#23142
vraja-pro merged 25 commits intofeature/content-plannerfrom
1143-content-planner-add-results-of-post-suggestions-api-to-front-end

Conversation

@thijsoo
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo commented Apr 8, 2026

Context

  • Adds the data from the AI API to the actual front-end.

Summary

This PR can be summarized in the following changelog entry:

  • Adds suggestion API data to the front-end components.

Relevant technical choices:

  • Since we have duped the AI code for the time being to have it be able to be refactored. I needed to add the integration change to both the old and the new files to make sure they are registered.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Make sure you have a working AI back-end locally or are connected to the staging API. No license needed.
  • Open your site and make sure you have 5 posts that have some actual content in the title and meta description. These are the most important fields. For example copy paste it from 5 yoast.com posts.
  • Create a new post in the block editor and open the yoast sidebar. and click on 'Get content suggestions'.
  • Click the button again and wait a bit on the suggestions.
  • Close the modal and click on the get suggestion button from the banner in the content, check you get the same result.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

@thijsoo thijsoo added this to the feature/content-planner milestone Apr 8, 2026
@thijsoo thijsoo added innovation Innovative issue. Relating to performance, memory or data-flow. changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels Apr 8, 2026
Base automatically changed from 1131-next-post-create-endpoint-for-sending-the-1st-request-to-ai-api-for-generating-post-suggestions to feature/content-planner April 9, 2026 13:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

…seo into 1143-content-planner-add-results-of-post-suggestions-api-to-front-end

# Conflicts:
#	packages/js/src/ai-content-planner/components/content-suggestions-modal.js
#	packages/js/src/ai-content-planner/components/feature-modal.js
#	packages/js/src/ai-content-planner/store/index.js
#	packages/js/tests/ai-content-planner/components/content-suggestions-modal.test.js
#	packages/js/tests/ai-content-planner/components/feature-modal.test.js
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 9, 2026

Coverage Report for CI Build 9

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.03%) to 53.435%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: 48 uncovered changes across 13 files (37 of 85 lines covered, 43.53%).
  • 75 coverage regressions across 5 files.

Uncovered Changes

Top 10 Files by Coverage Impact Changed Covered %
src/ai/content-planner/user-interface/content-planner-integration.php 15 0 0.0%
src/ai/content-planner/infrastructure/endpoints/content-planner-endpoint.php 8 0 0.0%
packages/js/src/ai-content-planner/hooks/use-fetch-content-suggestions.js 7 1 14.29%
packages/js/src/shared-admin/helpers/locale.js 6 2 33.33%
packages/js/src/ai-content-planner/containers/feature-modal.js 3 0 0.0%
packages/js/src/ai-content-planner/block.js 2 0 0.0%
packages/js/src/ai-content-planner/store/content-outline.js 2 0 0.0%
packages/js/src/ai-content-planner/store/content-suggestions.js 20 18 90.0%
src/ai/content-planner/application/content-planner-endpoints-repository.php 2 0 0.0%
packages/js/src/ai-content-planner/components/feature-modal.js 5 4 80.0%

Coverage Regressions

75 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
src/repositories/indexable-repository.php 44 26.62%
src/presenters/robots-txt-presenter.php 13 54.84%
src/helpers/robots-txt-helper.php 10 45.0%
src/ai/authorization/application/token-manager.php 7 91.58%
packages/js/src/ai-content-planner/initialize.js 1 52.44%

Coverage Stats

Coverage Status
Relevant Lines: 65657
Covered Lines: 34909
Line Coverage: 53.17%
Relevant Branches: 16852
Covered Branches: 9180
Branch Coverage: 54.47%
Branches in Coverage %: Yes
Coverage Strength: 45815.81 hits per line

💛 - Coveralls

Comment thread src/ai-generator/user-interface/ai-generator-integration.php Outdated
Comment thread packages/js/src/ai-content-planner/components/feature-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/components/feature-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/store/index.js Outdated
@github-actions
Copy link
Copy Markdown

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

…seo into 1143-content-planner-add-results-of-post-suggestions-api-to-front-end

# Conflicts:
#	packages/js/src/ai-content-planner/components/feature-modal.js
#	packages/js/src/ai-content-planner/initialize.js
#	packages/js/src/ai-content-planner/store/index.js
#	packages/js/tests/ai-content-planner/components/feature-modal.test.js
@github-actions
Copy link
Copy Markdown

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

thijsoo added 4 commits April 14, 2026 10:27
…seo into 1143-content-planner-add-results-of-post-suggestions-api-to-front-end

# Conflicts:
#	packages/js/src/ai-content-planner/components/feature-modal.js
#	packages/js/src/ai-content-planner/initialize.js
#	packages/js/src/ai-content-planner/store/index.js
Comment thread packages/js/src/ai-content-planner/components/feature-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/components/feature-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/components/content-suggestions-modal.js Outdated
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro left a comment

Choose a reason for hiding this comment

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

Frontend CR 🚧
What about the nonce?

Comment thread packages/js/src/ai-content-planner/store/content-suggestions.js
Comment thread src/ai/content-planner/user-interface/content-planner-integration.php Outdated
Comment thread packages/js/src/ai-content-planner/components/content-suggestions-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/components/content-suggestions-modal.js Outdated
Comment thread packages/js/src/ai-content-planner/components/feature-modal.js Outdated
@vraja-pro
Copy link
Copy Markdown
Contributor

After adding some changes... AC & CR ✅

@vraja-pro vraja-pro merged commit b6f52ba into feature/content-planner Apr 15, 2026
36 checks passed
@vraja-pro vraja-pro deleted the 1143-content-planner-add-results-of-post-suggestions-api-to-front-end branch April 15, 2026 13:08
@vraja-pro vraja-pro mentioned this pull request Apr 28, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog innovation Innovative issue. Relating to performance, memory or data-flow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants