From f3591d48a16086dd4b3b081da00804d2541fefcc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 01:53:25 -0300 Subject: The tree describes itself: README and commands from the tables; ctl takes input live README is made at each open from the tables (pinned per open, as the traces are): a line a file from control.zig's `files`, ctl's verbs indented under ctl (ctl's own, the script's input verbs, the console's, each with its args and doc from its row), and a line per State file under state/, from the layout (its path with for an index, its type, an enum's tags, a row's length), in the shape cloud9's `help` reads: `help ctl` prints the verbs, `help state/tracker` the state/ line and every file under it. `commands` is the verb lines alone, unindented, the sketch's own words (App.commands) last. A ctl read points at both. ctl takes the script's input verbs live: click, move, down, up, wheel, wheel-x, cancel, key, hold, release, type route their events at the wall clock through script.input, the same code a script runs, with no frame of their own: the next frame feeds them to update. Order: ctl's own words, then the input verbs, then a console line (and through it the sketch's); so a sketch command named like an input verb is shadowed over ctl (none is today). Tests: test-control, a new test: ctl's click and hold reach the pending events, a short click is refused (ExpectedPoint), README and commands read the rows and the layout: 40/40 steps, 10/10 tests. Live with the replay fixture: README read over 9P, `down 5 5` written to ctl moved state/pressing. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- src/host/state_files.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/host/state_files.zig') diff --git a/src/host/state_files.zig b/src/host/state_files.zig index 016b9fe..ed796c9 100644 --- a/src/host/state_files.zig +++ b/src/host/state_files.zig @@ -207,7 +207,7 @@ pub fn readme(layout: Layout, w: *std.Io.Writer) std.Io.Writer.Error!void { } const row = std.mem.endsWith(u8, leaf.path, "[]"); try w.print("{s}", .{lw.buffered()}); - try w.splatByteAll(' ', 40 -| lw.buffered().len + 1); + try w.splatByteAll(' ', @max(1, 41 -| lw.buffered().len)); if (row) try w.print("{d} ", .{leaf.dims[leaf.dims.len - 1].count}); switch (leaf.kind) { .int, .uint, .float => try w.print("{s}{d}", .{ switch (leaf.kind) { -- cgit v1.3