From c1990b3e6e196ad41379aa432bf3ccca8a65d9f0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 00:36:50 -0300 Subject: Flatten the 9P control tree and move it out of fs.zig The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane//... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 --- test/collapse_layout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/collapse_layout.py') diff --git a/test/collapse_layout.py b/test/collapse_layout.py index e549bd37..244ee57a 100644 --- a/test/collapse_layout.py +++ b/test/collapse_layout.py @@ -29,7 +29,7 @@ def geometry(client, names): def toggle(client, serial): """Execute the default tag's Collapse word without changing any body or tag.""" - pane = f'/self/pane/{serial}' + pane = f'/pane/{serial}' tag = client.read(pane + '/tag') at = tag.rfind(b' Collapse') require(at >= 0, 'default pane tag lacks Collapse') @@ -57,8 +57,8 @@ def run(args): for index, label in enumerate(names): if index: serials.append(new_pane(client, b'')) - pane = f'/self/pane/{serials[index]}' - client.write(pane + '/ctl', ('name ' + label + '\n').encode()) + pane = f'/pane/{serials[index]}' + client.write(pane + '/name', (label + '\n').encode()) client.write(pane + '/body', contents, truncate=True) original = require(wait_for(lambda: geometry(client, names)), 'four pane tags not visible') require(all(height > 1 for _, height in original), f'fixture has no body room: {original}') @@ -82,7 +82,7 @@ def run(args): require(wait_for(lambda: geometry(client, names) == original), f'expansion did not restore original geometry: {geometry(client, names)}') for serial in serials: - require(client.read(f'/self/pane/{serial}/body') == contents, 'Collapse changed pane contents') + require(client.read(f'/pane/{serial}/body') == contents, 'Collapse changed pane contents') require((root / (name + '.txt')).read_bytes() == b'initial\n', 'fixture source file changed') print(f'{"TTY" if args.tty else "SDL"}: 7 local collapse/expand pairs, exact unrelated pane geometry, and content preservation passed') -- cgit v1.3