╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │797 return route; │ │798 } │ │799 │ │800 - pub fn repoDiscussionsRoute(identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage { │ │800 + pub fn repoDiscussionsRoute(identity: []const u8, label: []const u8, selected: []const u8) ?RoutablePage {│ │801 return .{ .repo_discussions = .{ │ │802 .name = Array(repo_route_max_len).from(identity) orelse return null, │ │803 - .tag = Array(discussion_tag_route_max_len).from(tag) orelse return null, │ │803 + .label = Array(discussion_label_route_max_len).from(label) orelse return null, │ │804 .selected = Array(evt.event_id_size * 2).from(selected) orelse return null, │ │805 } }; │ │806 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │807 │ │808 // build the default list route for a thread event kind. │ │809 - pub fn repoThreadRoute(kind: evt.EventKind, identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage { │ │809 + pub fn repoThreadRoute(kind: evt.EventKind, identity: []const u8, label: []const u8, selected: []const u8) ?RoutablePage {│ │810 return switch (kind) { │ │811 - .issue => repoIssuesRoute(identity, .open, tag, selected), │ │812 - .patch => repoPatchesRoute(identity, .open, tag, selected), │ │813 - .discuss => repoDiscussionsRoute(identity, tag, selected), │ │811 + .issue => repoIssuesRoute(identity, .open, label, selected), │ │812 + .patch => repoPatchesRoute(identity, .open, label, selected), │ │813 + .discuss => repoDiscussionsRoute(identity, label, selected), │ │814 else => null, │ │815 }; │ │816 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │891 return route; │ │892 } │ │893 │ │894 - // build a thread tags route, keeping its url-encoded tag filter. │ │895 - pub fn repoThreadTagsRoute(kind: evt.EventKind, identity: []const u8, tag: []const u8) ?RoutablePage { │ │896 - var route = repoThreadRoute(kind, identity, tag, "") orelse return null; │ │894 + // build a thread labels route, keeping its url-encoded label filter. │ │895 + pub fn repoThreadLabelsRoute(kind: evt.EventKind, identity: []const u8, label: []const u8) ?RoutablePage {│ │896 + var route = repoThreadRoute(kind, identity, label, "") orelse return null; │ │897 switch (route) { │ │898 - .repo_issues => |*thread| thread.view = .tags, │ │899 - .repo_patches => |*thread| thread.view = .tags, │ │900 - .repo_discussions => |*thread| thread.view = .tags, │ │898 + .repo_issues => |*thread| thread.view = .labels, │ │899 + .repo_patches => |*thread| thread.view = .labels, │ │900 + .repo_discussions => |*thread| thread.view = .labels, │ │901 else => unreachable, │ │902 } │ │903 return route; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1105 try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, i.selected.slice(), i.comment.slice(), i.comments_start });│ │1106 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1107 // the list the thread is selected in stays filtered, so paging │ │1108 - // and reloading keep the tag and the query │ │1108 + // and reloading keep the label and the query │ │1109 if (i.selected.len != 0) { │ │1110 try out.writer.print("{s}/" ++ issue_seg ++ "{s}", .{ prefix, i.selected.slice() }); │ │1111 - try writeListFilters(&out.writer, i.tag.slice(), i.search.slice()); │ │1111 + try writeListFilters(&out.writer, i.label.slice(), i.search.slice()); │ │1112 if (i.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{i.comments_start}); │ │1113 break :blk out.written(); │ │1114 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │1115 try out.writer.print("{s}/issues/{s}", .{ prefix, @tagName(i.view) });│ │1116 - try writeListFilters(&out.writer, i.tag.slice(), i.search.slice()); │ │1116 + try writeListFilters(&out.writer, i.label.slice(), i.search.slice()); │ │1117 break :blk out.written(); │ │1118 }, │ │1119 .repo_patches => |p| blk: { │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1145 try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, p.selected.slice(), p.comment.slice(), p.comments_start });│ │1146 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1147 // the list the thread is selected in stays filtered, so paging │ │1148 - // and reloading keep the tag and the query │ │1148 + // and reloading keep the label and the query │ │1149 if (p.selected.len != 0) { │ │1150 try out.writer.print("{s}/" ++ patch_seg ++ "{s}", .{ prefix, p.selected.slice() }); │ │1151 - try writeListFilters(&out.writer, p.tag.slice(), p.search.slice()); │ │1151 + try writeListFilters(&out.writer, p.label.slice(), p.search.slice()); │ │1152 if (p.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{p.comments_start}); │ │1153 break :blk out.written(); │ │1154 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │1155 try out.writer.print("{s}/patches/{s}", .{ prefix, @tagName(p.view) });│ │1156 - try writeListFilters(&out.writer, p.tag.slice(), p.search.slice()); │ │1156 + try writeListFilters(&out.writer, p.label.slice(), p.search.slice()); │ │1157 break :blk out.written(); │ │1158 }, │ │1159 .repo_discussions => |t| blk: { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1175 try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start });│ │1176 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1177 // the list the thread is selected in stays filtered, so paging │ │1178 - // and reloading keep the tag and the query │ │1178 + // and reloading keep the label and the query │ │1179 if (t.selected.len != 0) { │ │1180 try out.writer.print("{s}/" ++ discuss_seg ++ "{s}", .{ prefix, t.selected.slice() }); │ │1181 - try writeListFilters(&out.writer, t.tag.slice(), t.search.slice()); │ │1181 + try writeListFilters(&out.writer, t.label.slice(), t.search.slice()); │ │1182 if (t.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{t.comments_start}); │ │1183 break :blk out.written(); │ │1184 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │1185 try out.writer.print("{s}/discussions/{s}", .{ prefix, @tagName(t.view) });│ │1186 - try writeListFilters(&out.writer, t.tag.slice(), t.search.slice()); │ │1186 + try writeListFilters(&out.writer, t.label.slice(), t.search.slice()); │ │1187 break :blk out.written(); │ │1188 }, │ │1189 .repo_undo => |u| blk: { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1474 } │ │1475 return null; │ │1476 } │ │1477 - if (!params.only(&.{ .start, .tag, .search })) return null; │ │1478 - return withEncodedFilters(repoThreadCommentsRoute(.issue, pair, issue_id, params.start() orelse return null), params.values.get(.tag) orelse "", params.values.get(.search) orelse ""); │ │1477 + if (!params.only(&.{ .start, .label, .search })) return null; │ │1478 + return withEncodedFilters(repoThreadCommentsRoute(.issue, pair, issue_id, params.start() orelse return null), params.values.get(.label) orelse "", params.values.get(.search) orelse "");│ │1479 } │ │1480 if (std.mem.startsWith(u8, tab, patch_seg)) { │ │1481 const patch_id = tab[patch_seg.len..]; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯