╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │132 }, │ │133 repo_issues: struct { │ │134 name: Array(repo_route_max_len), │ │135 - // the tag the list is filtered to, url-encoded ("" = unfiltered). │ │136 - tag: Array(issue_tag_route_max_len) = .{}, │ │135 + // the label the list is filtered to, url-encoded ("" = unfiltered). │ │136 + label: Array(issue_label_route_max_len) = .{}, │ │137 // the query the list is filtered to, url-encoded ("" = unfiltered). │ │138 search: Array(search_route_max_len) = .{}, │ │139 // the issue the route names: the list's window root, or the issue the│ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────╮ │152 }, │ │153 repo_patches: struct { │ │154 name: Array(repo_route_max_len), │ │155 - tag: Array(patch_tag_route_max_len) = .{}, │ │155 + label: Array(patch_label_route_max_len) = .{},│ │156 search: Array(search_route_max_len) = .{}, │ │157 selected: Array(evt.event_id_size * 2) = .{}, │ │158 theirs: Array(theirs_route_max_len) = .{}, │ ╰───────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────╮ │162 }, │ │163 repo_discussions: struct { │ │164 name: Array(repo_route_max_len), │ │165 - tag: Array(discussion_tag_route_max_len) = .{}, │ │165 + label: Array(discussion_label_route_max_len) = .{},│ │166 search: Array(search_route_max_len) = .{}, │ │167 selected: Array(evt.event_id_size * 2) = .{}, │ │168 view: DiscussionsView = .recent, │ ╰────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │184 │ │185 pub const RefKind = enum { branch, tag }; │ │186 │ │187 - pub const IssuesView = enum { open, closed, tags, new, edit, description, new_comment, edit_comment, remove, conflicts, resolve }; │ │187 + pub const IssuesView = enum { open, closed, labels, new, edit, description, new_comment, edit_comment, remove, conflicts, resolve }; │ │188 │ │189 - pub const PatchesView = enum { open, closed, merged, tags, new, drafts, edit, publish, merge, description, new_comment, edit_comment, remove, conflicts, resolve }; │ │189 + pub const PatchesView = enum { open, closed, merged, labels, new, drafts, edit, publish, merge, description, new_comment, edit_comment, remove, conflicts, resolve };│ │190 │ │191 - pub const DiscussionsView = enum { recent, tags, new, edit, description, new_comment, edit_comment, remove }; │ │191 + pub const DiscussionsView = enum { recent, labels, new, edit, description, new_comment, edit_comment, remove }; │ │192 │ │193 pub const EventsView = enum { active, removed }; │ │194 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │200 │ │201 // the "key:value" segments of a url tail, collected in any order │ │202 const Params = struct { │ │203 - const ParamKey = enum { start, line, branch, tag, object, base, patchrev, theirs, find, search, from, moment, merge }; │ │203 + const ParamKey = enum { start, line, branch, tag, label, object, base, patchrev, theirs, find, search, from, moment, merge };│ │204 │ │205 // a branch:/tag:/object: param; the value stays url-encoded │ │206 const RefParam = struct { kind: RefOrOid, value: []const u8 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────╮ │281 // ends a commits route naming its commit's full message │ │282 const message_seg = "message"; │ │283 // the `Params` key spellings the url emitters use │ │284 - const tag_filter_seg = @tagName(Params.ParamKey.tag) ++ ":"; │ │284 + const label_filter_seg = @tagName(Params.ParamKey.label) ++ ":";│ │285 const start_seg = @tagName(Params.ParamKey.start) ++ ":"; │ │286 const line_seg = @tagName(Params.ParamKey.line) ++ ":"; │ │287 const find_seg = @tagName(Params.ParamKey.find) ++ ":"; │ ╰─────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │311 return s.len == 0 or s[0] == '/'; │ │312 } │ │313 │ │314 - // a url-encoded tag can grow to three bytes per source byte. │ │315 - pub const issue_tag_route_max_len = evt.Issue.tag_max_len * 3; │ │316 - pub const patch_tag_route_max_len = evt.Patch.tag_max_len * 3; │ │317 - pub const discussion_tag_route_max_len = evt.Discussion.tag_max_len * 3; │ │314 + // a url-encoded label can grow to three bytes per source byte. │ │315 + pub const issue_label_route_max_len = evt.Issue.label_max_len * 3; │ │316 + pub const patch_label_route_max_len = evt.Patch.label_max_len * 3; │ │317 + pub const discussion_label_route_max_len = evt.Discussion.label_max_len * 3;│ │318 │ │319 // caps the resolve view's theirs: field list (a longer one doesn't route). │ │320 pub const theirs_route_max_len = 512; │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │601 return withEncodedSearch(self, search.slice()); │ │602 } │ │603 │ │604 - // the tag and search segments of a thread list url, either one optional │ │605 - fn writeListFilters(writer: *std.Io.Writer, tag: []const u8, search: []const u8) !void { │ │606 - if (tag.len != 0) try writer.print("/" ++ tag_filter_seg ++ "{s}", .{tag}); │ │604 + // the label and search segments of a thread list url, either one optional │ │605 + fn writeListFilters(writer: *std.Io.Writer, label: []const u8, search: []const u8) !void {│ │606 + if (label.len != 0) try writer.print("/" ++ label_filter_seg ++ "{s}", .{label}); │ │607 if (search.len != 0) try writer.print("/" ++ search_seg ++ "{s}", .{search}); │ │608 } │ │609 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │610 // carry the already-encoded list filters a selected thread's url names │ │611 - fn withEncodedFilters(self: ?RoutablePage, tag: []const u8, search: []const u8) ?RoutablePage { │ │611 + fn withEncodedFilters(self: ?RoutablePage, label: []const u8, search: []const u8) ?RoutablePage { │ │612 var route = withEncodedSearch(self, search) orelse return null; │ │613 switch (route) { │ │614 - inline .repo_issues, .repo_patches, .repo_discussions => |*thread| thread.tag = @TypeOf(thread.tag).from(tag) orelse return null, │ │614 + inline .repo_issues, .repo_patches, .repo_discussions => |*thread| thread.label = @TypeOf(thread.label).from(label) orelse return null,│ │615 else => return null, │ │616 } │ │617 return route; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │743 } │ │744 │ │745 // build a `.repo_issues` route for "owner/name" (identity) showing │ │746 - // `status`'s list, filtered to the url-encoded `tag` ("" = unfiltered) and │ │746 + // `status`'s list, filtered to the url-encoded `label` ("" = unfiltered) and │ │747 // rooted at the issue with hex event id `selected` ("" = the first window). │ │748 - pub fn repoIssuesRoute(identity: []const u8, status: evt.Issue.Status, tag: []const u8, selected: []const u8) ?RoutablePage { │ │748 + pub fn repoIssuesRoute(identity: []const u8, status: evt.Issue.Status, label: []const u8, selected: []const u8) ?RoutablePage {│ │749 return .{ .repo_issues = .{ │ │750 .name = Array(repo_route_max_len).from(identity) orelse return null, │ │751 - .tag = Array(issue_tag_route_max_len).from(tag) orelse return null, │ │751 + .label = Array(issue_label_route_max_len).from(label) orelse return null, │ │752 .selected = Array(evt.event_id_size * 2).from(selected) orelse return null, │ │753 .view = switch (status) { │ │754 .open => .open, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯