summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 16:50:34 -0300
committerGabriel Schneider <[email protected]>2026-11-22 16:53:19 -0300
commit9863a63b614d200852853825031189364dcacfdc (patch)
treed235648a2ac14b3e311746ced3433ed6865e2061 /runtime
parent6544f73a6b50e5ba68564beea7784593bb54348e (diff)
parentbad506bd45846e012246a33b5d3097b3e92f02bc (diff)
downloadpardes-9863a63b614d200852853825031189364dcacfdc.tar.gz
pardes-9863a63b614d200852853825031189364dcacfdc.zip
integration: the old road deleted and the emulator's boundary on the gathered line: pardes-merge56 (`qvwrwxtu`: the installed tree and the source view's changes to their last slice) and pardes-term-join-9 (`twssqzqw`, fourteen changes on pardes-merge55: every client's terminals by the pty's bytes and nothing else: the delta protocol, its flow control and core/term/screen_state.zig deleted (-3,605 +504 lines), the wire at 30, one soak; S1: abi/term.zig's Ops in replicated and local, the terminal's digest covering what a step reads, every call of the core's into a terminal listed with its rule as a test; a client's own join again judged after its goodbye; a pty's size one fact the core hands its host for every fork, adopt and resize; a closed view sizes no terminal); no textual conflict; one semantic one, resolved here: core/jj.zig's Churn test (the layers' last round) called Authority.init and Replica.init with the road's flag the deletion took away: the argument removed; core-test 916/1073 (157 skipped), shell-test 1115/1118; its gate: .scratch/sketch/reorg/merge57, the numbers in PARDES.md (2026-11-22)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime')
-rw-r--r--runtime/client.zig2
-rw-r--r--runtime/macos.zig10
-rw-r--r--runtime/session.zig6
3 files changed, 7 insertions, 11 deletions
diff --git a/runtime/client.zig b/runtime/client.zig
index 49ebbc6e..43fdf98d 100644
--- a/runtime/client.zig
+++ b/runtime/client.zig
@@ -442,7 +442,7 @@ const AskedHost = struct {
test "a client's yank, paste and link reach its own frontend once each, through the loop, and the session's host is asked none of them" {
const gpa = std.testing.allocator;
var h: AskedHost = .{};
- const a = try replica.Authority.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }, h.host(), false);
+ const a = try replica.Authority.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }, h.host());
defer a.deinit();
_ = try a.unit(0, 0);
const j = (try a.join(1, null)) orelse return error.NoView;
diff --git a/runtime/macos.zig b/runtime/macos.zig
index 23d70b27..3221737a 100644
--- a/runtime/macos.zig
+++ b/runtime/macos.zig
@@ -1649,14 +1649,14 @@ fn hostState(ctx: ?*anyopaque) *State {
return @ptrCast(@alignCast(ctx.?));
}
-fn spawnShell(ctx: ?*anyopaque, id: pardes.Pane.Id, cwd: []const u8) void {
+fn spawnShell(ctx: ?*anyopaque, id: pardes.Pane.Id, cwd: []const u8, size: pardes.PtySize) void {
const pane = id.index();
const st = hostState(ctx);
const core = st.core;
// The new shell starts before a running one goes: one that cannot
// start leaves the running one be (pty/ctl's exec).
const running = st.ptys[pane] != null;
- const child = host_io.forkShell(core, pane, &st.prompt_rcs, core.shellBin(), cwd, core.view().screen_h, core.view().screen_w) catch |err| {
+ const child = host_io.forkShell(core, pane, &st.prompt_rcs, core.shellBin(), cwd, size) catch |err| {
if (running) return core.restartFailed(id, err);
return core.shellFailed(id, err);
};
@@ -1685,11 +1685,11 @@ fn ptyWrite(ctx: ?*anyopaque, id: pardes.Pane.Id, bytes: []const u8) void {
if (st.ptys[pane]) |pt| _ = host_io.writeFd(pt.file.handle, bytes);
}
-fn ptyResize(ctx: ?*anyopaque, id: pardes.Pane.Id, cols: u16, rows: u16) void {
+fn ptyResize(ctx: ?*anyopaque, id: pardes.Pane.Id, size: pardes.PtySize) void {
const pane = id.index();
const st = hostState(ctx);
const pt = st.ptys[pane] orelse return;
- const ws: posix.winsize = .{ .row = rows, .col = cols, .xpixel = 0, .ypixel = 0 };
+ const ws = host_io.ptyWinsize(size);
_ = posix.system.ioctl(pt.file.handle, TIOCSWINSZ, @intFromPtr(&ws));
}
@@ -2339,7 +2339,7 @@ test "mac Restore cancels a PTY reader waiting for output capacity" {
while (st.core.nextEffect()) |_| {}
st.inbox.acceptReader(.at(1), 1);
for (0..Inbox.output_capacity) |_| _ = st.inbox.pushOutput(.at(1), 1, try gpa.dupe(u8, "retained output"));
- const child = try host_io.forkShell(null, 0, &st.prompt_rcs, "/bin/sh", "", 12, 40);
+ const child = try host_io.forkShell(null, 0, &st.prompt_rcs, "/bin/sh", "", .{ .cols = 40, .rows = 12 });
st.gens[0] = 1;
st.ptys[0] = .{ .file = child.file, .pid = child.pid, .gen = 1, .reader = .{ .any_future = null, .result = {} } };
defer {
diff --git a/runtime/session.zig b/runtime/session.zig
index 9499da9c..75e8efcc 100644
--- a/runtime/session.zig
+++ b/runtime/session.zig
@@ -86,11 +86,7 @@ pub fn Loop(comptime Frontend: type) type {
defer l.prompt_rcs.deinit();
l.fs = ninep_io.start(l.io, l.gpa, l.core);
defer if (l.fs) |f| f.deinit(l.gpa);
- // Its clients' terminals by the pty's bytes (Peers.bytes), each
- // client's emulator its own; PARDES_TERM_SCREEN (a working name,
- // the way back until the screen state's road is deleted): as
- // screen state. Its welcome tells each client which.
- l.peers = .{ .gpa = l.gpa, .io = l.io, .name = daemon.name(), .bytes = std.c.getenv("PARDES_TERM_SCREEN") == null };
+ l.peers = .{ .gpa = l.gpa, .io = l.io, .name = daemon.name() };
l.inbox = .{ .io = l.io, .gpa = l.gpa, .lsp_allocator = l.allocs.lsp };
defer l.inbox.deinit();
// A search's worker may be waiting on the queue for room.