14 posts
Sessions
The daemon, its clients, and panes on other machines.
4 min readSessions
One ssh login per link, not one a minute
A 1Password user got a prompt to approve their ssh key every few minutes, for a host that tuios said had no daemon. The link logged in, saw no daemon, hung up and tried again, forever. Now it keeps the one ssh connection and asks again over it.
4 min readSessions
Adding a machine in one command
To link a second machine, you had to know four things first, and a failed link said only that the host did not answer. tuios hosts setup now reads the machine over ssh, shows a plan, installs and starts tuios, and names each ssh failure with the one command that fixes it. The app has the same steps as a sheet, and offers them when a pane logs in with ssh.
4 min readSessions
Upgrading the daemon without ending a single pane
The tuios daemon owns every pane's terminal, so moving it to a new build used to end every program in every pane. tuios daemon upgrade execs the new binary in the same process instead, with the terminals still open, and each program keeps running as if nothing happened. How the handoff works, and what it took to make it safe.
8 min readSessions
Plugins that ask before they act
tuios now installs plugins from git with one command and pins them in plugins.lock. A native plugin says which grants it needs, and the daemon holds every process it starts to them. Here is how that works, what it costs, and where the limits are.
6 min readSessions
Restarting the daemon without losing your place
Moving the tuios daemon to a new build used to mean detach, kill-server, start again, and attach every other client by hand. Now tuios restart-server shows what stops, restarts on the newest build, and every client comes back by itself. How the restart picks a binary, survives killing its own pane, and tells a restart from a stop.
9 min readTesting, Sessions
The daemon sent a client an older state after a newer one
A flaky tuios test turned out to be the daemon delivering session state out of order. The first fix ordered by the state Version, and the review found the one kind of change that never moves the Version. The second fix counts every change.
8 min readRendering, Sessions
A reattach lost the state that no cell shows
One CI failure, "scrollback differs on 2 of 396 lines, first at column 37", was a pane snapshot that forgot a wrap was pending. Its review found five more pieces of terminal state a snapshot dropped, and the fix for one of them broke the character sets of a program that had already quit.
5 min readAgents, Sessions
Two reads of one transcript took the daemon down
A tuios daemon on Windows died twice in one afternoon, with every pane in it. The trace ended inside encoding/json. Two goroutines were reading one agent transcript through one buffer, because stopping a timer does not stop a callback that has already started.
4 min readAgents, Sessions
tuios v0.8.0
The first release in six months. tuios now knows what the coding agents in your panes are doing, keeps your sessions in a daemon that brings them back, and runs panes on other machines.
7 min readSessions
TERM=dumb followed the session
A session created by a command with no terminal of its own gave every pane TERM=dumb for its whole life. A screenshot test found it by failing on CI with the same numbers every time.
15 min readSessions
The pane ran on another machine, and ctrl+D waited for the next keypress
tuios daemons now talk to each other over one ssh link per machine. It shipped in stages, and each stage had a bug that taught me something.
17 min readSessions
A PTY has one size, and two clients had two opinions about it
Two clients on one session each laid the panes out around their own chrome and fought over the shared shells. The fix, and the harness that found the rest.
8 min readSessions
A session switch forgot my column widths
Switching sessions and back reset a widened column in the scrolling layout and split stacked panes apart, because the session state saved the strip's offset and not its columns. The same gap had two clients on one session drawing different widths.
13 min readSessions
Session state was saved every 30 seconds and never read back
tuios wrote every session to disk from April and no daemon ever loaded it. Wiring up the read side, and then making reattached panes redraw correctly.