Skip to content

Task list: Also update the status of the currently open task when it's completed#22967

Merged
vraja-pro merged 5 commits intofeature/task-list-phase-2from
1064-task-list-modals-for-llmstxt-and-delete-hello-world-tasks-dont-receive-completed-icon-immediately-after-the-tasks-are-completed
Feb 17, 2026
Merged

Task list: Also update the status of the currently open task when it's completed#22967
vraja-pro merged 5 commits intofeature/task-list-phase-2from
1064-task-list-modals-for-llmstxt-and-delete-hello-world-tasks-dont-receive-completed-icon-immediately-after-the-tasks-are-completed

Conversation

@FAMarfuaty
Copy link
Copy Markdown
Contributor

@FAMarfuaty FAMarfuaty commented Feb 12, 2026

Context

  • The issue was that when a task was completed via the completeTask action, the modal was not immediately updating to show the completed state because:
    • currentOpenTask is a snapshot of the task taken when the modal opens via setCurrentOpenTask action
    • The completeTask action's success reducer was only updating state.tasks[id].isCompleted but not state.currentOpenTask.isCompleted. This meant the TaskModal isCompleted prop remained false until the modal was closed and reopened.
    • As a result, the completed icon is not immediately rendered after the task is completed when the modal is still open
    • and, the Call to action button also remains enabled until the modal is closed

Summary

This PR can be summarized in the following changelog entry:

  • Fixes an unreleased bug where the Completed icon was not immediately rendered when the currently open task was completed.
  • Fixes an unreleased bug where the Call-to-action button was not immediately disabled when the currently open task was completed.
  • [dashboard-frontend 0.1.0 enhancement] Improves currentOpenTask data management in the store.

Relevant technical choices:

  • We now only save the id of the currentOpenTask, and the selectCurrentOpenTask selector is adapted to return a task based on the currentOpenTaskId passed.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Test in a site with Hello World post
  • Go to Task list
  • Go to Remove the Hello World task and open its modal
  • Click on the CTA to delete the post
  • Confirm that the Completed icon is displayed in the Modal title
  • Confirm that the CTA button is disabled
Screenshot 2026-02-12 at 11 07 49
  • Have llms.txt disabled
  • Go to the task list and the relevant task is incomplete
  • Open its modal and click on the CTA to enable the feature and complete the task
  • Confirm that the Completed icon is displayed in the Modal title
  • Confirm that the CTA button is disabled
Screenshot 2026-02-12 at 11 05 06
  • Smoke test the other task modals and confirm that they still work as expected.

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:

  • N/A

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 https://github.com/Yoast/reserved-tasks/issues/1064?reload=1

@FAMarfuaty FAMarfuaty added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Feb 12, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 12, 2026

Pull Request Test Coverage Report for Build f60dd078de0d683075bb344acd75efeffcde7982

Details

  • 5 of 10 (50.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.008%) to 53.616%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/dashboard-frontend/src/store/task-list.js 5 6 83.33%
packages/js/src/general/components/task-list-modal.js 0 2 0.0%
packages/js/src/general/components/task.js 0 2 0.0%
Totals Coverage Status
Change from base Build 55dec9a111eaff1b7fe75cefc941ff84009561d0: 0.008%
Covered Lines: 33407
Relevant Lines: 62471

💛 - Coveralls

@FAMarfuaty FAMarfuaty marked this pull request as ready for review February 12, 2026 10:08
@FAMarfuaty FAMarfuaty added this to the feature/task-list-phase-2 milestone Feb 12, 2026
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.

Actually I think we should save only the current task id and change the selector:

selectCurrentOpenTask: ( state ) => 
   const currentTaskId = get( state, [ TASK_LIST_NAME, "currentOpenTaskId" ], null );
   const tasks = get( state, [ TASK_LIST_NAME, "currentOpenTask" ], null ),
   if ( currentTaskId ) {
           return tasks[ currentTaskId ];
      }
   return null
}

That way we are covered also for the errors in the modal.

…s-seo into 1064-task-list-modals-for-llmstxt-and-delete-hello-world-tasks-dont-receive-completed-icon-immediately-after-the-tasks-are-completed
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 60bbaa4 into feature/task-list-phase-2 Feb 17, 2026
21 checks passed
@vraja-pro vraja-pro deleted the 1064-task-list-modals-for-llmstxt-and-delete-hello-world-tasks-dont-receive-completed-icon-immediately-after-the-tasks-are-completed branch February 17, 2026 15:24
@leonidasmi leonidasmi mentioned this pull request Feb 18, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants