Needs work
Project:
Drupal Canvas
Version:
1.x-dev
Component:
AI
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Nov 2025 at 13:22 UTC
Updated:
7 May 2026 at 14:29 UTC
Jump to comment: Most recent
When composing a prompt in Canvas AI, if any page metadata (such as meta description) is modified before submitting the prompt, all previously entered text in the Canvas AI prompt field is erased.
| Comment | File | Size | Author |
|---|---|---|---|
| Canvas AI input disappear.mov | 17.2 MB | vipin.mittal18 |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
scott falconer commentedOverview
While composing a prompt in the Canvas AI sidebar, changing page metadata (for example, meta description) clears the in-progress prompt text.
Steps to reproduce
1) Open a Canvas page with Canvas AI enabled.
2) Enter a meta description.
3) Type a prompt in the Canvas AI prompt field, but do not submit.
4) Change the meta description again.
Expected
The prompt text remains intact after metadata edits.
Actual
The prompt text is cleared after metadata edits.
Proposed resolution
Preserve prompt input across metadata updates by stabilizing DeepChat props and restoring the prompt content if the input is reset.
User interface changes
None.
Tests
ddev phpcs (pass)
ddev phpunit web/modules/custom/canvas_3558257/tests/src/Functional/BlockComponentFormTest.php (fail: expected size 0, got 1; matches issue 3570699)
ddev exec drush ev '\Drupal::currentUser()->setAccount(\Drupal\user\Entity\User::load(1)); $h=\Drupal::service("canvas_ai.page_builder_helper"); print $h->getComponentContextForAi();' (output missing block props use_site_logo/use_site_name/use_site_slogan; likely related to issue 3569120)
Intent testing via compare_runs: baseline prompt cleared, modified prompt preserved (artifacts in .intent_artifacts/issue_3558257/)
AI disclosure
Drafted with AI assistance; reviewed and tested by a human.
Comment #5
mglamanMR conflict needs to be resolved
Comment #6
mglamanRebased, needs review
Comment #7
mglamanI tested and it worked. I approved the MR but I'd like jessebaker to sign off on changes to ui/src/app/hooks.ts at least
Comment #8
wim leersPer #7.
Comment #10
rakhimandhania commentedComment #11
wim leers@jessebaker no longer works at Acquia.
Who should review this?
Comment #12
mglamanMR is conflicted and "The source branch is 216 commits behind the target branch."
I think we can trust an agentic review of the refactor. I was confident with the change but wanted jessebaker as a "yep looks good"
I can poke at this. Probably next week at MidCamp, so someone can steal if sooner if they'd like.