Loading
feat: #3631526 Move the video generator to an experimental, optional submodule
Issue: #3631526 "Initialize the AI Media module"
Chunk 11 of the UX and integration plan (20 October 2026): video, phase 1 (plan section 5), as decided by the maintainer: video moves to a submodule, off by default and experimental, until the AI module supports a motion prompt (#3586540).
Depends on !17 (closed) (3631526-generate-action), which depends on !16 (closed) to !8 (closed) and !6 (merged). Until those merge, this diff includes them; the change of this MR is its last commit.
What changed
- New submodule AI Media Video (
modules/ai_media_video),lifecycle: experimentalwithlifecycle_linkto #3586540, off by default. The Video generator plugin and the "Video generated with AI" media source (and its schema) move there; the main module no longer offers video. - The generator attribute gains two optional properties:
experimental(the Generators tab shows "Video (experimental)") andcost_note(the line under Generate in place of the paid request one). Video uses both: "Video generation is slow and usually costs much more than an image." - "Not set up" for administrators now names only the operations that have no provider, and when no installed provider offers one, says so: "Video generation is not set up. No installed provider offers image_to_video. See Providers in the AI Media documentation for providers that do." Editors still read the plain sentence and get no tab.
- Providers tab: an operation row shows only when a generator on the site uses it (image to video only with the submodule), and says when no installed provider offers it. A stored choice for a row that is not shown is kept on save.
- Docs: the README and index tables mark Video as the experimental submodule;
providers.mdhas a Video section with the provider facts from the plan (none of the AI module family offers image to video; Grok does, untested). - The video keys stay in
ai_media.settings(generators.video,editor_options.video, the example), so the defaults apply when the submodule is turned on; they are ignored without it. No update hook. - Phase 2 (frame then motion, long jobs) is not started: it needs a prompt on
ImageToVideoInput, an async contract in the AI module and a provider.
How it was tested
- Kernel
VideoGeneratorTest(submodule): no video generator without the module, experimental with it; the admin message namesimage_to_videoand nottext_to_image; the video cost line. The consumer type test now expects no video consumer without the submodule. All 31 Kernel tests pass. - Plain Drupal 11.4 (
aimplan1) with the submodule and an AI video media type: the administrator sees the new message on/media/add/ai_video, the editor the plain sentence; Generators shows "Video (experimental)"; Providers shows the image to video row with the note. - axe-core 4.10.2: 0 violations on the video "not set up" page, the Generators tab and the Providers tab, in Claro, Gin and Default Admin at 1440 and 1920.
- Varbase E2E free lane on a fresh CI-like site without the submodule: see the pipeline.
- phpcs (Drupal, DrupalPractice), phpstan level 1, cspell, eslint, stylelint: clean.
Not tested
- A real image-to-video provider (none in the AI module family; Grok not installed, no key).
- The video cost line in the browser (it shows only once video is set up, which needs such a provider; covered by the Kernel test).
- Mobile widths (out of scope).
AI-Generated: Yes. Written with Claude Code (Claude Opus 5.5) under the Drupal AI policy; tested by the author before submission.
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release