UX pattern demo

Optimistic Update vs. Immediate Intent

Both respond as soon as you tap, but an optimistic update shows the expected result and lies to you as long as that result isn't actually persisted. Immediate intent however shows what’s actually happening now and doesn't lie.

Optimistic update Bad

The UI assumes the operation will succeed and shows the result before it’s saved.

Immediate intent Good

The UI never assumes, it always tells you what's actually going on.

Immediate intent can save lives!#

Picture a medication tracker. You take your morning pill 💊, tap Track Pill and close the app. That evening, you open it again, and... didn't I install this app to help me remember?!

Unlike optimistic updates, immediate intent doesn't give you a false sense of safety.

Real cases
  • Orders that silently went nowhere. The VA’s new health record system failed to deliver over 11,000 clinical orders and never told the clinicians who sent them. 149 patients were harmed, including a veteran at risk of suicide whose psychiatric follow-up was lost. VA OIG, 2022
  • A pump that forgot the last dose. After certain errors, the MiniMed 670G insulin pump showed 0.0 units of active insulin right after a large dose. A user who dosed again risked severe hypoglycemia. FDA recall, 2021
  • Insulin skipped without a word. A bug in the Tandem Mobi Android app could drop part of an insulin dose without a distinct alert. FDA recall, 2026

Optimistic updates save waste time.#

Once an app has lied to you, you stop trusting it. So you double-check everything yourself.

Okay, okay... these numbers are not empirically measured, yet I bet you will agree that software you can trust saves you time.

What research says
  • One visible error is enough. People avoid an algorithm after seeing it make a mistake, even when it outperforms humans. Dietvorst et al., 2015
  • Seeing failures makes people verify. Operators who saw an automated aid fail checked its advice more carefully afterwards. Bahner et al., 2008
  • Checking breeds doubt. The more people re-checked, the less they trusted their own memory, even though it stayed just as accurate. van den Hout & Kindt, 2003

Don’t pretend to be fast. Be fast.#

Under about 100 ms, a response feels instant, so you can even skip the pending state when the response arrives that fast. Get there for real, with a faster backend and servers close to your users.

Optimistic updates hide latency. Fast infrastructure removes it.

Make it fast
Move it closer

We don't have to block interaction.#

There's no need to freeze the board to remain honest, just show the intent on the card and keep the position. If it fails, return the card to its last confirmed position and explain what happened.

Get the details right
Make it smooth

Agree? Spread the word.

Share this page with your team and give it a star on GitHub. Let’s build reliable software people can trust.

Know a good, harmless use case for optimistic updates?
Let's discuss it, I'm curious!

P.S. even a "like", is not harmless.

Receiving side

  • Getting fewer likes than peers causes distress, especially in teens who’ve been bullied. Lee et al., 2020
  • Many people care more about who liked their post than how many did. Scissors et al., 2016
  • When a Twitter bug dropped like counts, users assumed their tweets were bad. TechCrunch, 2019

Sending side

  • People see a like as social support, so a lost like is support your friend never got. Wohn et al., 2016
  • A like says as much about the relationship as about the post, so a missing one says something too. Hayes et al., 2016