╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────╮ │ 98 repo_settings: Array(repo_route_max_len), │ │ 99 repo_auth: Array(repo_route_max_len), │ │100 │ │101 - pub const default: RoutablePage = .{ .home_users = 0 };│ │101 + pub const default: RoutablePage = .{ .home_repos = 0 };│ │102 │ │103 pub const RefKind = enum { branch, tag }; │ │104 │ ╰────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │66 { │ │67 var stack = try wgt.Stack(ui.Widget).init(allocator); │ │68 errdefer stack.deinit(allocator); │ │69 - │ │70 - { │ │71 - var users_view = try Users.View.init(allocator, &data.users, !session.is_terminal); │ │72 - errdefer users_view.deinit(allocator); │ │73 - try stack.children.put(allocator, users_view.getFocus().id, .{ .home_users = users_view });│ │74 - } │ │69 │ │70 { │ │71 var repos_view = try Repos.View.init(allocator, &data.repos, !session.is_terminal); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │72 errdefer repos_view.deinit(allocator); │ │73 try stack.children.put(allocator, repos_view.getFocus().id, .{ .home_repos = repos_view });│ │74 + } │ │75 + │ │76 + { │ │77 + var users_view = try Users.View.init(allocator, &data.users, !session.is_terminal); │ │78 + errdefer users_view.deinit(allocator); │ │79 + try stack.children.put(allocator, users_view.getFocus().id, .{ .home_users = users_view });│ │80 } │ │81 │ │82 // the header has no settings tab without a login, so keep the │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │62 // the tab matching the current page is focused initially; matching by│ │63 // link (rather than position) keeps this robust to tab changes. │ │64 const current_link: []const u8 = switch (session.data.current_page) { │ │65 - .home_repos => "ai:/repos", │ │65 + .home_users => "ai:/users", │ │66 .home_settings => "ai:/settings", │ │67 .home_auth => "ai:/auth", │ │68 - else => "ai:/users", │ │68 + else => "ai:/repos", │ │69 }; │ │70 var selected_tab: ?usize = null; │ │71 │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │72 - // users tab │ │72 + // repos tab │ │73 { │ │74 - var text_box = try wgt.TextBox(ui.Widget).init(allocator, "users", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │74 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "repos", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │75 errdefer text_box.deinit(allocator); │ │76 text_box.getFocus().focusable = true; │ │77 - text_box.getFocus().kind = .{ .custom = "ai:/users" }; │ │77 + text_box.getFocus().kind = .{ .custom = "ai:/repos" }; │ │78 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │79 - if (std.mem.eql(u8, "ai:/users", current_link)) selected_tab = text_box.getFocus().id; │ │79 + if (std.mem.eql(u8, "ai:/repos", current_link)) selected_tab = text_box.getFocus().id; │ │80 try box.children.put(allocator, text_box.getFocus().id, .{ │ │81 .widget = .{ .text_box = text_box }, │ │82 .rect = null, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │83 - .min_size = .{ .width = "users".len + 2, .height = null },│ │83 + .min_size = .{ .width = "repos".len + 2, .height = null },│ │84 }); │ │85 } │ │86 │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │87 - // repos tab │ │87 + // users tab │ │88 { │ │89 - var text_box = try wgt.TextBox(ui.Widget).init(allocator, "repos", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │89 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "users", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │90 errdefer text_box.deinit(allocator); │ │91 text_box.getFocus().focusable = true; │ │92 - text_box.getFocus().kind = .{ .custom = "ai:/repos" }; │ │92 + text_box.getFocus().kind = .{ .custom = "ai:/users" }; │ │93 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │94 - if (std.mem.eql(u8, "ai:/repos", current_link)) selected_tab = text_box.getFocus().id; │ │94 + if (std.mem.eql(u8, "ai:/users", current_link)) selected_tab = text_box.getFocus().id; │ │95 try box.children.put(allocator, text_box.getFocus().id, .{ │ │96 .widget = .{ .text_box = text_box }, │ │97 .rect = null, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │ 98 - .min_size = .{ .width = "repos".len + 2, .height = null },│ │ 98 + .min_size = .{ .width = "users".len + 2, .height = null },│ │ 99 }); │ │100 } │ │101 │ ╰───────────────────────────────────────────────────────────────────────────────╯