╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │216 const line_seg = @tagName(Params.ParamKey.line) ++ ":"; │ │217 const theirs_seg = @tagName(Params.ParamKey.theirs) ++ ":"; │ │218 const issue_seg = "issue:"; │ │219 - const discussion_seg = "discussion:"; │ │219 + const discuss_seg = "discuss:"; │ │220 const comment_seg = "comment:"; │ │221 // marks a files or commits route's trailing path: the value is the raw│ │222 // remainder of the url, so it must come last │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │399 pub fn repoThreadRoute(kind: evt.EventKind, identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage {│ │400 return switch (kind) { │ │401 .issue => repoIssuesRoute(identity, .open, tag, selected), │ │402 - .discussion => repoDiscussionsRoute(identity, tag, selected), │ │402 + .discuss => repoDiscussionsRoute(identity, tag, selected), │ │403 else => null, │ │404 }; │ │405 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │652 }, │ │653 .repo_discussions => |t| blk: { │ │654 const prefix = try repoUrlPrefix(arena, t.name.slice()); │ │655 - if (t.view == .edit) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/edit", .{ prefix, t.selected.slice() }); │ │656 - if (t.view == .description) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/description", .{ prefix, t.selected.slice() }); │ │655 + if (t.view == .edit) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/edit", .{ prefix, t.selected.slice() }); │ │656 + if (t.view == .description) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/description", .{ prefix, t.selected.slice() }); │ │657 if (t.view == .new_comment) break :blk if (t.comment.len == 0) │ │658 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/new", .{ prefix, t.selected.slice() }) │ │658 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/new", .{ prefix, t.selected.slice() }) │ │659 else │ │660 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │661 - if (t.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, t.selected.slice(), t.comment.slice() });│ │660 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │661 + if (t.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │662 if (t.view == .remove) break :blk if (t.comment.len == 0) │ │663 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/remove", .{ prefix, t.selected.slice() }) │ │663 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/remove", .{ prefix, t.selected.slice() }) │ │664 else │ │665 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │665 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/remove", .{ prefix, t.selected.slice(), t.comment.slice() }); │ │666 if (t.comment.len != 0) break :blk if (t.comments_start == 0) │ │667 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, t.selected.slice(), t.comment.slice() }) │ │667 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}", .{ prefix, t.selected.slice(), t.comment.slice() }) │ │668 else │ │669 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start });│ │669 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ comment_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comment.slice(), t.comments_start }); │ │670 if (t.selected.len != 0) break :blk if (t.comments_start == 0) │ │671 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}", .{ prefix, t.selected.slice() }) │ │671 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}", .{ prefix, t.selected.slice() }) │ │672 else │ │673 - try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discussion_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comments_start }); │ │673 + try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ discuss_seg ++ "{s}/" ++ start_seg ++ "{d}", .{ prefix, t.selected.slice(), t.comments_start }); │ │674 break :blk if (t.tag.len == 0) │ │675 try std.fmt.allocPrint(arena.allocator(), "{s}/discussions/{s}", .{ prefix, @tagName(t.view) }) │ │676 else │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │855 if (!params.only(&.{.start})) return null; │ │856 return repoThreadCommentsRoute(.issue, pair, issue_id, params.start() orelse return null);│ │857 } │ │858 - if (std.mem.startsWith(u8, tab, discussion_seg)) { │ │859 - const discussion_id = tab[discussion_seg.len..]; │ │858 + if (std.mem.startsWith(u8, tab, discuss_seg)) { │ │859 + const discussion_id = tab[discuss_seg.len..]; │ │860 if (discussion_id.len == 0) return null; │ │861 if (segments.peek()) |tail| { │ │862 if (std.mem.startsWith(u8, tail, comment_seg)) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │866 const word = params.scanTail(&segments) catch return null; │ │867 if (word) |last| { │ │868 if (!params.only(&.{})) return null; │ │869 - if (std.mem.eql(u8, last, "new")) return repoThreadCommentNewRoute(.discussion, pair, discussion_id, comment_id); │ │870 - if (std.mem.eql(u8, last, "edit")) return repoThreadCommentEditRoute(.discussion, pair, discussion_id, comment_id);│ │871 - if (std.mem.eql(u8, last, "remove")) return repoThreadRemoveRoute(.discussion, pair, discussion_id, comment_id); │ │869 + if (std.mem.eql(u8, last, "new")) return repoThreadCommentNewRoute(.discuss, pair, discussion_id, comment_id); │ │870 + if (std.mem.eql(u8, last, "edit")) return repoThreadCommentEditRoute(.discuss, pair, discussion_id, comment_id); │ │871 + if (std.mem.eql(u8, last, "remove")) return repoThreadRemoveRoute(.discuss, pair, discussion_id, comment_id); │ │872 return null; │ │873 } │ │874 if (!params.only(&.{.start})) return null; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │875 - return repoThreadCommentRoute(.discussion, pair, discussion_id, comment_id, params.start() orelse return null);│ │875 + return repoThreadCommentRoute(.discuss, pair, discussion_id, comment_id, params.start() orelse return null); │ │876 } │ │877 } │ │878 const word = params.scanTail(&segments) catch return null; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │879 if (word) |tail| { │ │880 - if (std.mem.eql(u8, tail, "new")) return if (params.only(&.{})) repoThreadCommentNewRoute(.discussion, pair, discussion_id, "") else null; │ │881 - if (std.mem.eql(u8, tail, "edit")) return if (params.only(&.{})) repoThreadEditRoute(.discussion, pair, discussion_id) else null; │ │882 - if (std.mem.eql(u8, tail, "remove")) return if (params.only(&.{})) repoThreadRemoveRoute(.discussion, pair, discussion_id, "") else null; │ │883 - if (std.mem.eql(u8, tail, "description")) return if (params.only(&.{})) repoThreadDescriptionRoute(.discussion, pair, discussion_id) else null;│ │880 + if (std.mem.eql(u8, tail, "new")) return if (params.only(&.{})) repoThreadCommentNewRoute(.discuss, pair, discussion_id, "") else null; │ │881 + if (std.mem.eql(u8, tail, "edit")) return if (params.only(&.{})) repoThreadEditRoute(.discuss, pair, discussion_id) else null; │ │882 + if (std.mem.eql(u8, tail, "remove")) return if (params.only(&.{})) repoThreadRemoveRoute(.discuss, pair, discussion_id, "") else null; │ │883 + if (std.mem.eql(u8, tail, "description")) return if (params.only(&.{})) repoThreadDescriptionRoute(.discuss, pair, discussion_id) else null; │ │884 return null; │ │885 } │ │886 if (!params.only(&.{.start})) return null; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │887 - return repoThreadCommentsRoute(.discussion, pair, discussion_id, params.start() orelse return null);│ │887 + return repoThreadCommentsRoute(.discuss, pair, discussion_id, params.start() orelse return null); │ │888 } │ │889 if (std.mem.eql(u8, tab, "issues")) { │ │890 // the word is a list view; a filter with neither is never emitted. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │909 const view = word orelse return if (params.only(&.{})) repoDiscussionsRoute(pair, "", "") else null; │ │910 if (!params.only(&.{.tag})) return null; │ │911 if (std.mem.eql(u8, view, "all")) return repoDiscussionsRoute(pair, tag_value, ""); │ │912 - if (std.mem.eql(u8, view, "tags")) return repoThreadTagsRoute(.discussion, pair, tag_value); │ │913 - if (std.mem.eql(u8, view, "new")) return if (tag_value.len == 0) repoThreadNewRoute(.discussion, pair) else null;│ │912 + if (std.mem.eql(u8, view, "tags")) return repoThreadTagsRoute(.discuss, pair, tag_value); │ │913 + if (std.mem.eql(u8, view, "new")) return if (tag_value.len == 0) repoThreadNewRoute(.discuss, pair) else null; │ │914 return null; │ │915 } │ │916 if (std.mem.eql(u8, tab, "events")) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯