╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │111 │ │112 pub const RefKind = enum { branch, tag }; │ │113 │ │114 - pub const IssuesView = enum { open, closed, tags, new, edit, description, new_comment, conflicts, resolve }; │ │114 + pub const IssuesView = enum { open, closed, tags, new, edit, description, new_comment, edit_comment, conflicts, resolve };│ │115 │ │116 pub const RefOrOid = enum { │ │117 branch, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │375 return route; │ │376 } │ │377 │ │378 + // build the form route for editing a comment. │ │379 + pub fn repoCommentEditRoute(identity: []const u8, thread: []const u8, comment_id: []const u8) ?RoutablePage {│ │380 + if (thread.len == 0 or comment_id.len == 0) return null; │ │381 + var route = repoCommentsRoute(identity, thread, comment_id, 0) orelse return null; │ │382 + route.repo_issues.view = .edit_comment; │ │383 + return route; │ │384 + } │ │385 + │ │386 // build a `.repo_issues` route showing tags view, keeping the url-encoded │ │387 // `tag` filter ("" = unfiltered). │ │388 pub fn repoIssuesTagsRoute(identity: []const u8, tag: []const u8) ?RoutablePage { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │533 try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/new", .{ prefix, i.selected.slice() }) │ │534 else │ │535 try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/new", .{ prefix, i.selected.slice(), i.comment.slice() }); │ │536 + if (i.view == .edit_comment) break :blk try std.fmt.allocPrint(arena.allocator(), "{s}/" ++ issue_seg ++ "{s}/" ++ comment_seg ++ "{s}/edit", .{ prefix, i.selected.slice(), i.comment.slice() });│ │537 if (i.view == .conflicts) break :blk if (i.selected.len == 0) │ │538 try std.fmt.allocPrint(arena.allocator(), "{s}/issues/conflicts", .{prefix}) │ │539 else │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │696 if (comment_id.len == 0) return null; │ │697 const word = params.scanTail(&segments) catch return null; │ │698 if (word) |last| { │ │690 - if (!std.mem.eql(u8, last, "new") or !params.only(&.{})) return null; │ │691 - return repoCommentNewRoute(pair, issue_id, comment_id); │ │699 + if (!params.only(&.{})) return null; │ │700 + if (std.mem.eql(u8, last, "new")) return repoCommentNewRoute(pair, issue_id, comment_id); │ │701 + if (std.mem.eql(u8, last, "edit")) return repoCommentEditRoute(pair, issue_id, comment_id);│ │702 + return null; │ │703 } │ │704 if (!params.only(&.{.start})) return null; │ │705 return repoCommentsRoute(pair, issue_id, comment_id, params.start() orelse return null); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯