summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 00:38:38 -0300
committerGabriel Schneider <[email protected]>2026-11-22 00:51:41 -0300
commit6401b327a217c144895e22fb7ad24d986af97d86 (patch)
tree8e2e7b7c6fb558b7098b03b81509eaba7a361d14 /dev
parent6cb805ff4989af6dfef7426a96b3abb4c22e3a0a (diff)
downloadpardes-6401b327a217c144895e22fb7ad24d986af97d86.tar.gz
pardes-6401b327a217c144895e22fb7ad24d986af97d86.zip
pair: an upgraded pair's session keeps what it says until its client is back: its "Upgrade: now" (runtime/upgrade.zig, set on the restored core's live view at load) went 800 ms after it was said (`message_linger_ms`), on the clock an unattended session's messages are put on (Messages.expireUnattended), and a pair's session has no terminal of its own (dev/tui/tui.zig `detached`) and no client until its client dials again after the exec, which takes longer; the own path's session is attended by its terminal throughout; so a session resumed by an Upgrade whose record says it was a pair's (`Record.state` .pair: its client is on its way) starts attended, as a Restore's does for its clients (runtime/session.zig `restore`), and goes unattended again when its last client leaves (Peers.leave); daemon.py --with-pair --upgrade both ways now passes "the word said" and stops at the next check, the daemon's hello for a new view refused "that session has as many views as it takes" (test/daemon.py:3220), which the own path's run (no variable) on the same two builds is refused too, until the views kept for the old build's clients have been away 30 s (views.away_kept_ns), and the pair's for good (45 s tried)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev')
-rw-r--r--dev/tui/tui.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index 25ee9075..2c6b25d2 100644
--- a/dev/tui/tui.zig
+++ b/dev/tui/tui.zig
@@ -1018,6 +1018,12 @@ const Own = struct {
if (comptime !builtin.is_test) if (upgrade.resumed) |*rec| sh.resumeTerminals(rec);
// Nobody to see it, and nobody to size it: `size` sets it (ctl.zig).
sh.setAttended(!sh.detached());
+ // An upgraded pair's client joins again at once: what the session
+ // says meanwhile ("Upgrade: now") waits for it, as at a Restore
+ // (session.zig `restore`), not 800 ms on an unattended clock.
+ if (comptime !builtin.is_test) if (upgrade.resumed) |rec| if (rec.state == .pair) {
+ l.core.unattended = false;
+ };
return host;
}