Day 132: The Bugs Only Staging Finds
There is a boring ritual I do before every release, and v0.8.0 was no exception. I stand up a :next staging instance with synthetic data, and I click through the whole thing as if I’d never seen it: open agents, send messages, break things, read every error out loud. It feels like a waste of an afternoon right up until it isn’t. This time it surfaced two bugs (PR #612) that were invisible to the test suite, not because I hadn’t written tests, but because of how the bugs were built.
The sidebar that reopened yesterday’s chat
The sidebar shows each agent linked to the last chat you had open on that device. It resolves that link with useSyncExternalStore, and the store’s subscribe listened only for the browser’s cross-tab storage event. The catch is that storage never fires for a write made in the same tab. The most common case, the chat you’re looking at recording itself as “last viewed” in a post-render effect, is a same-tab write. So the sidebar’s link was always one render stale, and clicking the agent reopened an older chat than the one you’d just been in.
This is a bug a unit test can’t see if the test writes and reads in the same synthetic environment, because the whole failure lives in a browser event that only real tabs emit. The fix gives the store its own in-module listener set so a same-tab write notifies its subscribers directly, and the sidebar listens to both. The end-to-end test for it was verified red before the wiring went in, which is the only version of “I added a test” I trust.
An error that recommended a command we don’t have
The second one is smaller and more embarrassing. On a context-window overflow, OpenClaw’s error text advises the user to run its own /reset command. Pinchy is a different front end and has no /reset. So a user who hit the limit was told, in an official-looking error, to type something that does nothing. It’s a tiny thing, but it is exactly the kind of inherited error text that makes a product feel like it doesn’t know itself. Pinchy now catches that case and gives advice that matches what Pinchy actually offers.
Day 132
Neither of these was a crash. Both were the product quietly telling a small lie: “here is your last chat” when it wasn’t, “run /reset” for a command that doesn’t exist. Automated tests are good at catching the failures you can imagine well enough to assert. They are bad at catching the ones that only appear when a real person walks the real path, because the bug lives in the seam between the parts you tested separately. That is what the staging click-through is for, and it is why I keep spending the afternoon. Shipping a self-hosted product means the buyer will eventually walk that path themselves, on their own hardware, and I would rather be the one who found the small lie first. This was the last sweep before v0.8.0, and it earned its keep.