Stale Approvals in the UI
In this article
- Explain why an approval card on screen goes out of date as soon as the action behind it changes.
- Design the approve handler so the server rejects a click made on an old card.
- Show a reviewer what changed with a side-by-side diff and a new request, never a silent swap.
- Give an expired card a visible state and disabled buttons, and still reject a late click on the server.
- Terms defined here: stale approval.
Overview
A made-up online shop runs a support agent that refunds 250.00 EUR on order O-2042 for customer c-77: it looks up the order, issues the refund once a manager approves it, and then emails the customer. The manager now sees the approval card for that refund, with an Approve button.
What if the action behind the card changes while the card is still on screen, or the manager comes back to it an hour later? The button looks the same either way. You will see why a card on screen is only a copy, how the server turns an old click away, what the reviewer should see when the proposal changes, and how an expired card behaves.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- A card is a copy of one proposal
- What the click carries
- Showing what changed
- When time runs out
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions