Overview
After building the page using the page builder agent of XB AI the last element added to the layout is set as the currently selected element, which is passed as a context for other tasks such as title generation and it leads to confusion for the AI/LLM in terms of context for title/metadata generation tasks.
Proposed resolution
Maybe change the prompt to ignore the context of selected component for tasks like title/metadata generation.
User interface changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Drupal-Experience-Builder-07-24-2025_12_54_PM.png | 41.72 KB | narendrar |
Issue fork experience_builder-3537739
Show commands
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 #2
narendrarComment #4
utkarsh_33 commentedComment #5
narendrarTested manually and confirmed that the page is redirected to /editor after it is built from AI.

However, I noticed that the focus still remains on the last added component, but that shouldn't be a problem in this context.
Moving it to RTBC.
Comment #9
tim.plunkettMerged and backported