Fix Canvas AI prompt reset on metadata changes

Issue

https://www.drupal.org/project/canvas/issues/3558257

Summary

  • Preserve Canvas AI prompt text when metadata changes by stabilizing DeepChat props and restoring the prompt input when it resets.

Testing

  • ddev phpcs (pass; deprecation warning only)
  • ddev exec -d /var/www/html/ui npm run build (pass; warnings about lightningcss_node.wasm, fs externalization, baseline-browser-mapping, chunk size)
  • ddev phpunit web/modules/custom/canvas_3558257/tests/src/Functional/BlockComponentFormTest.php (fail: expected size 0, got 1; known issue 3570699)
  • drupal-intent-testing compare_runs with issue-derived scenario: baseline prompt cleared, modified preserved (artifacts in .intent_artifacts/issue_3558257/)

AI disclosure

Drafted with AI assistance; reviewed and tested by a human.

Merge request reports

Loading