From 7d10ad68b07a7bbab23fa8565d39183e4387c478 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 22:02:15 -0300 Subject: words: `remote` out of the code where it meant a client (PARDES.md ruling 1: it meant any client, this machine's too): tui.zig's `Remote` is `Client` (the window's word already), `tui.remote` and `gui.remote` are `runClient`, `gui.remoteSession` is `clientSession`, `main.remoteAttach` is `attachClient`, the Shell's and Input's `remote` fields `client`, `fonts.remote` `fromSession` and the window's `remote_font_request` `session_font_request`; what a person reads: the window client's log "remote font is not installed here" is "the session's font is not installed here", attach's "no runtime directory to name the remote socket by" names the far socket; NOT renamed: the env var PARDES_REMOTE_RUNTIME (the user types it), 9p_io's error.Remote and RemoteError (a 9P peer's refusal), fs.zig's remote_path (a 9P mount's), tui.zig:86's terminal over ssh and :1579's shell over ssh, pty.zig's test prompt; names only, no logic moved; tui core-test 811/950 (139 skipped), shell-test 993/996, behaviour-test 269/273 (the four addon ABI tests the base fails), process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's), daemon.py main passes; gui frame corpus 77/77 byte-identical against mbase, unit-test 1582/1590 (the base's 8 failures) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- src/main.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 2934aba9..4a55695c 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1496,7 +1496,7 @@ fn nativeMain(std_init: std.process.Init) !void { opts.recent_import = oldRecentDir(arena, init.environ_map); if (found.dir) |d| @import("crash.zig").setDir(d); if (attach) |name| if (std.mem.lastIndexOfScalar(u8, name, ':')) |colon| { - remoteAttach(init, opts, name[0..colon], name[colon + 1 ..]); + attachClient(init, opts, name[0..colon], name[colon + 1 ..]); }; if (attach) |name| if (!resuming) attachTo(init, opts, name); if (detach) |name| { @@ -1674,17 +1674,17 @@ fn commOf(io: std.Io, pid: []const u8, buf: *[64]u8) []const u8 { /// window's (gui.zig). fn clientOf(init: std.process.Init, opts: pardes.Options, path: []const u8, name: []const u8, far: bool) !void { switch (pardes.platform) { - .tui => try @import("tui/tui.zig").remote(init, opts, path, name, far), - .gui => try @import("gui/gui.zig").remote(init, opts, path, name, far), + .tui => try @import("tui/tui.zig").runClient(init, opts, path, name, far), + .gui => try @import("gui/gui.zig").runClient(init, opts, path, name, far), else => unreachable, } } /// `pardes --attach=:` (`pardes-gui` too): a replica client -/// (tui.zig and gui.zig `remote`), through the socket `where` names, or +/// (tui.zig and gui.zig `runClient`), through the socket `where` names, or /// through `ssh -L` of host `where`'s replica socket to one of this /// process's. -fn remoteAttach(init: std.process.Init, opts: pardes.Options, where: []const u8, name: []const u8) noreturn { +fn attachClient(init: std.process.Init, opts: pardes.Options, where: []const u8, name: []const u8) noreturn { const io = init.io; if (comptime pardes.platform != .tui and pardes.platform != .gui) unreachable; if (std.mem.indexOfScalar(u8, where, '/') != null) { @@ -1697,7 +1697,7 @@ fn remoteAttach(init: std.process.Init, opts: pardes.Options, where: []const u8, const here = std.fmt.bufPrintSentinel(&here_buf, "{s}/pardes-ssh-{d}.sock", .{ tmp, std.c.getpid() }, 0) catch die(io, "--attach: TMPDIR is too long for a socket's path", .{}); var there_buf: [ninep_io.sun_path_len + 64:0]u8 = undefined; var dir_buf: [ninep_io.sun_path_len:0]u8 = undefined; - const dir = if (std.c.getenv("PARDES_REMOTE_RUNTIME")) |d| std.mem.span(d) else ninep_io.socketDir(&dir_buf) orelse die(io, "--attach: no runtime directory to name the remote socket by: set PARDES_REMOTE_RUNTIME", .{}); + const dir = if (std.c.getenv("PARDES_REMOTE_RUNTIME")) |d| std.mem.span(d) else ninep_io.socketDir(&dir_buf) orelse die(io, "--attach: no runtime directory to name the far socket by: set PARDES_REMOTE_RUNTIME", .{}); var forward_buf: [2 * ninep_io.sun_path_len + 64]u8 = undefined; const there = std.fmt.bufPrintSentinel(&there_buf, "{s}/pardes-replica.sock", .{dir}, 0) catch unreachable; const forward = std.fmt.bufPrintSentinel(&forward_buf, "{s}:{s}", .{ here, there }, 0) catch unreachable; @@ -1814,7 +1814,7 @@ fn attachTo(init: std.process.Init, opts: pardes.Options, name: []const u8) nore fn crossAttach(init: std.process.Init, opts: pardes.Options, name: []const u8) noreturn { var sock_buf: [ninep_io.sun_path_len:0]u8 = undefined; const sock = daemon.replicaSocket(&sock_buf) orelse die(init.io, "--attach: no runtime directory for the replica socket", .{}); - remoteAttach(init, opts, sock, name); + attachClient(init, opts, sock, name); } /// Where Recent's file (0.24) and the store before it were kept: -- cgit v1.3