Skip to content

Improve details of backend#22746

Merged
vraja-pro merged 5 commits intofeature/task-listfrom
846-backend-complete-todos
Nov 27, 2025
Merged

Improve details of backend#22746
vraja-pro merged 5 commits intofeature/task-listfrom
846-backend-complete-todos

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Nov 24, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Registers tasklist endpoints and hooks only when feature is enabled.
  • Adds How to copy in the FTC task.
  • Safeguards the wpseo_task_list_tasks filter against invalid types.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Test the addition of conditionals

  • Turn the feature off
  • Do a POST request: http://dev.local/wp-json/yoast/v1/complete_task?options[task]=enable-llms-txt
  • Confirm that you get a 404
  • Do a GET request: http://dev.local/wp-json/yoast/v1/get_tasks
  • Confirm you get a 404
  • Turn the feature on, do the requests again and confirm you get 200 result codes.

Test the addition of How-to copy in the FTC task

  • Open the Complete the First-time configuration task
  • Confirm that you see the How to solve being:

Go through the first-time configuration to apply the optimal Yoast SEO settings. After you’re finished, refresh this page.

Test safeguarding the wpseo_task_list_tasks filter

  • Add the following snippet that tried to add an invalid task in the list:
add_filter( 'wpseo_task_list_tasks', 'custom_task_list_tasks', 10, 3 );

function custom_task_list_tasks( $tasks ) {
    return array_merge( $tasks, [ 'new-task' => [ 'new-task' ] ] );
}
  • Do a GET request to http://dev.local/wp-json/yoast/v1/get_tasks
  • Confirm you get a 400 response with the Added invalid task error message
  • Remove the snippet and have Premium enabled
  • Do the GET request again and confirm that you get all the tasks that you expected to get.

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.

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.

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 ran 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 #

@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Nov 24, 2025
@leonidasmi leonidasmi added this to the feature/task-list milestone Nov 24, 2025
@leonidasmi leonidasmi changed the base branch from trunk to feature/task-list November 24, 2025 13:18
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2102f9dcbd3a6bb3c83055f66fb51bf7f5f5dd99

Details

  • 0 of 16 (0.0%) changed or added relevant lines in 5 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 49.006%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/task-list/application/tasks/complete-ftc.php 0 2 0.0%
src/task-list/user-interface/tasks/complete-task-route.php 0 3 0.0%
src/task-list/user-interface/tasks/get-tasks-route.php 0 3 0.0%
src/conditionals/task-list-enabled-conditional.php 0 4 0.0%
src/task-list/infrastructure/register-post-type-tasks-integration.php 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/task-list/application/tasks/complete-ftc.php 1 0.0%
Totals Coverage Status
Change from base Build 7561f46cff3e6b924be9a525ca603c82678cf226: -0.02%
Covered Lines: 17518
Relevant Lines: 35747

💛 - Coveralls

@leonidasmi leonidasmi mentioned this pull request Nov 27, 2025
18 tasks
@leonidasmi leonidasmi marked this pull request as ready for review November 27, 2025 10:44
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.

CR & AC ✅

@vraja-pro vraja-pro merged commit a31c583 into feature/task-list Nov 27, 2025
33 of 38 checks passed
@vraja-pro vraja-pro deleted the 846-backend-complete-todos branch November 27, 2025 14:10
@leonidasmi leonidasmi modified the milestones: feature/task-list, 26.6 Dec 1, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants