╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │578 inline for ([_]ui.RoutablePage.EventsView{ .active, .removed }, 0..) |view, i| { │ │579 const route = ui.RoutablePage.repoEventsRoute(data.identity, view, null, "") orelse return error.RouteTooLong; │ │580 const count = data.window(view).count; │ │581 - const label = try std.fmt.allocPrint(session.page_arena.allocator(), "{s} ({d})", .{ @tagName(view), count }); │ │581 + var label_buf: [64]u8 = undefined; │ │582 + const label = try std.fmt.bufPrint(&label_buf, "{s} ({d})", .{ @tagName(view), count }); │ │583 var tab = try wgt.TextBox(ui.Widget).init(allocator, label, .{ .border_style = .hidden, .rounded_corners = true, .wrap_kind = .none });│ │584 errdefer tab.deinit(allocator); │ │585 tab.getFocus().focusable = true; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │634 return; │ │635 } │ │636 switch (key) { │ │636 - .enter => if (self.syncFocused()) self.requestSync(), │ │637 - .mouse => |mouse| if (self.button_id) |id| if (inp.leftClickOn(root_focus, id, mouse)) self.requestSync(), │ │637 + .enter => if (self.syncFocused()) try self.requestSync(allocator), │ │638 + .mouse => |mouse| if (self.button_id) |id| if (inp.leftClickOn(root_focus, id, mouse)) try self.requestSync(allocator),│ │639 else => {}, │ │640 } │ │640 - _ = allocator; │ │641 } │ │642 │ │643 - fn requestSync(self: *Header.View) void { │ │643 + fn requestSync(self: *Header.View, allocator: std.mem.Allocator) !void { │ │644 if (!self.session.is_terminal) return; │ │645 if (self.session.host_request != null) return; │ │646 - self.session.host_request = .sync_events; │ │646 const button_id = self.button_id orelse return; │ │647 const child = self.box.children.getPtr(button_id) orelse return; │ │648 const button = switch (child.widget) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │649 .text_box => |*button| button, │ │650 else => return, │ │651 }; │ │653 - button.content = "syncing..."; │ │654 - for (button.box.children.values()) |*line| switch (line.widget) {│ │655 - .text => |*text| text.content = "syncing...", │ │656 - else => {}, │ │657 - }; │ │652 + try button.setContent(allocator, "syncing..."); │ │653 + self.session.host_request = .sync_events; │ │654 } │ │655 │ │656 fn syncFocused(self: *Header.View) bool { │ ╰──────────────────────────────────────────────────────────────────────────────────╯