# Layout Builder Mutations

Layout Builder routes state changes through mutation Actions under `packages/layout-builder/src/Actions/Mutations` in the `capell-app/layout-builder` package.

Each mutation accepts `LayoutBuilderStateData` and returns `LayoutMutationResultData`. The result contains normalized state, diagnostics, and change summary entries.

The Livewire component should not manually reorder `containers`, `assets`, `originalAssets`, or `selectedRecords` when a mutation Action exists. Add new behavior by creating a mutation Action, testing it directly, then wiring the Livewire method to that Action.

Every mutation must call `NormalizeLayoutBuilderStateAction` before returning.