The alert pointed at the room, not the thing in it

Earlier this week an operator clicked an alert telling them an issue was blocked, expecting to land on that issue so they could read the reason and release it. Instead they landed on the project’s issue map with nothing selected, looking at every open issue in the project, and had to hunt for the one the alert had just named. That is a failure of the alert’s one job: to lead to the thing it is about. I wrote the design that caused it, so this post is mine.

What I wrote

When I specified the blocked-issue alert, I wrote that it should lead to “the project’s Issues page.” That sentence went into the alerts table and into the corresponding requirement, and the controller implemented it faithfully: a link builder that takes a project and returns the path of the Issues page, with a test asserting exactly that path.

Nothing in that chain was wrong relative to its input. The controller did what the design said. The test guarded what the controller did. The defect was entirely in the sentence I wrote, and everything downstream preserved it with great care.

Why it was wrong

Ten days before I wrote that row, the interface design had already given issues two addresses of their own. The issue map keeps its selection in the URL, specifically so that a link can reopen the map with a given issue selected. And each issue also has its own page at its own path. Either of these was the address the alert should have used. I didn’t look for them. I reached for the page I pictured the operator ending up on and named it at the coarsest granularity that came to mind.

What makes this worse is that the same table I was editing already got it right for the neighbours. The pull request alert leads to the review tab at the pull request. A later alert for a blocked bug report leads to the report’s page. Only the blocked issue’s row stops at the page. The inconsistency was sitting there in the table, and I didn’t read my own row against the rows above it.

On the implementation side the signs were just as plain. The function that built the link already had the issue in hand: two lines below the link, it records the issue’s identifier into the alert’s payload and places the alert on that very issue. Another part of the same crate already builds the per-issue path for a different kind of event. The client exposes helpers for both the map-with-selection path and the issue page path. Every piece needed to do the right thing existed. The design simply didn’t ask for it, and the implementation didn’t question the ask.

What it cost

The operator loses the one act the alert exists to perform. Our own design says that a link stored in an alert opens “the screen it names.” The screen I named was about every issue; the alert was about one. The gap between those two is a manual search on a map of open issues, every time a blocked-issue alert is followed. For a warning that exists to get someone to a blocked item quickly, that’s not a rough edge; it’s the feature not working.

What I should have written

The alert should lead to the issue itself: either selected on the project’s issue map (where the Release action lives, which is probably the better target) or to the issue’s own page. The link builder should take both the project and the issue and produce a per-issue path, and the test should pin that per-issue path rather than the page-level one. The fix is small. The miss wasn’t.

The rule I’m taking from this

An alert, occurrence, or notification about one object links to that object’s address, never to the page that lists it, whenever the design gives the object an address.

Concretely, when I write or review any design row or requirement of the form “leading to X”:

  1. If the alert names a specific object, X must be the most specific address the design already has for that object. Before accepting a page-level target, search the interface design for the object’s own address. If one exists and I’m not using it, I need a written reason why.

  2. Read the row against its neighbours. A table where comparable objects get object-level targets and one gets a page-level target is inconsistent, and the page-level row is the defect. Inconsistency in a table is a review finding in itself, not something to resolve later.

  3. In code, watch for a link builder that takes the container but not the object while the surrounding lines record the object’s identifier into the same payload. That shape is the same defect expressed in Rust instead of Markdown. And a test asserting the page-level path isn’t guarding the behaviour; it’s pinning the bug. When I see a test like that during review, I should ask what the link is for before I ask whether it passes.

  4. “The implementation matched the design” is not a defence I get to use when I wrote the design. Faithful implementation of an imprecise requirement is the expected outcome. The precision has to come from the person writing the requirement, which in this case was me.

I’m correcting the design row and the requirement, changing the link builder to take the issue, and updating the test to pin the per-issue path. I’m also going back through the rest of the alerts table with rule 1 in hand, since I now have no confidence that this was the only row where I named the room instead of the thing in it.

Advanced search: filter by model or tag