╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │15 // how many issues one window shows before a "next" link appears. │ │16 pub const page_size = 20; │ │17 │ │18 -// how many tags the tags view shows at most. │ │19 -pub const max_tags = 1000; │ │18 +// how many labels the labels view shows at most. │ │19 +pub const max_labels = 1000; │ │20 │ │21 // one issue from the repo's consumed event database, with its hex event id│ │22 // (the id lives in the event envelope, not the payload). │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │48 // record; the chunks split the description against the merge base.│ │49 pub const Conflict = struct { │ │50 title: ?FieldConflict = null, │ │51 - tags: ?FieldConflict = null, │ │51 + labels: ?FieldConflict = null, │ │52 description: ?struct { │ │53 chunks: []const diff3.Chunk, │ │54 ours_author: ui.Author = .unknown, │ ╰───────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │75 │ │76 // "owner/name", so the view can build /repo/owner/name/issues/... links. │ │77 identity: []const u8, │ │78 -// the url-encoded tag the lists are filtered to ("" = unfiltered). │ │79 -tag: []const u8, │ │78 +// the url-encoded label the lists are filtered to ("" = unfiltered). │ │79 +label: []const u8, │ │80 // the decoded query the lists are filtered to, or null when unfiltered. │ │81 search: ?[]const u8 = null, │ │82 // the hex event id of the issue its status's window is rooted at ("" = the│ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │102 // the /description page: the detail pane shows the selected issue's whole│ │103 // description behind a back link. │ │104 description_page: bool = false, │ │105 -// every tag in the repo, in sorted order, for the tags view. │ │106 -tags: []const []const u8, │ │105 +// every label in the repo, in sorted order, for the labels view. │ │106 +labels: []const []const u8, │ │107 // the on-disk repo this page was read from, for the terminal submit path │ │108 // (the web posts the new-issue form to the issue route instead). │ │109 repo_source: ?ui.RepoSource = null, │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │120 return event.status; │ │121 } │ │122 │ │123 -pub fn listRoute(identity: []const u8, status: Status, tag: []const u8, selected: []const u8) ?ui.RoutablePage { │ │124 - return ui.RoutablePage.repoIssuesRoute(identity, status, tag, selected); │ │123 +pub fn listRoute(identity: []const u8, status: Status, label: []const u8, selected: []const u8) ?ui.RoutablePage {│ │124 + return ui.RoutablePage.repoIssuesRoute(identity, status, label, selected); │ │125 } │ │126 │ │127 pub fn conflictsRoute(identity: []const u8, selected: []const u8) ?ui.RoutablePage { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │162 } │ │163 │ │164 // an empty listing, for the wasm / no-repo paths. │ │165 -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.IssuesView) !Self { │ │165 +pub fn emptyResult(aa: std.mem.Allocator, identity: []const u8, label: []const u8, search: []const u8, selected_id: []const u8, comment_id: []const u8, comments_start: usize, theirs_picks: []const u8, view: ui.RoutablePage.IssuesView) !Self {│ │166 return .{ │ │167 .identity = try aa.dupe(u8, identity), │ │168 - .tag = try aa.dupe(u8, tag), │ │168 + .label = try aa.dupe(u8, label), │ │169 .search = if (search.len == 0) null else std.Uri.percentDecodeInPlace(try aa.dupe(u8, search)), │ │170 .selected_id = try aa.dupe(u8, selected_id), │ │171 .comment_id = try aa.dupe(u8, comment_id), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │182 else => view, │ │183 }, │ │184 .description_page = view == .description,│ │185 - .tags = &.{}, │ │185 + .labels = &.{}, │ │186 }; │ │187 } │ │188 │ ╰──────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │189 -// read one window per status of an opened repo's issues (filtered to `tag` │ │189 +// read one window per status of an opened repo's issues (filtered to `label` │ │190 // when set), ordered by creation (newest first). the window of the issue │ │191 // `selected_id` names starts at it ("" = the beginning). a git repo reads the│ │192 // event db next to it (synced from the events branch on each page build); a │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │201 // in local mode, which has no users) │ │202 admin_moment: ?evt.AdminDB.HashMap(.read_only),│ │203 identity: []const u8, │ │204 - tag: []const u8, │ │204 + label: []const u8, │ │205 search: []const u8, │ │206 selected_id: []const u8, │ │207 comment_id: []const u8, │ ╰────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │209 theirs_picks: []const u8, │ │210 view: ui.RoutablePage.IssuesView, │ │211 ) !Self { │ │212 - const empty = try emptyResult(arena.allocator(), identity, tag, search, selected_id, comment_id, comments_start, theirs_picks, view); │ │212 + const empty = try emptyResult(arena.allocator(), identity, label, search, selected_id, comment_id, comments_start, theirs_picks, view);│ │213 │ │214 const aa = arena.allocator(); │ │215 const DB = evt.EventDB(repo_opts.hash); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯