a73x

6421ad25

docs: the stripes follow the terminal at the next unzoom, not the signal

a73x   2026-08-20 11:33

Commit message
docs: the stripes follow the terminal at the next unzoom, not the signal

The README told a reader that resizing re-cuts the stripes, full stop. The
wall does not do that and says so in its own header: `core.winch` has one
call site and it is inside the promoted pump, so a wall nobody has zoomed
never sees the signal at all and keeps its old widths until the next unzoom.
A live re-layout would have to stop every tile mid-paint, which is the reason
and now travels with the claim.

The zero-tile shape went unpinned when tilesJson moved. `Hub.json` hand-rolls
its encoder, so the empty wall is precisely the case that can emit nothing at
all, and the page hands whatever it gets to JSON.parse. The shape test walked
one, two and three tiles and never zero; it now removes the last of them and
reads `[]`. Watched fail on a mutant before being believed.

zig build check rc=0, make test rc=0.

README.md
Old New
@@ -242,7 +242,8 @@ you have recorded. Forgetting stays explicit: the page's `×`, the wall's
242 Watching is read-only: each stripe is a live session (label bar + the rows 242 Watching is read-only: each stripe is a live session (label bar + the rows
243 around its cursor), attached the way `muxa` attaches — no size claim, so 243 around its cursor), attached the way `muxa` attaches — no size claim, so
244 watching never resizes anyone. Resize the terminal and the stripes are 244 watching never resizes anyone. Resize the terminal and the stripes are
245 re-cut to it. 245 re-cut the next time you unzoom — a live re-layout would have to stop every
246 tile mid-paint — so a wall you never zoom keeps its old widths.
246 247
247 The keys are the ones listed under "Quick start, local" — `mux wall` and 248 The keys are the ones listed under "Quick start, local" — `mux wall` and
248 `mux` are the same program, entered through different doors, so there is 249 `mux` are the same program, entered through different doors, so there is
src/webhub.zig
Old New
@@ -1194,6 +1194,14 @@ test "hub: ids are stable across remove and reorder; json is wall order" {
1194 try std.testing.expectEqualStrings( 1194 try std.testing.expectEqualStrings(
1195 \\[{"id":2,"label":"--sock /tmp/c","session":""},{"id":0,"label":"--sock /tmp/a","session":""}] 1195 \\[{"id":2,"label":"--sock /tmp/c","session":""},{"id":0,"label":"--sock /tmp/a","session":""}]
1196 , j1); 1196 , j1);
1197
1198 // An empty wall is a shape too, and the only one where a hand-rolled
1199 // encoder can emit nothing at all: the page's JSON.parse gets `[]`.
1200 try hub.removeTile(2);
1201 try hub.removeTile(0);
1202 const j2 = try hub.json(alloc);
1203 defer alloc.free(j2);
1204 try std.testing.expectEqualStrings("[]", j2);
1197 } 1205 }
1198 1206
1199 test "hub: checkout copies the target into the caller's arena; release unregisters" { 1207 test "hub: checkout copies the target into the caller's arena; release unregisters" {