The Corners Were All That Showed
Written later and filed to this date, as part of filling in every day of the year.
The second commit opens like this:
The real “sharp corners” bug: the button’s transparent hit-zone Rectangle was turned OPAQUE by the setFillStyle shim, which passed alpha=undefined
and adds that the game engine defaults that to 1.
Read “real” first. An hour earlier the same file had taken a fix for the same complaint, and that fix was not wrong. The pause menu’s buttons are pills: a rounded accent border with a rounded body drawn inside it. The body used the border’s corner radius, so its arcs sat outside the border’s curve, and two highlight stripes ran too close to the ends. The first commit made the arcs concentric and pulled the stripes in. Careful geometry, correctly explained, aimed at the corners because the bug was called sharp corners.
Then the clause that matters: turned OPAQUE by the setFillStyle shim. The shim had arrived the night before, in a commit whose whole message is “polish”. Each button already had an invisible rectangle for catching clicks, and the old hover code coloured buttons by calling a method on that rectangle. Rather than rewrite every caller, the polish wrapped the method, under a comment that says the calls now “repaint the pill graphics layer instead of the (transparent) Rectangle” and keep “existing call sites working without surgery”.
The shim did repaint the pill. Then it passed the call through to the rectangle as well, forwarding the colour and the alpha it had been given. The callers gave a colour and no alpha. In JavaScript an explicit undefined triggers a parameter’s default, and the default alpha in the game engine is 1. So on every hover the invisible rectangle became a solid one, in the bright hover colour, drawn over the rounded pill. The comment said instead of. The code did both.
Now the part in parentheses, from the body: worst on hover, with the bright hover color. A rectangle laid over a pill of about the same size covers it almost exactly, except at the four corners, where the pill curves away and the rectangle does not. The only visible difference between the bug and the design was the corners. That is why the bug went by the name sharp corners, and why the first fix went looking there.
The heart of the fix is one argument: forward zero instead of the caller’s missing alpha. What the author understood, by the second commit, is that a symptom is named for where it shows, not for where it lives.