Issue #3586345: Add a dedicated editorial workflow for AI Context Items

Description

Testing instructions

  1. mkdir my-drupal-site && cd my-drupal-site
  2. ddev config --project-type=drupal11 --docroot=web
  3. ddev start
  4. ddev composer create-project drupal/cms
  5. ddev composer drupal:recipe-unpack
  6. ddev exec sed -i 's/"minimum-stability": "stable"/"minimum-stability": "dev"/' composer.json
  7. ddev composer require drupal/ai_context:dev-1.0.x -W
  8. ddev composer require drupal/ai_agents_debugger
  9. ddev launch Complete the installer in the browser and select the Byte site template.
  10. ddev drush en ai_context ai_agents_debugger canvas_ai -y
  11. Create Draft, Published, and Unpublished AI Context Items. Create an editor role with the existing basic_editorial Draft, Publish, and Unpublish transition permissions.
  12. cd web/modules/contrib/ai_context
  13. git remote add issue-3586345 git@git.drupal.org:issue/ai_context-3586345.git
  14. git fetch issue-3586345
  15. git checkout -b 3586345-issue-branch --track issue-3586345/3586345-issue-branch
  16. ddev drush updatedb -y
  17. ddev drush cr
  18. Open /admin/config/workflow/workflows/manage/ai_context_editorial. Confirm it contains Draft, Published, and Archived, and is assigned only to AI Context Items.
  19. Open /admin/config/workflow/workflows/manage/basic_editorial. Confirm AI Context Items are no longer assigned and its other configuration is unchanged.
  20. Confirm the old Unpublished item is now Archived; Draft and Published items retain their states. Confirm the editor role has matching ai_context_editorial transition permissions.
  21. Confirm Published items can be archived and Archived items can only be restored to Draft or Published. An editor without either restore permission must not be able to edit an Archived item.
  22. ddev drush pm:uninstall ai_context -y
  23. ddev drush pm:enable ai_context -y
  24. ddev drush cr
  25. Confirm the dedicated workflow is removed on uninstall and recreated on enable, without altering basic_editorial.

Checklist

  • I have updated the MR title to use format: Issue #1234: My issue title.
  • I have updated the MR description to include: Closes #1234
  • I have performed a self-review of my own code
  • I have added or updated tests, or explained in the description why this change is not covered by tests
  • I have updated documentation for any new or changed functionality
  • I have written testing instructions and verified them locally
  • I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
  • This MR contains no breaking API or hook changes, or they are explicitly documented in the description

AI Compliance

Note

Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.

  • AI Assisted Code
    Mainly written by a human; AI used for autocomplete or partial generation under full human supervision.

  • AI Generated Code
    Mainly generated by AI, reviewed and approved by a human before this MR was created.

  • Vibe Coded
    Generated by AI and only functionally reviewed before this MR was created.

Closes #3586345 (closed)

Merge request reports

Loading