From 6401b327a217c144895e22fb7ad24d986af97d86 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 22 Nov 2026 00:38:38 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- dev/tui/tui.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dev') 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; } -- cgit v1.3