Skip to content

Initialize the backend work needed for the tasklist.#22691

Merged
vraja-pro merged 17 commits intofeature/task-listfrom
tasklist/task-endpoint
Nov 7, 2025
Merged

Initialize the backend work needed for the tasklist.#22691
vraja-pro merged 17 commits intofeature/task-listfrom
tasklist/task-endpoint

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Nov 4, 2025

Context

  • Creates three of the tasks of the tasklist, the FTC one, the llms.txt one and the Hello World one
    • This means that we have created the endpoints to detect if they are completed and the endpoint to complete them
    • It also means that we have created the script data for the configuration of those tasks (priority, duration, CTA links, etc.)

Summary

This PR can be summarized in the following changelog entry:

  • Initializes the backend work needed for the tasklist.

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:

  • Visit the Yoast General page and run wpseoScriptData.taskListConfiguration in the console
  • Confirm that you get a enabled: false attribute
    • If you go to edit the wpseo DB entry in the options and turn the 0 of the enable_task_list subsetting to 1, then the enabled will turn true.
  • Confirm that you get a tasksConfiguration attribute with three elements, complete-ftc, delete-hello-world and enable-llms-txt
    • Each of those elements have the following properties:
      • id
      • duration
      • priority
      • link: only for the FTC one it's populated and it points to the FTC) - because for those 3 tasks, the FTC one is the only that the CTA is pointing to a different page
      • is_completeable: only for the llms.txt one and the hello world one - because for those 2 tasks only, the CTA completes the task by doing a REST request
  • For each of those 3 IDs, make the following GET requests: http://example.com/wp-json/yoast/v1/detect_task?options[task]=<TASK_ID>, where <TASK_ID> is the id you get from the script data
    • It will return a "isCompleted": true when the task is incomplete or false when the task is complete
    • The logic for tasks to be completed is:
      • For the FTC one, if all the steps in the FTC are completed
      • For the llms.txt one, if the relevant setting is enabled
      • For the Hello World one, if the post with the ID 1 has the same creation date and modified date (so basically, when it has never been modified)
    • Do a http://example.com/wp-json/yoast/v1/detect_task?options[task]=<NOT_A_TASK_ID>, where <NOT_A_TASK_ID> is a random string that's not an id taken from the script data
      • Confirm you get a 404 with "error": "Task not found"
  • For each of the 2 IDs of the tasks that had a is_completeable property in the script data, do the following POST request, http://example.com/wp-json/yoast/v1/complete_task?options[task]=<TASK_ID>, where <TASK_ID> is the id you get from the script data.
    • It will return "success": true, if you have a valid task ID and it will complete the task you added as a parameter
    • The logic for the tasks to be completed is:
      • For the llms.txt one, the relevant setting got enabled
      • For the Hellow World one, the post with the ID 1 has been deleted
    • Do a http://example.com/wp-json/yoast/v1/complete_task?options[task]=<NOT_A_TASK_ID>, where <NOT_A_TASK_ID> is a random string that's not an id taken from the script data
      • Confirm you get a 404 with "error": "Task not found"

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.
  • No need to test this task as later tasks will override it.

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.

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 changed the title Tasks backend Initialize the backend work needed for the tasklist. Nov 4, 2025
@leonidasmi leonidasmi added 14.0 release Issues that are confirmed descendants of the public 14.0 release. and removed 14.0 release Issues that are confirmed descendants of the public 14.0 release. labels Nov 4, 2025
@leonidasmi leonidasmi self-assigned this Nov 4, 2025
@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Nov 4, 2025
@leonidasmi leonidasmi marked this pull request as ready for review November 7, 2025 09:34
@leonidasmi leonidasmi removed their assignment Nov 7, 2025
@vraja-pro vraja-pro self-assigned this Nov 7, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Nov 7, 2025

Pull Request Test Coverage Report for Build 7704002dce66ee49e19b195a4080a1c0ebb135a5

Details

  • 7 of 184 (3.8%) changed or added relevant lines in 13 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 49.286%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/task-list/domain/task-not-found-exception.php 0 2 0.0%
src/task-list/domain/abstract-completeable-task.php 0 4 0.0%
src/task-list/application/tasks/complete-ftc.php 0 6 0.0%
src/task-list/application/tasks/enable-llms-txt.php 0 8 0.0%
src/task-list/application/tasks/delete-hello-world.php 0 11 0.0%
src/task-list/domain/abstract-task.php 0 13 0.0%
src/task-list/application/tasks-collector.php 0 14 0.0%
src/task-list/application/configuration/task-list-configuration.php 0 15 0.0%
src/task-list/user-interface/completion/complete-task-route.php 0 52 0.0%
src/task-list/user-interface/detection/detect-task-route.php 0 52 0.0%
Totals Coverage Status
Change from base Build 91790256a176d65c2a426792e46f95937e7fa34c: -0.2%
Covered Lines: 17497
Relevant Lines: 35501

💛 - Coveralls

@vraja-pro vraja-pro self-requested a review November 7, 2025 10:53
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 added this to the feature/task-list milestone Nov 7, 2025
@vraja-pro vraja-pro merged commit 4be91f6 into feature/task-list Nov 7, 2025
25 checks passed
@vraja-pro vraja-pro deleted the tasklist/task-endpoint branch November 7, 2025 11:53
@leonidasmi leonidasmi mentioned this pull request Nov 27, 2025
18 tasks
@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