From a6c258bec5808ac2b6ef9d3362134e34e759c1c9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 03:20:39 -0300 Subject: docs: an attach is always a client, and a session registers again with a restarted daemon, in the documents: the manual's "How pardes runs" (docs/typ/running.typ: one Attach section, its figure of the in-place attach deleted from figures.typ, the glance and survival tables, the words), the guide's Sessions, the reference's /sessions and command line, the building chapter's daemon, the cheatsheet's line, `pardes help attach` (runtime/main.zig, docs/typ/command-line.txt from builtins-json), the Detach word's doc (core/builtins.zig, both builtins JSONs), docs/next-run.md as built (what went, counted on the change: 305 lines deleted, 94 added; the re-registration as built; --detach forking still not) with its figure (Before / Now), and the changelog's Unreleased; the book and the cheatsheet render (typst), tui shell-test 1046/1049 (3 skipped), core-test 855/1005 (150 skipped: the base's 856/1006 less the deleted `find` test) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/CHANGELOG.md | 20 ++++++++++++++++++++ core/builtins.zig | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 9b551e9b..fe9adec8 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -2,6 +2,26 @@ ## Unreleased +- `pardes attach NAME` (and `pardes-gui attach NAME`) is always a client: + a process of its own with its own view, whatever the session was + started in. A session's own terminal or window is only the one it was + born with: once a Detach or its terminal let it go, it never takes one + back. Before, an attach to a detached terminal's session handed it this + terminal (the attach waiting as its stub), and `pardes-gui attach` asked + a detached window's session to open its own window again and exited 0. + A client's Detach ends it with "'NAME' let this client go" and exit 1, + where the stub said "detached from 'NAME'" and exited 0. Bare, `pardes + attach` takes the one detached session, else the one session, of either + kind; with several it names them all. + +- A session whose daemon was killed starts the next one itself and + registers with it again, its shells' terminals and its clients with it: + `pardes ps` lists it, an attach and Adopt find it, and Detach works. It + ran on unlisted for good before, and its terminal closing ended it. + +- The words `pardes` says at a Detach name `pardes attach NAME`, the + command's spelling now, not `--attach=NAME`. + - On a client, and so on a far one, what changes only the editor is applied at once and only what touches the session's machine waits for it (a save, a shell's keys, a file read from disk, a program run, a diff --git a/core/builtins.zig b/core/builtins.zig index 1a0b4ce7..2740e05a 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -532,7 +532,7 @@ pub const Restore = struct { }; /// Detach this pardes from its terminal or window, leaving the session -/// running: `pardes --attach` (or `pardes-gui --attach`) takes it back. +/// running: `pardes attach` (or `pardes-gui attach`) shows it as a client. pub const Detach = struct { pub const scope: Scope = .session; pub const enabled = pardes.can_attach; -- cgit v1.3