╭ changed ──────────────────╮ │src/ui/Repo/Discussions.zig│ ╰───────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │14 // how many discussions one window shows before a "next" link appears. │ │15 pub const page_size = 20; │ │16 │ │17 -// how many tags the tags view shows at most. │ │18 -pub const max_tags = 1000; │ │17 +// how many labels the labels view shows at most. │ │18 +pub const max_labels = 1000; │ │19 │ │20 // one discussion from the repo's consumed event database, with its hex event id│ │21 // (the id lives in the event envelope, not the payload). │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │41 }; │ │42 │ │43 identity: []const u8, │ │44 -tag: []const u8, │ │44 +label: []const u8, │ │45 // the decoded query the list is filtered to, or null when unfiltered.│ │46 search: ?[]const u8 = null, │ │47 selected_id: []const u8, │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────╮ │51 recent: Window, │ │52 view: ui.RoutablePage.DiscussionsView,│ │53 description_page: bool = false, │ │54 -tags: []const []const u8, │ │54 +labels: []const []const u8, │ │55 repo_source: ?ui.RepoSource = null, │ │56 │ │57 const Self = @This(); │ ╰──────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 pub const thread_name = "discussion"; │ │63 pub const header_widget_name = "repo_discussions_header"; │ │64 │ │65 -pub fn listRoute(identity: []const u8, _: Status, tag: []const u8, selected: []const u8) ?ui.RoutablePage { │ │66 - return ui.RoutablePage.repoDiscussionsRoute(identity, tag, selected); │ │65 +pub fn listRoute(identity: []const u8, _: Status, label: []const u8, selected: []const u8) ?ui.RoutablePage {│ │66 + return ui.RoutablePage.repoDiscussionsRoute(identity, label, selected); │ │67 } │ │68 │ │69 pub fn selectedThread(self: *const Self) ?*const DiscussionWithId { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────╮ │81 pub fn emptyResult( │ │82 aa: std.mem.Allocator, │ │83 identity: []const u8, │ │84 - tag: []const u8, │ │84 + label: []const u8, │ │85 search: []const u8, │ │86 selected_id: []const u8,│ │87 comment_id: []const u8, │ ╰────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │90 ) !Self { │ │91 return .{ │ │92 .identity = try aa.dupe(u8, identity), │ │93 - .tag = try aa.dupe(u8, tag), │ │93 + .label = try aa.dupe(u8, label), │ │94 .search = if (search.len == 0) null else std.Uri.percentDecodeInPlace(try aa.dupe(u8, search)),│ │95 .selected_id = try aa.dupe(u8, selected_id), │ │96 .comment_id = try aa.dupe(u8, comment_id), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │ 98 .recent = .empty, │ │ 99 .view = if (view == .description) .recent else view,│ │100 .description_page = view == .description, │ │101 - .tags = &.{}, │ │101 + .labels = &.{}, │ │102 }; │ │103 } │ │104 │ ╰─────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │110 io: std.Io, │ │111 admin_moment: ?evt.AdminDB.HashMap(.read_only),│ │112 identity: []const u8, │ │113 - tag: []const u8, │ │113 + label: []const u8, │ │114 search: []const u8, │ │115 selected_id: []const u8, │ │116 comment_id: []const u8, │ ╰────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │117 comments_start: usize, │ │118 view: ui.RoutablePage.DiscussionsView, │ │119 ) !Self { │ │120 - const empty = try emptyResult(arena.allocator(), identity, tag, search, selected_id, comment_id, comments_start, view); │ │120 + const empty = try emptyResult(arena.allocator(), identity, label, search, selected_id, comment_id, comments_start, view);│ │121 const aa = arena.allocator(); │ │122 const DB = evt.EventDB(repo_opts.hash); │ │123 const rooted = empty.selected_id.len != 0; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │124 - const tagged = empty.tag.len != 0; │ │125 - const strict = rooted or tagged; │ │124 + const labeled = empty.label.len != 0; │ │125 + const strict = rooted or labeled; │ │126 │ │127 const gpa = arena.child_allocator; │ │128 var event_db_maybe: ?evt.LocalEventDB(repo_opts.hash) = if (repo_kind == .git) try evt.LocalEventDB(repo_opts.hash).openReadOnly(io, gpa, repo.core.repo_dir) else null;│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯