╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1005 for ([_]Status{ .open, .closed, .merged }, status_labels, 0..) |status, status_label, index| { │ │1006 const route = try thread.searchRoute(ui.RoutablePage.repoPatchesRoute(data.identity, status, ""), data.search);│ │1007 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == index); │ │1008 - var label_buf: [64]u8 = undefined; │ │1009 - const label = try thread.countLabel(&label_buf, status_label, data.window(status).*); │ │1010 - try header.addTab(allocator, label, link, index); │ │1008 + try header.addTab(allocator, status_label, try thread.countLabel(session, data.window(status).*), link, index);│ │1009 } │ │1010 │ │1011 // labels tab │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1012 { │ │1013 const labels_route = try thread.searchRoute(ui.RoutablePage.repoThreadLabelsRoute(.patch, data.identity), data.search); │ │1014 const labels_link = try ui.inPageTabLink(session, labels_route, page_selected and selected_index == View.viewIndex(.labels));│ │1017 - try header.addTab(allocator, labels_tab_label, labels_link, View.viewIndex(.labels)); │ │1015 + try header.addTab(allocator, labels_tab_label, "", labels_link, View.viewIndex(.labels)); │ │1016 } │ │1017 │ │1018 // new-patch tab; an edit or resolve url shows its tab in this place │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │1038 .resolve => resolve_tab_label, │ │1039 else => new_tab_label, │ │1040 }; │ │1043 - try header.addTab(allocator, label, link, View.viewIndex(.new)); │ │1041 + try header.addTab(allocator, label, "", link, View.viewIndex(.new));│ │1042 } │ │1043 │ │1044 // drafts belong to the logged-in user and are not available locally │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1045 if (session.data.host_kind != .local) { │ │1046 const route = ui.RoutablePage.repoPatchesDraftsRoute(data.identity) orelse return error.RouteTooLong; │ │1047 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.drafts)); │ │1050 - var label_buf: [64]u8 = undefined; │ │1051 - const label = try std.fmt.bufPrint(&label_buf, drafts_tab_label ++ " ({d})", .{data.drafts.count}); │ │1052 - try header.addTab(allocator, label, link, View.viewIndex(.drafts)); │ │1048 + try header.addTab(allocator, drafts_tab_label, try session.page_arena.allocator().print("({d})", .{data.drafts.count}), link, View.viewIndex(.drafts));│ │1049 } │ │1050 │ │1051 // conflicts tab, labeled with the conflict count │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1052 if (data.conflicts.count > 0) { │ │1053 const route = ui.RoutablePage.repoPatchesConflictsRoute(data.identity, "") orelse return error.RouteTooLong; │ │1054 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.conflicts)); │ │1059 - var label_buf: [64]u8 = undefined; │ │1060 - const label = try std.fmt.bufPrint(&label_buf, conflicts_tab_label ++ " ({d})", .{data.conflicts.count}); │ │1061 - try header.addTab(allocator, label, link, View.viewIndex(.conflicts)); │ │1055 + try header.addTab(allocator, conflicts_tab_label, try session.page_arena.allocator().print("({d})", .{data.conflicts.count}), link, View.viewIndex(.conflicts));│ │1056 } │ │1057 │ │1058 header.select(View.viewIndex(data.view)); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯