diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:53:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:27:20 -0300 |
| commit | e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7 (patch) | |
| tree | 396414b8c5b9065a0a2dad6c8202df4a108cf7cd /src/tui | |
| parent | e19bdc79f0cc6e8521085c69ba6e22da24fce8a4 (diff) | |
| download | pardes-e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7.tar.gz pardes-e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7.zip | |
host_io: a Restore's new core is restoreCore's (the clients that replicate the old one let go, the dump read and restored, its failure said once, the old core's pane and theme watches dropped), with both ponytail notes, where the tty and the window each wrote those steps out; each keeps its own ptys, pipes and views, and the tty's dump import goes with its one use
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/tui')
| -rw-r--r-- | src/tui/tui.zig | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 3a5c277e..5c16f1be 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -6,7 +6,6 @@ const libc = std.c; const vaxis = @import("vaxis"); const pardes = @import("../pardes.zig"); const vaxis_input = @import("../vaxis_input.zig"); -const dump = @import("../dump.zig"); const tracy = @import("../tracy.zig"); const look = @import("../look.zig"); const message = pardes.Messages.Message; @@ -1749,18 +1748,7 @@ fn localSession( // off a startup's way. daemon.watch(loop, deliverNote); if (core.takeRestore()) |rp| blk: { - // ponytail: a Restore replaces the core its clients replicate; - // they are let go, and attach again. - sh.peers.dropAll(core); - const bytes = filesystem.readRestore(gpa, rp, core.settings.dump_dir.get()) catch |err| { - core.reportError(core.active, "Restore", err); - break :blk; - }; - defer gpa.free(bytes); - const nc = dump.restore(core, bytes, rp) catch |err| { - core.reportError(core.active, "Restore", err); - break :blk; - }; + const nc = host_io.restoreCore(gpa, core, rp, &sh.peers, sh.inotify_fd, &sh.watches) orelse break :blk; if (sh.lsp_task) |*task| { task.future.cancel(io); sh.lsp_task = null; @@ -1768,10 +1756,7 @@ fn localSession( sh.pipe_tasks.cancelAll(io); for (&sh.gens) |*generation| generation.* +%= 1; for (0..pardes.MAX_PANES) |pane| Shell.closePty(&sh, @intCast(pane)); - file_watch.unwatchAll(sh.inotify_fd, &sh.watches); - _ = file_watch.applyThemeEffect(core, gpa, sh.inotify_fd, &sh.watches, 0, false, false); - // ponytail: a restored session is one view, the live one's - // terminal: the others are let go, as a detach of each. + // One view, the live one's terminal (host_io.restoreCore). const live = sh.term().?; for (&sh.terms) |*slot| if (slot.*) |sc| if (sc != live) { stopInput(io, &sc.thread); |
