╭ changed ────────╮ │src/main_wasm.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │41 }; │ │42 │ │43 var next_root = try ui.initRoot(allocator, &(page orelse unreachable), &session);│ │44 - errdefer next_root.deinit(); │ │44 + errdefer next_root.deinit(allocator); │ │45 │ │46 - if (root) |*old_root| old_root.deinit(); │ │46 + if (root) |*old_root| old_root.deinit(allocator); │ │47 root = next_root; │ │48 │ │49 try tick(max_width); │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │51 │ │52 fn tick(max_width: u32) !void { │ │53 const root_ptr = if (root) |*root_value| root_value else return error.NotStarted;│ │54 - try root_ptr.build(.{ │ │54 + try root_ptr.build(allocator, .{ │ │55 .min_size = .{ .width = null, .height = null }, │ │56 // height is null so the TUI grows to fit all its content; the browser │ │57 // page handles vertical scrolling. │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────╮ │74 40 => .arrow_down, │ │75 else => return, │ │76 }; │ │77 - try root_ptr.input(key, root_ptr.getFocus()); │ │77 + try root_ptr.input(allocator, key, root_ptr.getFocus());│ │78 } │ │79 │ │80 fn onMouseClick(focus_id: usize) !void { │ ╰────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │154 else => return error.NotATextInput, │ │155 } │ │156 const ti: *wgt.TextInput(ui.Widget) = @fieldParentPtr("focus", child.focus);│ │157 - try ti.setContent(bytes); │ │157 + try ti.setContent(allocator, bytes); │ │158 } │ │159 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 const page: ui.Page = .{ .home = try .init(repo_opts, &page_arena, &repo, &ui_session) };│ │63 │ │64 var root = try ui.initRoot(allocator, &page, &ui_session); │ │65 - defer root.deinit(); │ │65 + defer root.deinit(allocator); │ │66 │ │67 // terminal and its writer adapter live in a nested block so the deinit │ │68 // (which writes leave-alt / show-cursor / disable-mouse to the channel) │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │83 defer last_grid.deinit(); │ │84 │ │85 // initial render — user sees the page immediately │ │86 - try root.build(.{ │ │86 + try root.build(allocator, .{ │ │87 .min_size = .{ .width = null, .height = null }, │ │88 .max_size = .{ .width = last_size.width, .height = last_size.height },│ │89 }, root.getFocus()); │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │ 99 defer allocator.free(payload); │ │100 try terminal.writeBytes(payload); │ │101 while (terminal.popKey()) |key| { │ │102 - try ui.inputKey(&root, key, &terminal); │ │102 + try ui.inputKey(allocator, &root, key, &terminal);│ │103 } │ │104 }, │ │105 .resize => |sz| { │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │106 terminal.pushResize(.{ .width = sz.width_cells, .height = sz.height_cells });│ │107 while (terminal.popKey()) |key| { │ │108 - try ui.inputKey(&root, key, &terminal); │ │108 + try ui.inputKey(allocator, &root, key, &terminal); │ │109 } │ │110 }, │ │111 .close => terminal.requestQuit(), │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │112 } │ │113 │ │114 - try root.build(.{ │ │114 + try root.build(allocator, .{ │ │115 .min_size = .{ .width = null, .height = null }, │ │116 .max_size = .{ .width = last_size.width, .height = last_size.height },│ │117 }, root.getFocus()); │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │29 │ │30 pub fn run(io: std.Io, allocator: std.mem.Allocator, page: *const Page, session: *Session) !void {│ │31 var root = try initRoot(allocator, page, session); │ │32 - defer root.deinit(); │ │32 + defer root.deinit(allocator); │ │33 │ │34 var terminal = try term.Terminal.init(io, allocator); │ │35 defer terminal.deinit(io); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯