╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │90 const identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.owner_name, data.name }); │ │91 const files_route = ui.RoutablePage.repoFilesRoute(identity, "") orelse return error.RouteTooLong; │ │92 const files_link = try std.fmt.allocPrint(aa, "a:{s}", .{try files_route.urlAlloc(session.page_arena)}); │ │93 + const commits_route = ui.RoutablePage.repoCommitsRoute(identity, "") orelse return error.RouteTooLong; │ │94 + const commits_link = try std.fmt.allocPrint(aa, "a:{s}", .{try commits_route.urlAlloc(session.page_arena)}); │ │95 const settings_link = try std.fmt.allocPrint(aa, "a:/repo/{s}/{s}/settings", .{ data.owner_name, data.name });│ │96 const auth_link = try std.fmt.allocPrint(aa, "a:/repo/{s}/{s}/auth", .{ data.owner_name, data.name }); │ │97 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │109 }); │ │110 } │ │111 │ │112 + // commits tab │ │113 + { │ │114 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "commits", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │115 + errdefer text_box.deinit(allocator); │ │116 + text_box.getFocus().focusable = true; │ │117 + text_box.getFocus().kind = .{ .custom = commits_link }; │ │118 + try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │119 + try box.children.put(allocator, text_box.getFocus().id, .{ │ │120 + .widget = .{ .text_box = text_box }, │ │121 + .rect = null, │ │122 + .min_size = .{ .width = "commits".len + 2, .height = null }, │ │123 + }); │ │124 + } │ │125 + │ │126 // spacer pushes settings + auth to the right │ │127 { │ │128 var spacer = ui.Spacer.init(); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │181 // open on the tab named by the current route │ │182 self.getFocus().child_id = self.tab_ids.keys()[│ │183 switch (session.data.current_page) { │ │168 - .repo_settings => 1, │ │169 - .repo_auth => 2, │ │184 + .repo_commits => 1, │ │185 + .repo_settings => 2, │ │186 + .repo_auth => 3, │ │187 else => 0, │ │188 } │ │189 ]; │ ╰────────────────────────────────────────────────────────────╯