From 28d11d18a739864406a37a9b2c6f3fefc450b6bc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 22:12:00 -0300 Subject: Restore brings a Tty bash pane back running bash A dogfood agent's `Tty bash` pane came back from Restore running fish: the dump kept its directory but not the shell it was opened on. The dump's terminal record now carries that shell (empty for the configured one, as older dumps read), and Restore starts it again. Co-Authored-By: Claude Opus 5.5 --- src/dump.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 954a3270..446776d4 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -99,6 +99,9 @@ pub const PaneKind = enum { pub const Terminal = struct { cwd: []const u8 = "", + /// The shell it runs when not the configured one (`Tty bash`); empty, + /// the configured one, as in dumps from before. + shell: []const u8 = "", /// The rendered scrollback and screen as plain text, one row per line. stream: []const u8 = "", stream_b64: []const u8 = "", @@ -747,6 +750,7 @@ fn initDump(gpa: std.mem.Allocator, opts: Options, zon_bytes: []const u8, previo const restored = try pardes.panes.Terminal.restore(p, src, revive); p.installPane(i, restored); try restored.setOwnedCwd(t.cwd); + if (t.shell.len > 0) restored.shell = try gpa.dupe(u8, t.shell); if (std.mem.startsWith(u8, src.tag, "TTY ")) restored.body.mode = .tty; if (revive) p.emit(.{ .spawn = .{ .pane = @intCast(i), .serial = restored.serial, .cwd = .from(t.cwd) } }); break :terminal restored; -- cgit v1.3