╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │ 951 │ │ 952 // build a new-thread form route. │ │ 953 pub fn repoThreadNewRoute(kind: evt.EventKind, identity: []const u8) ?RoutablePage {│ │1001 - var route = repoThreadRoute(kind, identity, "", "") orelse return null; │ │ 954 + var route = repoThreadRoute(kind, identity, "") orelse return null; │ │ 955 switch (route) { │ │ 956 .repo_issues => |*thread| thread.view = .new, │ │ 957 .repo_patches => |*thread| thread.view = .new, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 964 // build the edit form route for a thread. │ │ 965 pub fn repoThreadEditRoute(kind: evt.EventKind, identity: []const u8, selected: []const u8) ?RoutablePage {│ │ 966 if (selected.len == 0) return null; │ │1014 - var route = repoThreadRoute(kind, identity, "", selected) orelse return null; │ │ 967 + var route = repoThreadRoute(kind, identity, selected) orelse return null; │ │ 968 switch (route) { │ │ 969 .repo_issues => |*thread| thread.view = .edit, │ │ 970 .repo_patches => |*thread| thread.view = .edit, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 977 // build a route showing a thread's whole description. │ │ 978 pub fn repoThreadDescriptionRoute(kind: evt.EventKind, identity: []const u8, selected: []const u8) ?RoutablePage {│ │ 979 if (selected.len == 0) return null; │ │1027 - var route = repoThreadRoute(kind, identity, "", selected) orelse return null; │ │ 980 + var route = repoThreadRoute(kind, identity, selected) orelse return null; │ │ 981 switch (route) { │ │ 982 .repo_issues => |*thread| thread.view = .description, │ │ 983 .repo_patches => |*thread| thread.view = .description, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1155 try arena.allocator().print("{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, i.selected.slice(), i.comment.slice(), i.comments_start });│ │1156 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1157 // the list the thread is selected in stays filtered, so paging │ │1205 - // and reloading keep the label and the query │ │1158 + // and reloading keep the query │ │1159 if (i.selected.len != 0) { │ │1160 try out.writer.print("{s}/" ++ issue_seg ++ "{s}", .{ prefix, i.selected.slice() }); │ │1208 - try writeListFilters(&out.writer, i.label.slice(), i.assignee.slice(), i.search.slice()); │ │1161 + if (i.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{i.search.slice()}); │ │1162 if (i.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{i.comments_start}); │ │1163 break :blk out.written(); │ │1164 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1165 try out.writer.print("{s}/issues/{s}", .{ prefix, @tagName(i.view) }); │ │1213 - try writeListFilters(&out.writer, i.label.slice(), i.assignee.slice(), i.search.slice()); │ │1166 + if (i.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{i.search.slice()});│ │1167 break :blk out.written(); │ │1168 }, │ │1169 .repo_patches => |p| blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1195 try arena.allocator().print("{s}/" ++ patch_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, p.selected.slice(), p.comment.slice(), p.comments_start });│ │1196 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1197 // the list the thread is selected in stays filtered, so paging │ │1245 - // and reloading keep the label and the query │ │1198 + // and reloading keep the query │ │1199 if (p.selected.len != 0) { │ │1200 try out.writer.print("{s}/" ++ patch_seg ++ "{s}", .{ prefix, p.selected.slice() }); │ │1248 - try writeListFilters(&out.writer, p.label.slice(), "", p.search.slice()); │ │1201 + if (p.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{p.search.slice()}); │ │1202 if (p.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{p.comments_start}); │ │1203 break :blk out.written(); │ │1204 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1205 try out.writer.print("{s}/patches/{s}", .{ prefix, @tagName(p.view) }); │ │1253 - try writeListFilters(&out.writer, p.label.slice(), "", p.search.slice()); │ │1206 + if (p.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{p.search.slice()});│ │1207 break :blk out.written(); │ │1208 }, │ │1209 .repo_discussions => |t| blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1225 try arena.allocator().print("{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start });│ │1226 var out: std.Io.Writer.Allocating = .init(arena.allocator()); │ │1227 // the list the thread is selected in stays filtered, so paging │ │1275 - // and reloading keep the label and the query │ │1228 + // and reloading keep the query │ │1229 if (t.selected.len != 0) { │ │1230 try out.writer.print("{s}/" ++ discuss_seg ++ "{s}", .{ prefix, t.selected.slice() }); │ │1278 - try writeListFilters(&out.writer, t.label.slice(), "", t.search.slice()); │ │1231 + if (t.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{t.search.slice()}); │ │1232 if (t.comments_start != 0) try out.writer.print("/" ++ start_seg ++ "{d}", .{t.comments_start}); │ │1233 break :blk out.written(); │ │1234 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1235 try out.writer.print("{s}/discussions/{s}", .{ prefix, @tagName(t.view) }); │ │1283 - try writeListFilters(&out.writer, t.label.slice(), "", t.search.slice()); │ │1236 + if (t.search.len != 0) try out.writer.print("/" ++ search_seg ++ "{s}", .{t.search.slice()});│ │1237 break :blk out.written(); │ │1238 }, │ │1239 .repo_undo => |u| blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1598 } │ │1599 return null; │ │1600 } │ │1648 - if (!params.only(&.{ .start, .label, .assignee, .search })) return null; │ │1649 - return withEncodedAssignee(withEncodedFilters(repoThreadCommentsRoute(.issue, pair, issue_id, params.start() orelse return null), params.values.get(.label) orelse "", params.values.get(.search) orelse ""), params.values.get(.assignee) orelse "");│ │1601 + if (!params.only(&.{ .start, .search })) return null; │ │1602 + return withEncodedSearch(repoThreadCommentsRoute(.issue, pair, issue_id, params.start() orelse return null), params.values.get(.search) orelse ""); │ │1603 } │ │1604 if (std.mem.startsWith(u8, tab, patch_seg)) { │ │1605 const patch_id = tab[patch_seg.len..]; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯