Requests and DOM updates
Interact queues requests per island and applies accepted responses as HTML updates or renderless state updates. These rules are shared by actions, models, forms, polling, and uploads.
Request queue
One request executes at a time per island. Actions queue in order; pending synchronization coalesces. Different islands operate independently. Actions capture current controls, including edits not yet sent by blur or debounce.
$server.pending() includes queued and executing work. busy and island-root aria-busy describe executing work. x-interact:submit protects forms from acceptance through response application, including their queueing time.
Drafts and responses
Accepted state refreshes surviving controls. Newer local drafts, focus, selection, and retained Alpine state survive an older response. The server renders current PHP values; browser drafts can be newer than that markup.
Renderless actions return a fresh signed snapshot, state, and events with html: null. The browser accepts that variant only for successful actions on mounted islands. It reconciles controls and newer drafts without morphing or reinitializing Alpine. Validation responses and synchronization still require rendered HTML.
Use x-interact:ignore when a library manages its own markup, and x-interact:model for modelable values. x-interact:poll skips drafts and feedback instead of refreshing over them.
Nested ownership
Model capture, polling, forms, uploads, and $server resolve to the nearest island. Parent updates preserve matching keyed children and their state. See Nested islands.
Failures and disposal
Request failures use safe structured feedback and pause automatic work. An accepted validation response remains renderable. See Error handling for explicit recovery.
Removing an island releases listeners, timers, observers, and in-flight browser work. Aborting fetch does not cancel PHP execution. Actions are never automatically retried; a failed connection can occur after persistence succeeded.
Runtime integration
The Composer bundle starts Alpine CSP and Morph and exposes window.Alpine. Application registration scripts run before it through alpine:init; see Alpine. An application owning Alpine disables autoScript, installs the npm plugin, and starts its existing instance once. See Installation.
Generated data-interact-* metadata and HTTP envelopes are runtime protocols. Use public directives and the bridge rather than constructing a parallel client.
File transport
Native multipart uploads use XMLHttpRequest for progress; ordinary JSON updates use fetch. Both share the endpoint, CSRF protection, response validation, and rendering. File references remain bound to the session, route scope, island, and field. See File uploads and $server.uploads.