╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │150 }; │ │151 │ │152 return .{ │ │153 - .header = try Header.init(arena, target_record.event.name, owner.event.name, identity.owner, &id_hex, requested_value),│ │153 + .header = try Header.init(arena, target_record.event.name, identity.owner, &id_hex, requested_value), │ │154 .files = files, │ │155 .commits = commits, │ │156 .patch = patch_data, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────╮ │19 pub const AuthTab = @import("../AuthTab.zig");│ │20 │ │21 name: []const u8, │ │22 -owner_name: []const u8, │ │22 forker_name: []const u8, │ │23 title: ui.Title, │ │24 id: []const u8, │ ╰──────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │26 │ │27 const Self = @This(); │ │28 │ │30 -pub fn init(arena: *std.heap.ArenaAllocator, name: []const u8, owner_name: []const u8, forker_name: []const u8, id: []const u8, oid: []const u8) !Self {│ │29 +pub fn init(arena: *std.heap.ArenaAllocator, name: []const u8, forker_name: []const u8, id: []const u8, oid: []const u8) !Self { │ │30 return .{ │ │31 .name = name, │ │33 - .owner_name = owner_name, │ │32 .forker_name = forker_name, │ │33 .title = try ui.Title.init(arena, name, .scanlines), │ │34 .id = try arena.allocator().dupe(u8, id), │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │60 errdefer tab_ids.deinit(allocator); │ │61 │ │62 const aa = session.page_arena.allocator(); │ │65 - const identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.owner_name, data.name }); │ │63 const fork_identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.forker_name, data.name }); │ │64 const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, commits_tab_label ++ " ({d})", .{count}) else commits_tab_label;│ │65 var first_group_width = try data.title.width(); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │78 try title_box.children.put(allocator, forker.getFocus().id, .{ .widget = .{ .text_box = forker }, .rect = null, .min_size = null });│ │79 } │ │80 │ │84 - // the title links to the target repository. │ │81 + // the title links to the fork's default tab. │ │82 { │ │86 - const route = ui.RoutablePage.repoFilesRoute(identity, null, "", "", 0) orelse return error.RouteTooLong; │ │83 + const route = ui.RoutablePage.forkPatchRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │84 var title = try ui.Title.View.init(allocator, &data.title); │ │85 errdefer title.deinit(allocator); │ │86 title.getFocus().mode = .all; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │727 const row = self.toolRow(); │ │728 const pa = self.session.page_arena.allocator(); │ │729 │ │730 - if (supports_forks and self.session.data.current_page.parent() != .fork) { │ │730 + if (supports_forks and self.session.data.current_page.parent() == .fork) { │ │731 + // the fork page's own tabs show the diff and commits │ │732 + const route = ui.RoutablePage.repoPatchesRoute(self.data.identity, .open, "", entry.id) orelse return error.RouteTooLong; │ │733 + try addToolButton(allocator, row, "view on target repo", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)}));│ │734 + } else if (supports_forks) { │ │735 if (try Data.diffRoute(self.data.identity, entry)) |route| { │ │736 try addToolButton(allocator, row, "view diff", "", try std.fmt.allocPrint(pa, "a:{s}", .{try route.toUrl(self.session.page_arena)})); │ │737 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯