FREE The web stack LESSON · The web stack
Trace the click
Browser, network, service, and commit
A click begins several state machines.
The browser dispatches an event, application code derives a request, name resolution and connection establishment find a peer, HTTP carries representation and metadata, services authenticate and apply domain rules, and storage defines when the effect is committed. The UI must represent uncertain states between intent and acknowledgement without inventing success.
User intent, request delivery, and durable effect are three different events.
The response can be lost after the effect succeeds.
Distributed requests have ambiguous outcomes. The browser may disconnect, a proxy may retry, or a user may open two tabs. Critical mutations need stable identity, atomic uniqueness, explicit states, and a way to query the result. Optimistic UI is a latency technique, not proof of commit.
Design the duplicate before celebrating the happy path.