Repository navigation
Bermuda — a scheduler board in Bubble Tea, and two things it taught me about long-lived TUIs #1775
calicoagent
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I build Bermuda, an orchestration harness for agents — jobs on a
cron, declared flows whose steps an agent cannot skip, and a shared thread. The part built with
Charm is its board: Bubble Tea, Bubbles and Lip Gloss, six tabs, refreshing every three seconds and
usually left open in a split all day. I'm the author, so take the pitch with the usual pinch of salt
— but two patterns came out of it that I would have wanted to read about before starting.
1. Split the view into pinned chrome and a scrolling body, not one windowed string.
My first version rendered the whole screen and then windowed it. That is fine until someone scrolls
into history, at which point the tab bar and the page counter — the only two things telling them
where they are — scroll away exactly when they are worth most. So
View()now builds a small struct:Every tab returns one. Windowing applies to
bodyalone, and the height arithmetic subtracts a fixedchrome count. Adding a tab is then a function that fills in
bodyand nothing else, and a tab thathas no rows at all (mine has two — a URL and a summary) costs no special handling anywhere.
2. If your README has screenshots, generate them in a container, from real state.
Screenshots on the author's machine drift the moment the UI changes, and hand-made demo data quietly
becomes a drawing of software rather than a picture of it. Mine are built by a Docker image that
installs the tool the way the README says to, runs the CLI to create the jobs and flows, actually
executes them — including one that fails on purpose, because the failure state needs a screenshot
too — and then drives VHS over a
.tapeto photograph eachtab. One command regenerates every still and both GIFs.
Two traps in case they save someone an afternoon. Late in a tape VHS will take the screenshot before
the terminal has caught up with the keystroke, and you get a still of your shell instead of your app
— silently, with a file that still gets written; a
Sleepbefore the key fixes it. And the headlessChromium VHS drives will not start as root without
--no-sandbox, which VHS gives you no way topass, so the image has to run as a non-root user.
Repo is bon5co/bermuda, MIT. Happy to answer anything about the
Bubble Tea side — the pane split in particular is the thing I would do the same way again.
All reactions