From d8e5fc18f5923c4213de1cb4105a677e725200af Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 21:02:51 -0300 Subject: fields #41, a view's frontend is one field: windowed, native_images and native_image_patches, the three fields Event.frontend carries, are the session's frontend, a Frontend, so update's frontend arm is p.frontend = f where it copied them one by one; native_image_patches, each process's own, is said so on Frontend (its replica .local), where the session's list said it, so the digest and a dump leave it out as before, and the tape watches frontend where it watched the three (a host's write of patches alone, which only drawing reads, is no longer a set of its own on the tape); the reads in 22 files say p.frontend.native_images (macos.zig's by text, built nowhere here; dump.zig, the persistence agent's, only where it names native_images); views.zig's per-view fields name frontend; a dump written before this change loads it as the default once: an Upgrade or Restore from it comes back as a terminal's view without native images until its frontend says otherwise (a window's says so at once), and the wire's semantics change; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/builtins.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 7a9c2df1..5186ac55 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -42,16 +42,16 @@ const terminal_capabilities: config.Runtime.Capabilities = .{ .font_picker = fal pub const capabilities: config.Runtime.Capabilities = if (desktop) window_capabilities else frontend; /// What the live view's frontend takes: a window's, or a terminal's -/// (`Pardes.windowed`, which its client says, Event.frontend). +/// (`Pardes.frontend`, which its client says, Event.frontend). pub fn viewCapabilities(p: *const Pardes) config.Runtime.Capabilities { if (comptime !desktop) return frontend; - return if (p.windowed) window_capabilities else terminal_capabilities; + return if (p.frontend.windowed) window_capabilities else terminal_capabilities; } /// The live view's frontend, by name (the Settings report's platform). pub fn viewPlatform(p: *const Pardes) []const u8 { if (comptime !desktop) return @tagName(pardes.platform); - return if (p.windowed) "gui" else "tui"; + return if (p.frontend.windowed) "gui" else "tui"; } /// Where a builtin acts: at the pane it runs from, or on the editor as a @@ -183,7 +183,7 @@ pub const registry = struct { /// cannot show) in a window's view alone. The rest of a build's words are /// every view's. pub fn here(p: *const Pardes, b: Builtin()) bool { - return hereFor(b, viewCapabilities(p), !desktop or p.windowed); + return hereFor(b, viewCapabilities(p), !desktop or p.frontend.windowed); } /// `here` for a frontend of these capabilities, windowed or not. -- cgit v1.3