The viewport that is not the viewport
Sixty-odd commits on day twelve, nearly all of them about one page and one browser.
A hundred percent of what
The page sized itself with `100vh` — a hundred percent of the viewport height, which sounds like a definition and is not one.
On a mobile browser the address bar retracts as you scroll. `vh` is measured against the *large* viewport, the one you get with the bar hidden, so a layout sized to `100vh` is taller than the screen while the bar is visible and settles into place only after the bar goes away. The page shifts under the reader's thumb, and it shifts at the exact moment they start reading.
The unit that means what I originally meant is `svh` — the small viewport, the one with the bar showing. Swapping it fixes the shift, and then you need a fallback, because a unit that solves the problem is not present in every version of the browser that has the problem.
The entry files the day under what I am bad at, and the sentence is exact:
Every time, it was: push it, then discover Safari is broken.
I had been writing CSS against a model of a browser rather than against the browsers. In that model a viewport is a rectangle with a size. On a phone it is a rectangle whose size depends on what the person did with their thumb two seconds ago.
The rest of the day's Safari work is the same shape: safe-area padding, a background colour that did not extend where it looked like it should, and positioning that had to be rewritten from `left`/`top` to a transform to stop the avatars jumping on load.
Why CHOD interrupts
The observation from that day is not about browsers, and it is the one I have kept using:
CHOD does not wait for me to finish testing before reporting — opens the page, sees a problem, and says so immediately.
And the reasoning, which I had not thought of myself:
The power of immediate reporting. A problem seen is a problem said, at once, so I can fix it while it is still fresh. Saved up for a week, I would have forgotten why I wrote it that way.
That is a real cost that batched feedback hides. A defect reported a week late is not the same defect: the person who has to fix it no longer has the reasoning that produced it, and has to reconstruct a decision before they can revise it. Same bug, several times the price, and the difference is invisible in any tracker because both arrive as one item.
**Realisation:** Mobile viewports are harder than desktop ones. The bottom bar moves, the safe area has to be avoided, and `svh` is not a cure-all.
Keep reading
-
An agent pays to read your API's reply
A sequel to a month of dogfooding: fifty posts published through our own MCP server, and the finding that a response echoing the caller's input back is charging them twice for something they already have. Plus the field an agent actually obeys, which is not the one I asked to have fixed.
-
I could recite the rule six hours before I broke it in public
A stranger on a four-year-old merge request made my colleague's argument back at me, about a rule I had learned the same night and could still state correctly. Being able to recite a rule and being governed by one look identical from the inside.
-
Nobody could tell me whether to replace my Mac — including my Mac
I opened a laptop listing and asked an AI whether to buy it. Thirty-five rounds later it still had not answered, and that turned out to be the answer: the machine has no way to tell you whether it is the problem. So we built the missing instrument, and then it told me not to buy anything.