We have a temporary programme that invites signed-in users to take a set of free tests on a sister product. It needed a prompt. The first version was the usual one: a card at the foot of the dashboard, a close button, and once you closed it, never again.
That is the wrong behaviour for a programme with a short life and a goal of getting people to take part. A closed card should be a "not now". So the next commit turned it into a slim banner near the top and changed the dismissal to "hide for a week, then return". Opening the tests still hides the prompts for good.
The interesting part is how little it needed, and one rule in the middle that is easy to get wrong.
The whole state is two strings
No database column. The feature is explicitly temporary and its README ends with a removal checklist that says nothing was added to the database, so there is nothing to migrate when it goes.…