╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │391 // tags tab, labeled with the active tag filter │ │392 { │ │386 - const tags_route = ui.RoutablePage.repoThreadTagsRoute(.issue, data.identity, data.tag) orelse return error.RouteTooLong; │ │393 + const tags_route = try thread.searchRoute(ui.RoutablePage.repoThreadTagsRoute(.issue, data.identity, data.tag), data.search);│ │394 const tags_link = try ui.inPageTabLink(session, tags_route, page_selected and selected_index == View.viewIndex(.tags)); │ │395 const label = if (data.tag.len == 0) tags_tab_label else blk: { │ │396 const decoded = std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.tag)); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │203 next_id: ?[]const u8, │ │204 // how many patches the listing holds across all windows. │ │205 count: usize, │ │206 + // whether a search stopped counting at its cap, so `count` is a floor. │ │207 + more: bool = false, │ │208 │ │209 pub const empty: Window = .{ .items = &.{}, .prev_id = null, .next_id = null, .count = 0 };│ │210 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │214 default_target_branch: []const u8 = "", │ │215 // the url-encoded tag the lists are filtered to ("" = unfiltered). │ │216 tag: []const u8, │ │217 +// the decoded query the lists are filtered to, or null when unfiltered. │ │218 +search: ?[]const u8 = null, │ │219 // the hex event id of the patch its status's window is rooted at ("" = the│ │220 // first window), mirrored into the url. │ │221 selected_id: []const u8, │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │490 } │ │491 │ │492 // an empty listing, for the wasm / no-repo paths. │ │489 -pub fn emptyResult(aa: std.mem.Allocator, identity: []const u8, tag: []const u8, selected_id: []const u8, comment_id: []const u8, comments_start: usize, theirs_picks: []const u8, view: ui.RoutablePage.PatchesView) !Self { │ │493 +pub fn emptyResult(aa: std.mem.Allocator, identity: []const u8, tag: []const u8, search: []const u8, selected_id: []const u8, comment_id: []const u8, comments_start: usize, theirs_picks: []const u8, view: ui.RoutablePage.PatchesView) !Self {│ │494 return .{ │ │495 .identity = try aa.dupe(u8, identity), │ │496 .default_target_branch = "", │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │497 .tag = try aa.dupe(u8, tag), │ │498 + .search = if (search.len == 0) null else std.Uri.percentDecodeInPlace(try aa.dupe(u8, search)),│ │499 .selected_id = try aa.dupe(u8, selected_id), │ │500 .comment_id = try aa.dupe(u8, comment_id), │ │501 .comments_start = comments_start, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │518 } │ │519 │ │520 pub fn detailResult(aa: std.mem.Allocator, identity: []const u8, entry: PatchWithId) !Self { │ │516 - var result = try emptyResult(aa, identity, "", entry.id, "", 0, "", .open); │ │521 + var result = try emptyResult(aa, identity, "", "", entry.id, "", 0, "", .open); │ │522 const items = try aa.dupe(PatchWithId, &.{entry}); │ │523 const detail_window = Window{ .items = items, .prev_id = null, .next_id = null, .count = 1 };│ │524 if (entry.draft) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────╮ │557 identity: []const u8, │ │558 target_branch: []const u8,│ │559 tag: []const u8, │ │560 + search: []const u8, │ │561 selected_id: []const u8, │ │562 comment_id: []const u8, │ │563 comments_start: usize, │ ╰───────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │565 view: ui.RoutablePage.PatchesView, │ │566 ) !Self { │ │567 const allowed_view: ui.RoutablePage.PatchesView = if (session.local != null and view == .drafts) .open else view; │ │562 - var empty = try emptyResult(arena.allocator(), identity, tag, selected_id, comment_id, comments_start, theirs_picks, allowed_view); │ │568 + var empty = try emptyResult(arena.allocator(), identity, tag, search, selected_id, comment_id, comments_start, theirs_picks, allowed_view);│ │569 empty.default_target_branch = try arena.allocator().dupe(u8, target_branch); │ │570 │ │571 const aa = arena.allocator(); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │705 } │ │706 } │ │707 const thread_comments_start = if (empty.comment_id.len == 0) comments_start else 0; │ │702 - var open_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start); │ │703 - var closed_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start); │ │704 - var merged_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, merged_set, merged_root, conflict_set, empty.selected_id, thread_comments_start); │ │705 - var conflicts_window = try thread.loadWindow(Self, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start); │ │708 + var open_window = try thread.loadWindow(Self, .patch, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, open_set, open_root, conflict_set, empty.selected_id, thread_comments_start, empty.search); │ │709 + var closed_window = try thread.loadWindow(Self, .patch, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, closed_set, closed_root, conflict_set, empty.selected_id, thread_comments_start, empty.search);│ │710 + var merged_window = try thread.loadWindow(Self, .patch, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, merged_set, merged_root, conflict_set, empty.selected_id, thread_comments_start, empty.search);│ │711 + var conflicts_window = try thread.loadWindow(Self, .patch, repo_opts.hash, arena, admin_moment, haxy_moment, event_id_to_patch, conflict_set, conflicts_root, conflict_set, empty.selected_id, thread_comments_start, null);│ │712 try setPatchDetails(repo_kind, repo_opts, io, arena, admin_moment, haxy_moment, repo, &open_window); │ │713 try setPatchDetails(repo_kind, repo_opts, io, arena, admin_moment, haxy_moment, repo, &closed_window); │ │714 try setPatchDetails(repo_kind, repo_opts, io, arena, admin_moment, haxy_moment, repo, &merged_window); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │726 .identity = empty.identity, │ │727 .default_target_branch = empty.default_target_branch,│ │728 .tag = empty.tag, │ │729 + .search = empty.search, │ │730 .selected_id = empty.selected_id, │ │731 .comment_id = empty.comment_id, │ │732 .comments_start = comments_start, │ ╰──────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯