#3591883 Canvas AI: Send resolved prop values with current_layout, on both request paths
Summary
Merges current_layout and layout in the dev chat's request to /admin/api/canvas/ai-dev. Each component in current_layout now carries its own resolved prop values, and layout is no longer sent. nodePath is dropped from each component: nothing read it, and producing it cost a tree walk per component. nodePathPrefix on each region is kept, since CanvasAiPageBuilderHelper::getRegionIndex() still reads it for the available_regions prompt token.
Only AiWizardDev.tsx changes. No back end change: CanvasDevAiBuilder already defaults a missing layout to NULL, and the [canvas_ai:layout] prompt token is read only by the title-generation and metadata-generation agents on the production /ai route, which this issue does not touch.
Sending the same context fields on both the JSON and multipart request branches, and building the layout from the Redux store at request time rather than a stale ref, were already resolved by #3591884 (closed) and required no further change here.
Testing instructions (manual, on a site with canvas_dev_ai installed)
-
Send any message from the dev chat and inspect the request body in the browser's network panel: every component in
current_layouthas its prop values, and there is nolayoutparameter and nonodePath. -
Add a component to the page, then change an existing component's prop values. Without reloading, send another message:
current_layoutincludes the new component and the changed values. -
Send a message with a file attached: the multipart body carries
current_layoutwith prop values, plusactive_component_uuid,page_titleandpage_description.
AI Disclosure:
Implemented with AI assistance (Claude Code). All generated code was reviewed, and the testing steps above were run manually against a local DDEV environment before submitting.
Closes #3591883 (closed)