╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │2251 .home => |*p| .{ .home = try .init(allocator, p, session) },│ │2252 .user => |*p| .{ .user = try .init(allocator, p, session) },│ │2253 .repo => |*p| .{ .repo = try .init(allocator, p, session) },│ │2254 + .fork => |*p| .{ .fork = try .init(allocator, p, session) },│ │2255 }; │ │2256 │ │2257 chooseAnsiArtForNavigation(session); │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/ui/AuthTab.zig│ ╰──────────────────╯ ╭────────────────────────────────────╮ │ 7 const Key = xitui.input.Key; │ │ 8 const Grid = xitui.grid.Grid; │ │ 9 const Focus = xitui.focus.Focus;│ │10 - │ │11 -const Self = @This(); │ │12 - │ │13 -pub fn init() Self { │ │14 - return .{}; │ │15 -} │ │10 │ │11 pub const View = struct { │ │12 text_box: wgt.TextBox, │ ╰────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────╮ │12 pub const AuthTab = @import("./../AuthTab.zig");│ │13 │ │14 title: ui.Title, │ │15 -auth_tab: AuthTab, │ │15 │ │16 const Self = @This(); │ │17 │ ╰────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │18 pub fn init(arena: *std.heap.ArenaAllocator) !Self {│ │19 return .{ │ │20 .title = try ui.Title.init(arena, "haxy"), │ │22 - .auth_tab = AuthTab.init(), │ │21 }; │ │22 } │ │23 │ ╰────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │51 // local mode); files and commits carry their remaining fields directly. │ │52 const name_str = route.repoIdentity() orelse return error.UnexpectedRoute; │ │53 const repo_identity = ui.RoutablePage.RepoIdentity.parse(name_str) orelse return error.NotFound;│ │54 + const location = ui.RoutablePage.RepoLocation{ .repo = repo_identity.identity }; │ │55 // the files and commits tabs share one ref/oid: whichever the incoming route │ │56 // names (it rides on the route's target tab), or the default branch when │ │57 // neither tab is targeted. building both views at it keeps switching tabs │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │230 inline else => |*opened| { │ │231 // local mode: bring the event db up to date with the events branch │ │232 if (session.local != null) try evt.consume(.repo, repo_kind, opened.self_repo_opts, io, gpa, opened, evt.events_ref, &.{}); │ │232 - const files_data = try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, requested_ref_or_oid, requested_ref_value, files_dir, files_line);│ │233 + const files_data = try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, location, requested_ref_or_oid, requested_ref_value, files_dir, files_line); │ │234 const target_branch = if (files_data.ref_or_oid == .branch) files_data.ref_or_oid_value else ""; │ │235 break :blk .{ │ │236 files_data, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │236 - try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, repo_identity.identity, requested_ref_or_oid, requested_ref_value, commits_content), │ │237 + try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, location, requested_ref_or_oid, requested_ref_value, commits_content), │ │238 try Refs.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, refs_kind, refs_from), │ │239 try Issues.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, issues_tag, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view), │ │240 try Patches.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, session, repo_id_maybe, repo_identity.identity, target_branch, patches_tag, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view),│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │248 } │ │249 const aa = arena.allocator(); │ │250 break :blk .{ │ │250 - try Files.emptyResult(aa, repo_identity.identity, requested_ref_or_oid orelse .branch, requested_ref_value, files_dir), │ │251 - try Commits.emptyResult(aa, repo_identity.identity, requested_ref_or_oid orelse .branch, requested_ref_value, commits_content), │ │251 + try Files.emptyResult(aa, location, requested_ref_or_oid orelse .branch, requested_ref_value, files_dir), │ │252 + try Commits.emptyResult(aa, location, requested_ref_or_oid orelse .branch, requested_ref_value, commits_content), │ │253 try Refs.emptyResult(arena, repo_identity.identity, refs_kind, refs_from), │ │254 try Issues.emptyResult(aa, repo_identity.identity, issues_tag, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view), │ │255 try Patches.emptyResult(aa, repo_identity.identity, patches_tag, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view),│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │265 return .{ │ │266 // files and commits resolve the same ref, so either's serves the header, │ │267 // which points both tabs at it. │ │267 - .header = try Header.init(arena, repo.event.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, issues_tag, patches_tag, discussions_tag),│ │268 + .header = try Header.init(arena, repo.event.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, issues.tag, patches.tag, discussions.tag),│ │269 .repo = repo, │ │270 .files = files, │ │271 .commits = commits, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │46 has_more: bool, │ │47 }; │ │48 │ │49 -// "owner/name", so the view can build /repo/owner/name/commits/... links. │ │50 -identity: []const u8, │ │49 +// where links and clone commands for this repository are rooted. │ │50 +location: ui.RoutablePage.RepoLocation, │ │51 // the resolved ref/oid this log walks from (the default branch when the route│ │52 // didn't name one), so the page can canonicalize its url to it. │ │53 ref_or_oid: ui.RoutablePage.RefOrOid, │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯