diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-21 12:55:20 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-21 13:08:10 -0300 |
| commit | ac57f6e25b7b694374925ef42963952524804152 (patch) | |
| tree | 938625cc51c66760023036d60f5fe1f44d86c0ce /dev | |
| parent | 5a74a03fece68f6cd53ab2c8fccbd7deea345acb (diff) | |
| parent | 9f4b8e83ed908c8b7a9bf979a5c9bf581e66c052 (diff) | |
| download | pardes-ac57f6e25b7b694374925ef42963952524804152.tar.gz pardes-ac57f6e25b7b694374925ef42963952524804152.zip | |
integration: the gate's three rows and the pair's round 6 on the gathered line: pardes-rows (`xlmzqnnp`, on pardes-merge50: a view kept for a client's rejoin is let go after its 30 s in a session nobody types in: a join with every view open advances the clock on the tape before it judges, and its refusal says one is kept and for how long; the adopted shell's and the upgrade rows' tests wait for what they read) and pardes-pair-6 (`slxkptto`, on pardes-merge50: a pair's first client, and the first client of any session with no frontend, no client and no view kept, takes the session's view instead of one opened beside it; a size equal to the one held is no resize; a Restore tells its clients and they join again; a pair's client enters its terminal before its join: the process suite as pairs 1, 0, 0 of 145 with no golden changed); one textual conflict, core/replica.zig Peers.join: the rows' clock advance at the cap first, then the pair's `own` and viewFor(core, joining.view, own): both kept; core-test 894/1054 (160 skipped), shell-test 1096/1099; its gate: .scratch/sketch/reorg/merge51, the numbers in PARDES.md (2026-11-21)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/host_io.zig | 2 | ||||
| -rw-r--r-- | dev/tui/tui.zig | 22 |
2 files changed, 18 insertions, 6 deletions
diff --git a/dev/host_io.zig b/dev/host_io.zig index a22bf5ce..419c4570 100644 --- a/dev/host_io.zig +++ b/dev/host_io.zig @@ -52,7 +52,7 @@ pub fn stopWorkers() void { /// session is one view, the live one's (the tty's terminal, the window's /// window): the others are let go, as a detach of each. pub fn restoreCore(gpa: std.mem.Allocator, core: *pardes.Pardes, path: []const u8, peers: *replica.Peers, inotify_fd: c_int, watches: *file_watch.Table) ?*pardes.Pardes { - peers.dropAll(core); + peers.restoring(core); const bytes = pardes.dump.restoreBytes(core, gpa, path) catch |err| { core.reportError(.at(core.view().active), "Restore", err); return null; diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 7e5a75fb..92ac6a0c 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -738,14 +738,23 @@ pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8, if (comptime builtin.os.tag == .freebsd) posix.sigaction(.WINCH, &.{ .handler = .{ .handler = keepSignal }, .mask = posix.sigemptyset(), .flags = 0 }, null); posix.sigprocmask(posix.SIG.BLOCK, &winch_set, null); - var start: client_loop.Start = undefined; - if (!start.open(init, opts, .{ .path = path, .session = session, .far = far_link })) Said.no(io, "{s}", .{start.said()}); - defer start.close(); var tty_buf: [0x10000]u8 = undefined; var screen: Screen = .{ .io = io, .gpa = gpa, .env = init.environ_map, .buf = &tty_buf, .kitty = .init(gpa) }; defer screen.kitty.deinit(); - try screen.enter(try vaxis.Tty.init(io, &tty_buf)); + // A pair's terminal is its own before its join, as the own frontend's + // is before its core: that join is the pair's whole start (its own + // boot, replica.ownBoot), and keys typed meanwhile are its input, not + // echoed by the line discipline and lost as it enters. An attach enters + // once joined, a refusal said on the terminal as it was. + if (opts.pair != null) try screen.enter(try vaxis.Tty.init(io, &tty_buf)); defer screen.leave(); + var start: client_loop.Start = undefined; + if (!start.open(init, opts, .{ .path = path, .session = session, .far = far_link })) { + screen.leave(); + Said.no(io, "{s}", .{start.said()}); + } + defer start.close(); + if (opts.pair == null) try screen.enter(try vaxis.Tty.init(io, &tty_buf)); defer screen.glide.deinit(gpa); defer screen.art.deinit(gpa); var paste_buf: std.Io.Writer.Allocating = .init(gpa); @@ -1631,9 +1640,12 @@ const Shell = struct { return false; } - /// Terminal `screen` (its view live) is `ws` big. + /// Terminal `screen` (its view live) is `ws` big; the size it has is no + /// resize (a client's start takes its size before its input thread's + /// first one comes: Tty.start). fn resized(s: *Shell, screen: ?*Screen, ws: vaxis.Winsize) void { if (screen) |sc| { + if (sc.size) |was| if (std.meta.eql(was, ws)) return; sc.size = ws; sc.vx.resize(s.gpa, sc.tty.writer(), ws) catch {}; } |
