A client asked: "After I run a cross-site update check, can each site show β right in the site list β how many plugin updates are still pending?" Visually the answer was obvious: a small red badge on the top-right of the π plugins button, like an unread-notification count. Easy to specify.
The harder question was where the data comes from. We could have added a fresh API endpoint and a new cache to hold "pending count per site." But doing that would have doubled state management, and we already had a cache that knew this. We routed through the existing one. Here's the reasoning behind that decision.
Reuse the dashboard cache as the data source
The cross-site updates dashboard (the one we wrote about in killing the 24.5-second silence with a cache-first design) already kept each site's pending plugins in a localStorage-backed state called _updatesDashState. Its shape:
_updatesDashState = {






