A confirmation the server can send on its own
20-06-2026
DOM/toasts and DOM/dialog give a route two more things it can say. Load them and apply() gains toast: and alert:.
route async POST save {
$this->store()
return apply(toast: 'Saved.', inner: ['#list' => $this->list])
}
The value is in what is not there. No client-side notification library, no state to hold, no event to publish and subscribe to. The route that did the work is the thing that knows it succeeded, and it says so in the same response that updates the page.
That matters most for the cases where a toast is the only feedback. A background job that finishes, a websocket cast that arrives from another user's action, a validation that passed quietly. In each of those the alternative is a piece of client code whose entire job is to turn a flag into a message, and every one of them is a place where the flag and the message can disagree.
alert: is the blocking sibling for the moments that deserve interruption, rendered as a real dialog rather than the browser's own, so it looks like the rest of the application and does not freeze the page behind it.
Both are deliberately small. Anything more elaborate is layout, and layout belongs in a view where you can see it.