Issue #3586345: Add a dedicated editorial workflow for AI Context Items
Description
Testing instructions
- mkdir my-drupal-site && cd my-drupal-site
- ddev config --project-type=drupal11 --docroot=web
- ddev start
- ddev composer create-project drupal/cms
- ddev composer drupal:recipe-unpack
- ddev exec sed -i 's/"minimum-stability": "stable"/"minimum-stability": "dev"/' composer.json
- ddev composer require drupal/ai_context:dev-1.0.x -W
- ddev composer require drupal/ai_agents_debugger
- ddev launch Complete the installer in the browser and select the Byte site template.
- ddev drush en ai_context ai_agents_debugger canvas_ai -y
- Create Draft, Published, and Unpublished AI Context Items. Create an editor role with the existing basic_editorial Draft, Publish, and Unpublish transition permissions.
- cd web/modules/contrib/ai_context
- git remote add issue-3586345 git@git.drupal.org:issue/ai_context-3586345.git
- git fetch issue-3586345
- git checkout -b 3586345-issue-branch --track issue-3586345/3586345-issue-branch
- ddev drush updatedb -y
- ddev drush cr
- Open /admin/config/workflow/workflows/manage/ai_context_editorial. Confirm it contains Draft, Published, and Archived, and is assigned only to AI Context Items.
- Open /admin/config/workflow/workflows/manage/basic_editorial. Confirm AI Context Items are no longer assigned and its other configuration is unchanged.
- 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.
- 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.
- ddev drush pm:uninstall ai_context -y
- ddev drush pm:enable ai_context -y
- ddev drush cr
- 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)