diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 11:42:48 -0300 |
| commit | 71d8744b41dec56d835e30f531b96fede5d610a1 (patch) | |
| tree | 31e2a06fdcfd467d12454cde8be5a477765701b5 /dev | |
| parent | eae5736ad923731135dd35b3783c90a3358bd0fa (diff) | |
| parent | 4569aefd55d04f434f2e2ed5e6e4a511a414cdc7 (diff) | |
| download | pardes-71d8744b41dec56d835e30f531b96fede5d610a1.tar.gz pardes-71d8744b41dec56d835e30f531b96fede5d610a1.zip | |
integration: the one client loop that the soak runs, with the tape as the handle a step is given: pardes-runners-b (10b: runtime/client.zig run by the terminal's client, the window's and the soak; a client's clipboard and links its own frontend's; an input sent before it is applied) and pardes-handle-1 (the handle's steps 0 to 2: p.tape, the directory listing and the file system read through the tape they are handed), merged without a conflict; gates in the coordinator's ledger
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/file_watch.zig | 4 | ||||
| -rw-r--r-- | dev/gui/gui.zig | 16 | ||||
| -rw-r--r-- | dev/host_io.zig | 2 | ||||
| -rw-r--r-- | dev/tui/tui.zig | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/dev/file_watch.zig b/dev/file_watch.zig index b2205173..9d868e07 100644 --- a/dev/file_watch.zig +++ b/dev/file_watch.zig @@ -609,7 +609,7 @@ pub fn applyThemeEffect( // What fails here is the ThemeFile write's failure too, which waits on // this (the one-failure rule): late, as a Save's. const pane = request.pane; - const bytes = filesystem.readFile(gpa, request.path) catch |err| { + const bytes = filesystem.readFile(&pardes.tape.none, gpa, request.path) catch |err| { colors.failThemeFile(core, generation, err); core.noteLateFailure(pane); return false; @@ -641,7 +641,7 @@ pub fn reloadTheme( if (comptime builtin.os.tag == .macos) { if (watches[theme_slot]) |*entry| remarkFile(entry, request.path); } - const bytes = filesystem.readFile(gpa, request.path) catch |err| { + const bytes = filesystem.readFile(&pardes.tape.none, gpa, request.path) catch |err| { core.invalidate(); colors.failThemeFile(core, watched.serial, err); return false; diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index 909c83c6..237b7b85 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -611,7 +611,7 @@ fn syncReplicaFont(g: *Gui, f: *const @FieldType(pardes.config.Runtime, "font"), log.warn("the session's font is not installed here: {s}", .{name}); return false; }; - const bytes = filesystem.readFile(gpa, face.path) catch return false; + const bytes = filesystem.readFile(&pardes.tape.none, gpa, face.path) catch return false; if (!g.atlas.setFont(gpa, bytes)) return false; if (f.requested_size_hundredths != 0) g.px = @as(f32, @floatFromInt(f.requested_size_hundredths)) / 100; @@ -627,7 +627,7 @@ fn loadFallbackFonts(g: *Gui, gpa: std.mem.Allocator) void { defer arena_state.deinit(); for (fonts.fallbacks(arena_state.allocator())) |candidate| { if (g.atlas.fallback_count == max_fallback_fonts) break; - const bytes = filesystem.readFile(gpa, candidate.path) catch continue; + const bytes = filesystem.readFile(&pardes.tape.none, gpa, candidate.path) catch continue; _ = g.atlas.addFallback(gpa, bytes, true); } } @@ -1050,7 +1050,7 @@ fn localSession( var core = if (upgrade.resumed) |*rec| try upgrade.load(gpa, allocs.pardes, opts, rec) else if (opts.load_path) |lp| blk: { - const bytes = try @import("core").filesystem.readFile(gpa, lp); + const bytes = try @import("core").filesystem.readFile(&pardes.tape.none, gpa, lp); defer gpa.free(bytes); break :blk try pardes.dump.initFromDump(allocs.pardes, opts, bytes); } else try pardes.Pardes.init(allocs.pardes, opts); @@ -3065,7 +3065,7 @@ fn pollFrame(ctx: ?*anyopaque) void { frame_probe.?.period_ns = refreshNs(g); syncTaglineFont(g, core); if (core.takeFontRequest()) |path| blk: { - const bytes = filesystem.readFile(s.gpa, path) catch { + const bytes = filesystem.readFile(&pardes.tape.none, s.gpa, path) catch { core.rejectFont(); break :blk; }; @@ -6179,7 +6179,7 @@ test "FreeType and HarfBuzz allocate from the gui allocator and give it all back try std.testing.expect(!atlas.substitutes(0, atlas.glyphForCodepoint('-').glyph)); // A font with ligatures runs the whole HarfBuzz pass. - const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); + const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); defer std.testing.allocator.free(bytes); var maple = try Atlas.init(std.testing.allocator, bytes); defer maple.deinit(std.testing.allocator); @@ -6272,7 +6272,7 @@ test "installed Nerd Symbols fallback covers Yazi directory icons" { if (std.mem.eql(u8, font.name, "SymbolsNerdFont-Regular")) break font; } else return; - const bytes = try filesystem.readFile(std.testing.allocator, candidate.path); + const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, candidate.path); defer std.testing.allocator.free(bytes); var atlas = try Atlas.init(std.testing.allocator, bytes); defer atlas.deinit(std.testing.allocator); @@ -7502,7 +7502,7 @@ test "insert cursor overlays without replacing the character beneath it" { } test "a ligature draws across its cells, one slice each, and comes apart under the cursor" { - const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); + const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); defer std.testing.allocator.free(bytes); var g = try textTestGui(bytes, 27); defer font_allocator = std.heap.smp_allocator; @@ -8298,7 +8298,7 @@ test "the atlas's bytes: a fixed key list at 27 px and at 54 px (2x) rasterizes // move (.scratch/sketch/briefs/gpu-s0.md); a change here is a change // to every frame. const want = [2][2]u64{ .{ 0xa03053f14e2c5472, 0x9029886b638b07d5 }, .{ 0xcbaa53a0103aaff5, 0x7563d69768f7d867 } }; - const maple = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); + const maple = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf"); defer std.testing.allocator.free(maple); defer display_scale = 1; var got: [2][2]u64 = undefined; diff --git a/dev/host_io.zig b/dev/host_io.zig index 1e03cdaf..377263a4 100644 --- a/dev/host_io.zig +++ b/dev/host_io.zig @@ -1518,7 +1518,7 @@ pub fn writeDump(core: *pardes.Pardes, bytes: []const u8) void { error.AccessDenied => error.AccessDenied, else => error.InputOutput, }; - return core.dumpFailed(pardes.Db.statePath(&path, core.settings.dump_dir.get()) orelse core.settings.dump_dir.get(), said); + return core.dumpFailed(pardes.Db.statePath(&pardes.tape.none, &path, core.settings.dump_dir.get()) orelse core.settings.dump_dir.get(), said); }; core.setLastDump(label); } diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 5b5c1e67..5a42ae5e 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -962,7 +962,7 @@ fn localSession( var core = if (upgrade.resumed) |*rec| try upgrade.load(gpa, allocs.pardes, options, rec) else if (options.load_path) |lp| blk: { - const bytes = try filesystem.readFile(gpa, lp); + const bytes = try filesystem.readFile(&pardes.tape.none, gpa, lp); defer gpa.free(bytes); break :blk try pardes.dump.initFromDump(allocs.pardes, options, bytes); } else try pardes.Pardes.init(allocs.pardes, options); |
