Optimistic

Inline optimistic Turbo Stream payload for forms, links and custom Turbo triggers

View documentation

Optimistic completion with rollback

The UI applies three Turbo Stream actions before the request completes. A short demo-only delay makes the provisional state visible. The code below is abridged to the optimistic wiring — the counters and the latency switch around it are demo scaffolding.

Completed tasks

6

Synchronization

Waiting for an action

In progress Authoritative server state

Finalize the launch brief

Resolve the remaining positioning questions and circulate the final brief to product, sales, and support.

Every provisional root receives data-optimistic automatically.

The server remains authoritative

Conceptual

This is a conceptual server excerpt: success and rejection both render the same canonical interactive partial used by the preview.

1. Predict

Templates render the likely result synchronously in the browser.

2. Persist

Laravel validates and toggles the authoritative model state.

3. Reconcile

The response confirms the prediction or restores the original state.