diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-27 17:41:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 542dd489149e33915d19878a277e23b3a9c0b070 (patch) | |
| tree | aeb557581446621c366a2d3cd5888d25b37c5916 /docs | |
| parent | c11ffe24f022d61cdd479e1ee946033c42e9a08c (diff) | |
| download | pardes-542dd489149e33915d19878a277e23b3a9c0b070.tar.gz pardes-542dd489149e33915d19878a277e23b3a9c0b070.zip | |
Record /log whether or not anyone reads it, with the editor's messages in it
/log is now one ring (64 KiB, 4 KiB on the board) that records new, del,
rename and save, and a msg line for everything the editor says. An open
freezes it, so cat log shows what happened lately and ends; writing
follow to that same open makes reads past it wait for newer records, and
a follower the ring outran reads lost N first.
The message log keeps the pane's serial, not its reusable slot.
A test now fails when the tree serves a file /README never mentions; it
caught pty/status, now documented along with typing through pty/data.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -76,7 +76,8 @@ Existing Plan9port/v9fs clients need a userspace bridge for QUIC. /status pid, version and pane count /look write a line: a right click on it at the active pane; read: the serials it touched /exec write a line: a middle click; read the same serials -/log one line per editor event: new|del|rename|save <serial> <name>; reads park +/log recent events, one a line: new|del|rename|save <serial> <name>, msg <serial|-> <text>; + write follow to that open to wait for more /screen rendered screen JSON; frozen per open handle /listeners the session's dial addresses /pane/new open it to make a pane; the read answers that pane's serial @@ -173,8 +174,9 @@ pane. Truncating `tag` clears the part of the tag you may edit. Stats report real lengths for `index`, `status`, `look`, `exec`, `listeners`, `name`, `body`, `tag`, `sel`, `ctl`, the range files and the flag files, and -for `log`, `event` and `pty/data` the length of the record a read would -answer, which is zero when nothing is waiting. Modes are 0644/0666 (0444 for +for `event` and `pty/data` the length of the record a read would +answer, which is zero when nothing is waiting; for `log`, the text an open +would freeze now. Modes are 0644/0666 (0444 for read-only files, 0222 for write-only); mtime is the pane's last edit or the process start. The qid version of `body`, `data` and `xdata` is the pane's revision, so a stat sees an edit land without reading the text; every other @@ -182,8 +184,14 @@ file leaves it zero rather than promise a version it cannot keep. Directory entries carry no sizes, and neither does `/screen`, which has no length until an open renders its frame; stat the entry. -`/log` records `new`, `del`, `rename` and `save` while at least one client -holds it open; a read parks until a record arrives. `/screen` returns JSON with +`/log` is one ring (64 KiB) that records whether or not anyone reads it: +`new`, `del`, `rename` and `save <serial> <name>`, and `msg <serial|-> <text>` +for every line the editor says, builtins announcing themselves included. +Control characters in a record become spaces, so a record is one line. An +open freezes the ring's text the way `/screen` freezes a frame: reads walk it +and end. Writing `follow` to that same open makes reads past it park for the +next record, one per read; a follower the ring outran reads `lost N` first. +Closing the open is the only way back, as with rio's `consctl`. `/screen` returns JSON with `cols`, `rows`, `cursor`, a `styles` table, and row-major `cells` of `[grapheme, style_index]`. Each open freezes one frame until close. A terminal `body` freezes its history on the first read of each open handle; |
