Back to the pile

Dashboard that freezes in production

Every metric ticks along with the dev server. Run the production build and time stops.

nextChewy~25 min
1

Fresh from the oven

Clone it down and have a look around.

$git clone https://github.com/loaf-crumbs/dashboard-frozen-in-production.git
2

The scenario

An internal ops dashboard shows three live numbers for the on-call team: signups today, active users right now, and revenue today. The page polls a single endpoint, `/api/metrics`, every couple of seconds and repaints the cards. There's a "synced HH:MM:SS" stamp in the corner so you can see at a glance that the data is fresh. Run it locally with `npm run dev` and it behaves exactly as designed — the numbers drift, the sync time advances, the manual Refresh button pulls new values. Ship it, though, and the dashboard is a photograph. On the deployed build the cards never move, the sync stamp is stuck on whatever time it first rendered, and Refresh does nothing. Wait a minute, wait ten, hard-reload the tab — same frozen snapshot. The browser isn't the problem: `curl` the deployed `/api/metrics` twice, several seconds apart, and you get byte-for-byte identical JSON, even though the function behind it computes a brand-new value (including a fresh timestamp) on every call. To reproduce it the way users see it, build and start the production server rather than the dev server. Something between "compute the metrics" and "answer the request" is only happening once.
3

What done looks like

- In the production build, the dashboard numbers and the sync time change over time - Hitting `/api/metrics` twice returns different, current data on each request - Clicking Refresh pulls a newer snapshot, no redeploy required - The dev experience still works exactly as before
4

Stuck?

Peek if you need to — they get more specific as you go.

5

Taste test

Send it in when you’re ready. We’ll see if it’s tasty.

When you've got the flag, paste it here.

No attempts yet.