╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────╮ │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; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯