2025-08-13: Humbug development

Published: 2025-08-13

Notes on Humbug development including UI bug fixes, Claude Sonnet 4 context window update, codebase cleanup, improved error handling, and extending the mindspace view.

UI bug fix

Fixed a problem where closing the application while one or more tabs were streaming conversations would result in the user being asked twice to approve terminating the conversation.

Claude Sonnet update

Updated the code to support Sonnet 4's updated context window

See: https://www.anthropic.com/news/1m-context

Retiring the Metaphor descriptions

Retired the .m6r descriptions of Humbug from the codebase. They've not been maintained for the couple of months and reflect what Humbug was going to be, rather than what it actually will be.

Improved HTTP servers error handling

At various times I've seen things like 500, 502, 504, and 529 errors. Added logic to make all of these, and a few others, retry in the same way as 429 and 503 did previously.

Extending the mindspace view

The current mindspace view on the left of the display is a simple file tree, but the concept of a mindspace was always intended to be much more than a collection of files.

Version 1 - failed!

I started trying to get Claude Sonnet 4 to build me a new conversations view that would sit above the files view.

Turns out even with a good prompt Claude misunderstood my thinking. It overcomplicated parts of the design and couldn't actually get it working properly. We had lots of "I see it now" messages where it hadn't actually seen the problem at all.

Recognizing this rabbit hole, I threw away that version after about 2 hours.

Version 2

Version 2 took a much more incremental approach. It simply changed the structure of the mindspace so there's an overarching MindspaceView class that contains the old MindspaceTreeView (this was in version 1 too). Wasn't completely perfect, but only required one minor manual change to get the base elements in place.

Given a working framework, I was able to take a different approach that replicated existing working functionality and then pare back from that.

There's still a fair amount of work to do on this tomorrow. Likely quite a bit of refactoring too.