╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 │ │63 const aa = session.page_arena.allocator(); │ │64 const fork_identity = try aa.print("{s}:{s}", .{ data.forker_name, data.name }); │ │65 - const commits_label = if (commit_count) |count| try aa.print(commits_tab_label ++ " ({d})", .{count}) else commits_tab_label;│ │65 var first_group_width = try data.title.width(); │ │66 │ │67 try ui.widget.addBackButton(allocator, &title_box, session); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │103 ui.RoutablePage.forkCommitsRoute(fork_identity, data.id, data.oid) orelse return error.RouteTooLong, │ │104 }; │ │105 const tags = [_]std.meta.Tag(ui.RoutablePage){ .fork_patch, .fork_diff, .fork_files, .fork_commits }; │ │107 - const labels = [_][]const u8{ patch_tab_label, diff_tab_label, files_tab_label, commits_label }; │ │108 - // a single commit's diff names the commit under its tab │ │106 + const labels = [_][]const u8{ patch_tab_label, diff_tab_label, files_tab_label, commits_tab_label }; │ │107 + // a single commit's diff names the commit under its tab, and commits │ │108 + // shows its count there │ │109 const bottom_labels = [_][]const u8{ "", switch (session.data.current_page) { │ │110 .fork_diff => |*d| if (d.oid.len == 0) "" else try ui.clippedBottomLabel(try aa.alloc(u8, ui.clipped_bottom_label_max_len), d.oid.slice()),│ │111 else => "", │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │112 - }, "", "" }; │ │112 + }, "", if (commit_count) |count| try aa.print("({d})", .{count}) else "" }; │ │113 var selected_tab: ?usize = null; │ │114 │ │115 for (routes, tags, labels, bottom_labels) |route, tag, label, bottom_label| {│ ╰──────────────────────────────────────────────────────────────────────────────────────────╯