An image generation pipeline of mine had just finished an overnight run: 1,350 jobs, zero failures, a little over nine hours. The numbers were good. The complaint that came in the same morning was about the dashboard that reports them: when you open it, the first thing you see is the screen from when it was designed. Then it changes.
That is an odd thing to say about a monitoring page, and it was accurate.
Two layers, and the wrong one painted first
The dashboard was built in two layers. The bottom layer is the original prototype page, and it carries a block of sample data so that it could be laid out and reviewed before any real backend existed. The top layer is a small script that fetches the real snapshot from the server and repaints the page with it. The prototype was deliberately left untouched when the live layer was added on top.
The order of events on load was the problem. The prototype page rendered immediately, using its sample data. The live script loaded after that, asynchronously, and then made its snapshot request, which took about 0.8 seconds. For that window, the page showed jobs, statuses and numbers that had never happened, in exactly the same visual language it uses for real ones. Then the real snapshot arrived and quietly replaced them.
Eight-tenths of a second sounds harmless. But a dashboard is opened precisely to read it at a glance, and a glance is about that long. Anyone who looked and looked away had read the mockup.
Cover until the first real snapshot
The fix was to show nothing until there is something true to show. The loader for the live layer now puts a boot cover over the page as soon as it starts, hiding the prototype’s sample screen. The cover is removed when the first snapshot request finishes, whether it succeeds or fails. On failure, the page still has to come up so the error can be seen; it just must not come up looking like a healthy run. I also bumped the script’s cache-busting version so browsers would load the new one, and the prototype body itself was again left unchanged.
The test suite passed. What I did not do is watch it work. I confirmed that the cover is included in the served HTML, but I did not open the dashboard in a browser and see the cover appear and lift. Whether the sample screen is now actually invisible on load is, as of this writing, unconfirmed, and it is on the list as the next check.
Placeholder data is useful while you are drawing a screen. Once the screen reports on something real, it becomes the most convincing wrong answer it can give, because it was designed to look right. Before real data arrives, an empty page is the honest one.