summaryrefslogtreecommitdiff
path: root/dev/Inbox.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 01:46:17 -0300
committerGabriel Schneider <[email protected]>2026-11-20 04:00:32 -0300
commit969369d4b84fa1847dc3dee0e737dcd58e56c5e7 (patch)
treee866b74b33701005eb2009ce573aef8dd4ab420f /dev/Inbox.zig
parent11f55f018a5eb0699d58627a4f2ea39c2b7f5e89 (diff)
downloadpardes-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 'dev/Inbox.zig')
-rw-r--r--dev/Inbox.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/dev/Inbox.zig b/dev/Inbox.zig
index ed3a9835..4df02013 100644
--- a/dev/Inbox.zig
+++ b/dev/Inbox.zig
@@ -23,8 +23,6 @@ pub const Msg = union(enum) {
kind_job: *KindJob,
files_changed,
fs_ready,
- /// The daemon asks for the window again (`pardes-gui --attach`).
- window,
/// A shell a dead session left, its pty's master (Adopt); pid 0 is
/// the last of them told.
adopted: struct { pid: libc.pid_t, fd: c_int },
@@ -44,7 +42,7 @@ pub const Msg = union(enum) {
.adopted => |a| if (a.fd >= 0) {
_ = libc.close(a.fd);
},
- .eof, .files_changed, .fs_ready, .window => {},
+ .eof, .files_changed, .fs_ready => {},
}
}
};