diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 01:46:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 04:00:32 -0300 |
| commit | 969369d4b84fa1847dc3dee0e737dcd58e56c5e7 (patch) | |
| tree | e866b74b33701005eb2009ce573aef8dd4ab420f /runtime/session.zig | |
| parent | 11f55f018a5eb0699d58627a4f2ea39c2b7f5e89 (diff) | |
| download | pardes-969369d4b84fa1847dc3dee0e737dcd58e56c5e7.tar.gz pardes-969369d4b84fa1847dc3dee0e737dcd58e56c5e7.zip | |
attach: `pardes attach [NAME]` is a client always, from a terminal a terminal's and from `pardes-gui` a window's, whatever the session was born with (the ruling of 2026-11-17: a session's own frontend is only the one it was born with), and the in-place attach deleted with what only it used (305 lines deleted, 94 added): the daemon's `attach` request and its `find` that chose (runtime/daemon.zig), `daemon.attach` and its `Answer`, `Note.attach`, the stub's second use (`stubWait`'s `child` and its `r`/`x` words, `tellStubExit`), `attachTo`'s two hand-offs and `crossAttach` (runtime/main.zig: a named attach goes straight to the replica socket, where the daemon refuses a name nobody has; a bare one takes the one detached session, else the one session, from the daemon's `list`, else names them: `bareAttach`, with a test), the terminal handed to a session (`attachTerminal`, `refuse`, the `.attach` message and its three arms: dev/tui/tui.zig), the window opened again in place (`openTheWindow`, `Shell.detached`, the queue's `.window` and its arms: dev/gui/gui.zig, dev/Inbox.zig, runtime/macos.zig), and `setState(false)`, which nothing says now (`setDetached`); test/daemon.py's attach cases expect a client (a Detach in its own terminal once, then each attach a client in `--ps`, the session detached still, its Detach exit 1 "let this client go"; the window cycles as window clients, offscreen); tui shell-test 1046/1049 (3 skipped, as the base), core-test 855/1005 (the base's less the deleted `find` test), daemon.py plain passing (gated with the next change)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime/session.zig')
| -rw-r--r-- | runtime/session.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/session.zig b/runtime/session.zig index 3942aa83..55b42b60 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -23,8 +23,8 @@ //! listener's wake, a detached session's first wait (`l.watch`). //! - `sent()`: after each step's unit went to the clients. //! - `upgradeAsked()`: an Upgrade asked in the step, done (it execs). -//! - `note(n)`: what the daemon says (a terminal, an adopted shell, a -//! client's connection), onto its queue. +//! - `note(n)`: what the daemon says (an adopted shell, a client's +//! connection), onto its queue. //! - `watched()`: the files it watches (a Restore stops watching them). //! - `restoring(nc)`, `restored(l)`: a Restore's new core, before it //! replaces the old one (its devices let go, what it is told of the @@ -119,8 +119,7 @@ pub fn Loop(comptime Frontend: type) type { // Asked in the step (the word), done between steps: the // session whole. fe.upgradeAsked(); - // A terminal (`pardes --attach`), a window asked for again, - // an adopted shell or a client's connection, handed on by + // An adopted shell or a client's connection, handed on by // the daemon's thread; started after the first frame, off a // start's way. l.watch(); |
