diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 23:04:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 464b3033ac69f6c8256c2216ac385450144740bf (patch) | |
| tree | 76c4d2a6ce17e326e4e991a021d0088cb9094134 /docs/detached.md | |
| parent | 5e72bfc34cc97d12be5185930135b55c2eb001b4 (diff) | |
| download | pardes-464b3033ac69f6c8256c2216ac385450144740bf.tar.gz pardes-464b3033ac69f6c8256c2216ac385450144740bf.zip | |
Building gathers the platforms, options, tests, release gates and how the core, threads, detached sessions and 9P fit, from the old design notes checked against the code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/detached.md')
| -rw-r--r-- | docs/detached.md | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/docs/detached.md b/docs/detached.md deleted file mode 100644 index e010677c..00000000 --- a/docs/detached.md +++ /dev/null @@ -1,49 +0,0 @@ -# Detached sessions - -A detached session owns the editor core, pane shells, files, undo history -and layout. TTY and SDL frontends join and leave without ending it. - -```sh -pardes --detach=work & -pardes --attach=work -pardes-gui --attach=work -``` - -Bare `--detach` names the session after its pid; bare `--attach` needs -exactly one listening session. The detached process runs in the foreground -unless the shell backgrounds it. Inside an editor, `Attach work` (`SPC s a`) -switches this window to that session and `Detach` (`SPC s D`) closes only -this frontend. - -With no frontend attached, `/ctl`'s `size C R` sets the screen (160x50 until -then; [fs.md](fs.md#the-root-ctl)), and messages clear after `MessageLinger` -on the clock, since no key will come to dismiss them. - -## Files and transport - -The frontend socket is `pardes-detached-<name>.sock` under -`$XDG_RUNTIME_DIR`, else `~/.local/state/pardes`, beside the session's 9P -socket `pardes-9p-<name>.sock`. A second session cannot take a live name. -TCP and QUIC listeners, mounts and the control filesystem belong to the -session, not its frontends. - -## Ownership - -One poll loop owns core mutation, frontend connections, PTY I/O and file -watches; LSP and selection-pipe workers post completions through a bounded -mailbox. Restore builds the replacement core before changing the current -one, then sends existing frontends a fresh frame. Frontends provide input -and presentation only: clipboard writes are broadcast; clipboard reads, -browser opens and Detach go to the frontend that asked (else the first -attached). Frontends never spawn shells, write session files or watch files. - -## Wire and tests - -`src/detached/wire.zig` owns the versioned frontend protocol (version 8). -Frames are full grids or changes against each frontend's last frame; a new -attachment gets a full grid. Queues are bounded, so a lagging frontend -cannot hold up the session. - -`zig build unit-test` covers the wire, ownership, real frontend connections -and Restore; `zig build fs-test` drives detached sessions over 9P; the -snapshot suites exercise attach, detach and shared screens. |
