Dev.to
7/8/2026

The original title is about a pending-plugin-count badge on a plugins button, reusing dashboard cache instead of doubling state.
Original: A pending-plugin-count badge on the 🔌 button — reusing the dashboard cache instead of doubling state
Short summary
A developer describes implementing a pending-plugin-count badge on a plugins button by reusing an existing localStorage-backed dashboard cache instead of creating a new API endpoint and separate state. Key design decisions include hiding zero and unchecked states to reduce UI noise, capping display at 99+, and converging both cross-site and per-site update paths onto the same cache. The core principle: if existing state answers the question, don't add more state.
- •Reuse existing dashboard cache for badge data instead of adding a new API endpoint and cache
- •Hide zero and unchecked states so badge presence signals attention needed; cap at 99+ for layout consistency
- •Converge both cross-site and per-site write paths onto the same cache to prevent drift and avoid sync code
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



