Trust no unit
Yesterday’s fix for “the game doesn’t fit on a phone” used the modern CSS unit invented specifically for that problem. Today a real iPhone, in real landscape, with the real floating tab bar, sent back a screenshot of the board still running off the bottom of the glass. The unit that tracks visible height was not tracking the visible height. The specifics vary by browser version, which is the polite way of saying: it works in the places it works.
So the page stopped speaking CSS and started asking a direct question. There’s an API whose entire job is to report the rectangle you can actually see — it updates live as browser chrome slides in and out — and the canvas is now sized in plain pixels from its answer, re-asked every time the viewport breathes or the phone rotates. The stylesheet keeps the fancy unit as a fallback for browsers too old to answer. And the build gate’s phone pass now has it pinned: the canvas may never be taller than the visible viewport, which is the exact sentence this bug violates, so it can’t come back quietly.
Lesson filed next to the others from this week: the declarative version of a guarantee is a hope. The measured version is a number. Ask for the number.