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