[3586394] Add status report warnings when built UI assets are missing.
Description
When using the AI module, you need to build the assets, otherwise MDXEditor, JSON field and AI CKEditor will not be functional. Having a warning appear when the assets are not there to inform the user how to build the assets will help guide the process, and catch early errors.
Testing instructions
- Make sure the built asset directories are absent (this is the default on a dev branch):
ls web/modules/contrib/ai/ui/mdxeditor/dist 2>/dev/null
ls web/modules/contrib/ai/ui/json-schema-editor/dist 2>/dev/null
ls web/modules/contrib/ai/modules/ai_ckeditor/js/build 2>/dev/nullAll three should not exist (or be empty).
- Clear cache, then load the status report:
drush cr
- Visit /admin/reports/status in the browser, or run:
drush status-report
Expect three warnings:
AI MDXEditor assets — "Built assets are missing." with instructions to run npm install / npm run build in ui/mdxeditor. AI JSON Schema Editor assets — same pattern, pointing at ui/json-schema-editor. AI CKEditor assets — same pattern, pointing at modules/ai_ckeditor (only shown if ai_ckeditor is enabled).
- QA: Warning clears when assets are built. Build one of them (pick any to spot-check)
5. cd web/modules/contrib/ai/ui/mdxeditor && npm install && npm run build
-
Rebuild cache and reload the status report
-
Do the same for rest of the reports.
Checklist
- I have linked the related issue in the MR title or description
- 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 #3586394
