One Dot Per Work Item: How I Turned a Readable Number Into an Unbounded List
The home page of our app has a section that summarizes the work scheduler: one line per project, showing what’s waiting, running, held or failed. An operator recently asked whether that section was another case of something that grows without bound. It was, and I wrote it.
When we checked production, the section was drawing 753 dots, with over 400 on a single project’s line. The response behind it was about 1 MB, and every open home page fetched it every five seconds. That works out to roughly 720 MB an hour per browser window, spent redrawing dots that change a few times an hour.
This post covers what I did, why it was wrong, and what I’m changing.
What I built
The section started out as a line of figures in text for each project: so many waiting, so many running, the longest wait, and so on. The rest of the home page is read as charts, marks and dots, so this text-heavy section stood out. I redesigned it to be visual.
My design said each project’s line would draw one dot per work item. Failed and held items came first, then the others in scheduling order, each dot colored by its state. Every dot had an accessible name and a tooltip naming the item.
The design set no cap. It didn’t say how many dots a line could hold, what to show once a line had too many, or how tall a line could get.
Each layer went along with that:
- The API returned every work item for every project, with full detail. That included the item’s subject, priority, timestamps and state payload. For a failed task, the payload is the session’s entire report, a full markdown document. The dot used three short fields of this. The client threw the rest away.
- The client mapped every item to a dot with no slicing.
- The styles let the dots wrap with no row limit, so a line was as tall as its item count required.
- The tests seeded a handful of items and checked order, colors and labels. None of them used a realistic count, and none checked a bound.
Why the count was always going to be large
I never asked what a “work item” actually is. In our scheduler it’s every open issue, every bug report, every queued or running task, and every task that failed in the last seven days. None of those is bounded, and failures stay on the list for a week.
So when one failure mode hits twenty tasks in an afternoon, it adds a row of red dots that stays for a week. The information was available: the project’s own scheduler page showed hundreds of items on the day I designed this.
The moment I missed it
While building the redesign, I tested against a stub backend with a few items. The dot column collapsed at narrow widths, so I made the dots wrap. That fixed the width problem and created a height problem.
In the same change, I capped the warning and error pips on each line at eight per severity, with a “+N” for the rest, “so a busy project’s line stays one row.” So I asked the right question, but only about the pips. I never asked what a busy project’s dots would do to the same line.
A follow-up redesign then removed the pips and replaced them with count badges. It kept the dots exactly as they were and gave them the whole right side of the line. That meant the one bounded drawing on the line was gone, and the unbounded one had more room. Neither change was ever looked at in a running app against a real, busy backend. Both changes said so in their notes.
Why this hurts
- It no longer worked at a glance. The point of dots was a quick visual reading. A few dozen marks can be read that way. 464 grey and red rings can’t, and they told the operator less than the numbers they replaced.
- It ran over the layout. The busiest lines were eight or nine rows tall. The section has a fixed height, so it scrolled inside itself, and the operator had to scroll to see the smaller projects. A scrollbar is meant as a safety valve, and here it was the only limit.
- The browser did needless work. It re-rendered hundreds of labeled, hoverable elements every five seconds.
- Bandwidth and server cost grew with the backlog. The server built a full reading of every project on every poll, and the payload grew with the total number of work items across the fleet.
This wasn’t new
This is the part that bothers me most. We already had a written rule that every list is paginated on the server, based on several earlier incidents with this same pattern. In those, a route returned a whole collection and a client polled it every few seconds, at 6 MB and 8 MB per request. That rule says a design sentence like “every X” with no page size is the defect before anyone reads the code. It also lists “per-object detail inside a list entry” as a warning sign. This incident fits both.
I had helped fix one of those earlier routes the same week. I didn’t connect it, because I thought of the rule as applying to tables and pages, not to dots.
There’s a second lesson here. This redesign was itself a fix for an earlier problem, the section being text-heavy. The fix met that guideline and broke another. I replaced a readable number with one mark per counted thing, when the bounded option (a split bar of state counts) was right there, and the API already returned the counts it needed.
What I should have done
In the design: set a bound and say what happens past it. For example:
A line draws at most N dots, failed and held first. Past N, it ends with a count of the items not drawn (“+312”), colored by the most severe state among them. A line never wraps past M rows. The line’s accessible name always states the full count for each state.
Choosing N is a product decision, but the design has to include one. If no reasonable N exists, the line should draw a split bar of state counts and save individual dots for the failed and held items, which are the ones the operator needs to see.
In the API: return only what the home page draws: state counts, longest wait, and at most N short entries (subject and state), or no per-item list if the design uses counts. Failure reports, session details and hold reasons belong on the project’s own scheduler page, which already has its own route for them. That keeps the response to a few hundred bytes per project no matter how big the backlog gets.
In the implementation: when a design says “one per X” with no bound, ask for a bound instead of making things wrap. Test against a real backend, or at least a fixture at production scale, before calling the work done.
In the tests: add a unit test that seeds a line with hundreds of items and checks the cap and the “+N” marker, and a browser test that a line’s height stays within its limit.
What I’m changing going forward
- A per-item glyph is a list. “One dot per X”, “one mark per X” and “one pip per X” mean the same as “every X, newest first”, and they need the same bound. I’ll review designs with that in mind.
- Name the producer and its rate before choosing a representation. Before writing “one per item”, I’ll write down how items are created, how long they last, and roughly how many a busy project has after a month.
- Ask the cap question about every collection on the screen. If I cap one element on a line “so it stays one row”, I’ll ask the same question about everything else on that line.
- Check a fix against every guideline, not just the one it addresses. Here, fixing one guideline broke another.
- Look at the real thing. No UI change that shows live operational data ships until I’ve seen it against a real, busy backend.
- Question the poll. A five-second poll multiplied by every open window is a cost to justify. Replacing it with a stream is separate work, but bounding the payload comes first.
The fix itself is small: a cap, an overflow count and a slimmer response. The bigger fix is in how I read my own designs. Any sentence that says “one per” or “every” without a number gets the same scrutiny as an unbounded list, because that’s what it is.