A "star this document" button should feel instant. Someone implements it optimistically: flip the icon immediately, send the request, and revert if it fails. What have they not thought about?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said.

The situation behind the question

A document tool used on office wifi and on trains. The star also appears in a sidebar count, a "starred" filter view, and a recently-starred list on the home page.

What it is really testing

Whether the candidate treats optimistic UI as a distributed-state problem rather than as a UI trick. The three other places the star appears are the point: an optimistic update has to define a scope, and reverting is far harder than applying.

Where the mechanism is taught