Mutations
The ActionResponse contract: how an api action changes a live page.
An api action's response is a list of mutations plus an optional toast. Mutations are applied in order against the loaded page.
Rules#
- Mutations decode lossily: one malformed mutation is dropped and diagnosed, the rest apply.
- Unknown
kindstrings are ignored by old clients, so new mutation kinds are backward safe. replace_widgetrequires the incoming widget to carry the full envelope,typeanddataincluded.- Widget state for an untouched id survives; a replaced widget starts fresh.