╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Threads.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │578 const top_level = if (page) |p| std.mem.eql(u8, &p.selected.comment.event.parent_id, &p.selected.comment.event.thread_id) else false;│ │579 const parent_route = if (editing) │ │580 if (top_level) │ │619 - commentsRoute(data.identity, data.selected_id, 0) │ │581 + ui.RoutablePage.repoThreadCommentsRoute(kind, data.identity, data.selected_id, 0) │ │582 else if (page) |p| │ │621 - commentRoute(data.identity, data.selected_id, &p.selected.comment.event.parent_id, 0) │ │583 + ui.RoutablePage.repoThreadCommentRoute(kind, data.identity, data.selected_id, &p.selected.comment.event.parent_id, 0) │ │584 else │ │585 null │ │586 else if (page) |p| │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │625 - commentRoute(data.identity, data.selected_id, &p.selected.id, 0) │ │587 + ui.RoutablePage.repoThreadCommentRoute(kind, data.identity, data.selected_id, &p.selected.id, 0)│ │588 else │ │627 - commentsRoute(data.identity, data.selected_id, 0); │ │589 + ui.RoutablePage.repoThreadCommentsRoute(kind, data.identity, data.selected_id, 0); │ │590 const parent_author: ui.Author = if (editing) │ │591 if (top_level) │ │592 if (data.selectedThread()) |entry| entry.author else .unknown │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │620 } else { │ │621 const aa = session.page_arena.allocator(); │ │622 const route = if (data.view == .edit) │ │661 - editRoute(data.identity, data.selected_id) orelse return error.RouteTooLong │ │623 + ui.RoutablePage.repoThreadEditRoute(kind, data.identity, data.selected_id) orelse return error.RouteTooLong│ │624 else │ │663 - newRoute(data.identity) orelse return error.RouteTooLong; │ │625 + ui.RoutablePage.repoThreadNewRoute(kind, data.identity) orelse return error.RouteTooLong; │ │626 const action = try std.fmt.allocPrint(aa, "form:{s}", .{try route.toUrl(session.page_arena)}); │ │627 const record = if (data.view == .edit) │ │628 (if (data.selectedThread()) |entry| &entry.record else null) │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────╮ │666 .detailed_index = @splat(null), │ │667 .description_id = @splat(null), │ │668 .author_id = @splat(null), │ │707 - .primary_button_id = @splat(null),│ │669 }; │ │670 } │ │671 │ ╰───────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │677 │ │678 const win = if (status_maybe) |status| data.window(status) else if (drafts and has_drafts) &data.drafts else if (has_conflicts) &data.conflicts else unreachable;│ │679 │ │719 - // the issue list (one focusable row per title), plus a "next" link that │ │720 - // reloads the page rooted at the following issue. │ │680 + // the thread list (one focusable row per title), plus a "next" link that │ │681 + // reloads the page rooted at the following thread. │ │682 { │ │683 var list_scroll = blk: { │ │684 var list_box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert, .stretch = true }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │697 } │ │698 if (win.next_id) |next| │ │699 try addRow(allocator, &list_box, "next →", "", try windowLink(session.page_arena, data, status_maybe, drafts, next));│ │739 - // select the window's first issue (past a leading "previous" │ │700 + // select the window's first thread (past a leading "previous" │ │701 // row) so its description shows on load. │ │702 if (win.items.len > 0) │ │703 list_box.getFocus().child_id = list_box.children.keys()[if (win.prev_id != null) 1 else 0] │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │723 var frame = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = .hidden, .direction = .vert });│ │724 errdefer frame.deinit(allocator); │ │725 // the tool row sits above the scroll (populateDetail fills │ │765 - // it per issue) so it can't scroll out from under the web │ │726 + // it per thread) so it can't scroll out from under the web │ │727 // overlay <form>, whose position doesn't track pane scrolling. │ │728 { │ │729 var row = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │777 try box.children.put(allocator, description.getFocus().id, .{ .widget = .{ .text_input = description }, .rect = null, .min_size = null });│ │778 } │ │779 │ │819 - try addSubmitButtonLabeled(allocator, &box, if (kind == .patch and record == null) "submit private draft" else "submit"); │ │780 + try addSubmitButtonLabeled(allocator, &box, if (kind == .patch and record == null) "submit draft" else "submit"); │ │781 │ │782 box.getFocus().child_id = box.children.keys()[title_field_index]; │ │783 return box; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │840 // a form's submit button, then a spacer absorbing the leftover │ │841 // min-height the box hands its last child, so the button keeps its │ │842 // natural height │ │882 - fn addSubmitButton(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget)) !void { │ │883 - return addSubmitButtonLabeled(allocator, box, "submit"); │ │884 - } │ │885 - │ │843 fn addSubmitButtonLabeled(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), label: []const u8) !void {│ │844 { │ │845 var submit = try ui.SubmitButton.initLabeled(allocator, label); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │931 } │ │932 } │ │933 │ │977 - try addSubmitButton(allocator, &box); │ │934 + try addSubmitButtonLabeled(allocator, &box, "submit");│ │935 │ │936 box.getFocus().child_id = box.children.keys()[0]; │ │937 return box; │ ╰───────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯