╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭────────────────────────────────────────╮ │427 .closed => .closed,│ │428 + .merged => .merged,│ │429 }, │ │430 } }; │ │431 } │ ╰────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │432 │ │433 + pub fn repoPatchesDraftsRoute(identity: []const u8) ?RoutablePage { │ │434 + return .{ .repo_patches = .{ │ │435 + .name = Array(repo_route_max_len).from(identity) orelse return null, │ │436 + .view = .drafts, │ │437 + } }; │ │438 + } │ │439 + │ │440 pub fn repoDiscussionsRoute(identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage {│ │441 return .{ .repo_discussions = .{ │ │442 .name = Array(repo_route_max_len).from(identity) orelse return null, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │449 pub fn repoThreadRoute(kind: evt.EventKind, identity: []const u8, tag: []const u8, selected: []const u8) ?RoutablePage {│ │450 return switch (kind) { │ │451 .issue => repoIssuesRoute(identity, .open, tag, selected), │ │452 + .patch => repoPatchesRoute(identity, .open, tag, selected), │ │453 .discuss => repoDiscussionsRoute(identity, tag, selected), │ │454 else => null, │ │455 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │460 var route = repoThreadRoute(kind, identity, "", selected) orelse return null;│ │461 switch (route) { │ │462 .repo_issues => |*thread| thread.comments_start = start, │ │463 + .repo_patches => |*thread| thread.comments_start = start, │ │464 .repo_discussions => |*thread| thread.comments_start = start, │ │465 else => unreachable, │ │466 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │474 const comment = Array(evt.event_id_size * 2).from(comment_id) orelse return null;│ │475 switch (route) { │ │476 .repo_issues => |*thread| thread.comment = comment, │ │477 + .repo_patches => |*thread| thread.comment = comment, │ │478 .repo_discussions => |*thread| thread.comment = comment, │ │479 else => unreachable, │ │480 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │488 const parent_event_id = Array(evt.event_id_size * 2).from(parent_id) orelse return null;│ │489 switch (route) { │ │490 .repo_issues => |*thread| { │ │491 + thread.comment = parent_event_id; │ │492 + thread.view = .new_comment; │ │493 + }, │ │494 + .repo_patches => |*thread| { │ │495 thread.comment = parent_event_id; │ │496 thread.view = .new_comment; │ │497 }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │509 var route = repoThreadCommentRoute(kind, identity, thread_id, comment_id, 0) orelse return null;│ │510 switch (route) { │ │511 .repo_issues => |*thread| thread.view = .edit_comment, │ │512 + .repo_patches => |*thread| thread.view = .edit_comment, │ │513 .repo_discussions => |*thread| thread.view = .edit_comment, │ │514 else => unreachable, │ │515 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │524 repoThreadCommentRoute(kind, identity, thread_id, comment_id, 0) orelse return null;│ │525 switch (route) { │ │526 .repo_issues => |*thread| thread.view = .remove, │ │527 + .repo_patches => |*thread| thread.view = .remove, │ │528 .repo_discussions => |*thread| thread.view = .remove, │ │529 else => unreachable, │ │530 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │536 var route = repoThreadRoute(kind, identity, tag, "") orelse return null;│ │537 switch (route) { │ │538 .repo_issues => |*thread| thread.view = .tags, │ │539 + .repo_patches => |*thread| thread.view = .tags, │ │540 .repo_discussions => |*thread| thread.view = .tags, │ │541 else => unreachable, │ │542 } │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │548 var route = repoThreadRoute(kind, identity, "", "") orelse return null;│ │549 switch (route) { │ │550 .repo_issues => |*thread| thread.view = .new, │ │551 + .repo_patches => |*thread| thread.view = .new, │ │552 .repo_discussions => |*thread| thread.view = .new, │ │553 else => unreachable, │ │554 } │ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯