╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │107 patch_data.repo_source = target_source; │ │108 }, │ │109 .publish => { │ │110 - patch_data = Patches.init(.xit, repo_opts, arena, target_repo, io, haxy_moment, session, target_id, target_identity, target_branch, "", "", &id_hex, "", 0, "", .open, handle.viewer) catch |err| switch (err) {│ │110 + patch_data = Patches.init(.xit, repo_opts, arena, target_repo, io, haxy_moment, session, target_id, target_identity, target_branch, "", &id_hex, "", 0, "", .open, handle.viewer) catch |err| switch (err) { │ │111 error.NotFound => patch_data, │ │112 else => |other| return other, │ │113 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────╮ │126 .repo_refs => |*r| r.search.slice(), │ │127 else => "", │ │128 }; │ │129 - const discussions_label: []const u8 = switch (route) { │ │130 - .repo_discussions => |*t| t.label.slice(), │ │131 - else => "", │ │132 - }; │ │129 const discussions_search: []const u8 = switch (route) {│ │130 .repo_discussions => |*t| t.search.slice(), │ │131 else => "", │ ╰────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │146 .repo_discussions => |t| t.comments_start, │ │147 else => 0, │ │148 }; │ │153 - // the issues tab's label filter, the issue its window is rooted at, and the│ │154 - // view it shows. │ │155 - const issues_label: []const u8 = switch (route) { │ │156 - .repo_issues => |*i| i.label.slice(), │ │157 - else => "", │ │158 - }; │ │159 - const issues_assignee: []const u8 = switch (route) { │ │160 - .repo_issues => |*i| i.assignee.slice(), │ │161 - else => "", │ │162 - }; │ │149 + // the issues tab's search, the issue its window is rooted at, and the view │ │150 + // it shows. │ │151 const issues_search: []const u8 = switch (route) { │ │152 .repo_issues => |*i| i.search.slice(), │ │153 else => "", │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │171 const issues_comments_start: usize = switch (route) {│ │172 .repo_issues => |i| i.comments_start, │ │173 else => 0, │ │186 - }; │ │187 - const patches_label: []const u8 = switch (route) { │ │188 - .repo_patches => |*p| p.label.slice(), │ │189 - else => "", │ │174 }; │ │175 const patches_search: []const u8 = switch (route) { │ │176 .repo_patches => |*p| p.search.slice(), │ ╰──────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │351 break :diff .{ .diff = try Diff.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, diff_route.repo_diff) }; │ │352 } else .{ .commits = try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, handle, ref_or_oid, ref_value, commits_message, base_oid, commits_search, commits_from) }; │ │353 const target_branch = if (files_data.ref_or_oid == .branch) files_data.ref_or_oid_value else ""; │ │370 - var discussions_data = try Discussions.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, discussions_label, discussions_search, discussions_selected, discussions_comment, discussions_comments_start, discussions_view, tabViewer(handle, repo, .discuss)); │ │371 - var issues_data = try Issues.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, issues_label, issues_assignee, issues_search, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view, tabViewer(handle, repo, .issue)); │ │372 - var patches_data = try Patches.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, session, repo_id_maybe, repo_identity.identity, target_branch, patches_label, patches_search, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view, tabViewer(handle, repo, .patch));│ │354 + var discussions_data = try Discussions.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, discussions_search, discussions_selected, discussions_comment, discussions_comments_start, discussions_view, tabViewer(handle, repo, .discuss)); │ │355 + var issues_data = try Issues.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, issues_search, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view, tabViewer(handle, repo, .issue)); │ │356 + var patches_data = try Patches.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, session, repo_id_maybe, repo_identity.identity, target_branch, patches_search, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view, tabViewer(handle, repo, .patch)); │ │357 if (repo_kind == .xit and session.data.host_kind == .server) { │ │358 // a server page always resolved its repo id │ │359 const repo_id = repo_id_maybe orelse unreachable; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │380 try Files.emptyResult(aa, handle, requested_ref_or_oid orelse .branch, requested_ref_value, files_dir), │ │381 Changes{ .commits = try Commits.emptyResult(aa, handle, requested_ref_or_oid orelse .branch, requested_ref_value, commits_base_oid) }, │ │382 try Refs.emptyResult(arena, repo_identity.identity, refs_kind, refs_from, refs_search), │ │399 - try Discussions.emptyResult(aa, repo_identity.identity, discussions_label, discussions_search, discussions_selected, discussions_comment, discussions_comments_start, discussions_view),│ │400 - try Issues.emptyResult(aa, repo_identity.identity, issues_label, issues_assignee, issues_search, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view), │ │401 - try Patches.emptyResult(aa, repo_identity.identity, patches_label, patches_search, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view), │ │383 + try Discussions.emptyResult(aa, repo_identity.identity, discussions_search, discussions_selected, discussions_comment, discussions_comments_start, discussions_view), │ │384 + try Issues.emptyResult(aa, repo_identity.identity, issues_search, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view), │ │385 + try Patches.emptyResult(aa, repo_identity.identity, patches_search, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view), │ │386 try Events.empty(aa, repo_identity.identity, events_view, session.local != null, session.data.sync_failure), │ │387 }; │ │388 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │396 │ │397 return .{ │ │398 // use the files tab's resolved ref for the header │ │415 - .header = try Header.init(arena, repo.event.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, discussions.label, issues.label, patches.label), │ │399 + .header = try Header.init(arena, repo.event.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, discussions.search, issues.search, patches.search),│ │400 .repo = repo, │ │401 .handle = handle, │ │402 .files = files, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────────╮ │src/ui/Repo/Discussions.zig│ ╰───────────────────────────╯ ╭─────────────────────────────────────────────────────────╮ │ 8 const Comment = @import("Comment.zig"); │ │ 9 const Attachment = @import("Attachment.zig"); │ │10 const thread = ui.widget.thread; │ │11 +const srch_thrd = @import("../../search_thread.zig");│ │12 │ │13 const wasm = builtin.target.cpu.arch == .wasm32; │ │14 │ ╰─────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │47 }; │ │48 │ │49 identity: []const u8, │ │49 -label: []const u8, │ │50 // the decoded query the list is filtered to, or null when unfiltered.│ │51 search: ?[]const u8 = null, │ │52 selected_id: []const u8, │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │69 pub const thread_name = "discussion"; │ │70 pub const header_widget_name = "repo_discussions_header"; │ │71 │ │72 -pub fn listRoute(identity: []const u8, _: Status, label: []const u8, selected: []const u8) ?ui.RoutablePage {│ │73 - return ui.RoutablePage.repoDiscussionsRoute(identity, label, selected); │ │72 +pub fn listRoute(identity: []const u8, _: Status, selected: []const u8) ?ui.RoutablePage { │ │73 + return ui.RoutablePage.repoDiscussionsRoute(identity, selected); │ │74 } │ │75 │ │76 pub fn selectedThread(self: *const Self) ?*const DiscussionWithId { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯