Refreshes editor layout model after server changes

Refreshes the editor's in-memory layout model to ensure server-side mutations are immediately reflected. Previously, changes made during hook_entity_presave or hook_canvas_page_presave (e.g., during the Publish flow), which invalidate the layout, would not surface in the editor without a full page reload.

This change modifies the page data query endpoints to extract the latest layout and model from the API response and dispatches an update to the in-memory layout model. This ensures the editor's view remains synchronized with the server's state, improving the user experience by eliminating the need for manual refreshes.

Testing instructions

  • Set up a scenario where a server-side hook (e.g., hook_entity_presave or hook_canvas_page_presave) modifies the layout or model of an entity.
  • In the editor, make a change that would trigger a server-side action (e.g., publish pending changes).
  • Verify that the editor's canvas immediately updates to reflect the server-side changes without requiring a manual page reload.

Fixes #3591346

Merge request reports

Loading