Never miss a lead alert — the dashboard bell that checks itself
- platform commit 46aa3e7
- /api/admin/notifications feed route
- 30s self-refresh
What you're doing and why
When a lead comes in — a form fill, a call, a site that's ready to sell — your dashboard bell lights up. But a bell that only updates when you click around the dashboard can look "quiet" when it actually just hasn't checked lately. This lesson is about the difference between "no alerts" and "stale alerts", and how the dashboard now tells them apart: the bell re-checks for new notifications by itself every 30 seconds, and if it ever CAN'T check, it shows you a warning instead of pretending everything is fine.
The exact steps
There's nothing for you to do — that's the point. But it's worth knowing what you're looking at:
- The bell re-pulls your notifications every 30 seconds while you're on the dashboard (it pauses when the tab is in the background so it doesn't waste your battery or data, and checks the moment you come back).
- If the check fails — bad wifi, server hiccup — a small amber dot appears on the bell, and when you open it you'll see a "couldn't refresh, retrying" banner. Amber dot = the list might be old. No dot = you're seeing the truth.
- Marking something read is instant; if the save fails you'll get a toast message and the item flips back to unread so you don't lose it.
What it looked like for us
- Before: the bell only refreshed on page navigation. Two unread items sat there looking "stale" — they were genuinely the latest events, but there was no way to tell a quiet day from a dead feed without clicking around.
- After: new test events land in the bell within 30 seconds with zero interaction, and pulling the plug on the feed produces the amber dot + banner instead of silence.
Gotchas
- "Quiet" and "stale" look identical unless you design for the difference. Any dashboard widget that reads server data should either refresh itself or say when it last checked.
- Fail visibly. The old version's errors were swallowed — the bell looked fine while saying nothing. If a background check fails, tell the user, don't stay silent.
- Don't poll what you can't see. Pausing when the tab is hidden keeps the check free; resume on return so the first thing you see is fresh.