╭ changed ──────────────╮ │src/ui/Repo/Threads.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │106 } │ │107 │ │108 fn commentsRoute(identity: []const u8, selected: []const u8, start: usize) ?ui.RoutablePage { │ │109 - return switch (kind) { │ │110 - .issue => ui.RoutablePage.repoIssueCommentsRoute(identity, selected, start), │ │111 - .discussion => ui.RoutablePage.repoDiscussionCommentsRoute(identity, selected, start), │ │112 - else => @compileError("unsupported thread event kind"), │ │113 - }; │ │109 + return ui.RoutablePage.repoThreadCommentsRoute(kind, identity, selected, start); │ │110 } │ │111 │ │112 fn commentRoute(identity: []const u8, thread_id: []const u8, comment_id: []const u8, start: usize) ?ui.RoutablePage {│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │117 - return switch (kind) { │ │118 - .issue => ui.RoutablePage.repoCommentsRoute(identity, thread_id, comment_id, start), │ │119 - .discussion => ui.RoutablePage.repoDiscussionCommentRoute(identity, thread_id, comment_id, start),│ │120 - else => @compileError("unsupported thread event kind"), │ │121 - }; │ │113 + return ui.RoutablePage.repoThreadCommentRoute(kind, identity, thread_id, comment_id, start); │ │114 } │ │115 │ │116 fn newCommentRoute(identity: []const u8, thread_id: []const u8, parent_id: []const u8) ?ui.RoutablePage { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │125 - return switch (kind) { │ │126 - .issue => ui.RoutablePage.repoCommentNewRoute(identity, thread_id, parent_id), │ │127 - .discussion => ui.RoutablePage.repoDiscussionCommentNewRoute(identity, thread_id, parent_id), │ │128 - else => @compileError("unsupported thread event kind"), │ │129 - }; │ │117 + return ui.RoutablePage.repoThreadCommentNewRoute(kind, identity, thread_id, parent_id); │ │118 } │ │119 │ │120 fn editCommentRoute(identity: []const u8, thread_id: []const u8, comment_id: []const u8) ?ui.RoutablePage {│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │133 - return switch (kind) { │ │134 - .issue => ui.RoutablePage.repoCommentEditRoute(identity, thread_id, comment_id), │ │135 - .discussion => ui.RoutablePage.repoDiscussionCommentEditRoute(identity, thread_id, comment_id),│ │136 - else => @compileError("unsupported thread event kind"), │ │137 - }; │ │121 + return ui.RoutablePage.repoThreadCommentEditRoute(kind, identity, thread_id, comment_id); │ │122 } │ │123 │ │124 fn editRoute(identity: []const u8, selected: []const u8) ?ui.RoutablePage { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │141 - return switch (kind) { │ │142 - .issue => ui.RoutablePage.repoIssuesEditRoute(identity, selected), │ │143 - .discussion => ui.RoutablePage.repoDiscussionsEditRoute(identity, selected),│ │144 - else => @compileError("unsupported thread event kind"), │ │145 - }; │ │125 + return ui.RoutablePage.repoThreadEditRoute(kind, identity, selected); │ │126 } │ │127 │ │128 fn newRoute(identity: []const u8) ?ui.RoutablePage { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │149 - return switch (kind) { │ │150 - .issue => ui.RoutablePage.repoIssuesNewRoute(identity), │ │151 - .discussion => ui.RoutablePage.repoDiscussionsNewRoute(identity), │ │152 - else => @compileError("unsupported thread event kind"), │ │153 - }; │ │129 + return ui.RoutablePage.repoThreadNewRoute(kind, identity); │ │130 } │ │131 │ │132 fn descriptionRoute(identity: []const u8, selected: []const u8) ?ui.RoutablePage {│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │157 - return switch (kind) { │ │158 - .issue => ui.RoutablePage.repoIssuesDescriptionRoute(identity, selected), │ │159 - .discussion => ui.RoutablePage.repoDiscussionsDescriptionRoute(identity, selected),│ │160 - else => @compileError("unsupported thread event kind"), │ │161 - }; │ │133 + return ui.RoutablePage.repoThreadDescriptionRoute(kind, identity, selected); │ │134 } │ │135 │ │136 fn tagsRoute(identity: []const u8, tag: []const u8) ?ui.RoutablePage { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │165 - return switch (kind) { │ │166 - .issue => ui.RoutablePage.repoIssuesTagsRoute(identity, tag), │ │167 - .discussion => ui.RoutablePage.repoDiscussionsTagsRoute(identity, tag), │ │168 - else => @compileError("unsupported thread event kind"), │ │169 - }; │ │137 + return ui.RoutablePage.repoThreadTagsRoute(kind, identity, tag); │ │138 } │ │139 │ │140 fn conflictsRoute(identity: []const u8, selected: []const u8) ?ui.RoutablePage {│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯