╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │28 pub fn init( │ │29 arena: *std.heap.ArenaAllocator, │ │30 haxy_moment: evt.AdminDB.HashMap(.read_only), │ │31 + // pagination window start for each list tab; the inactive tab gets 0.│ │32 + users_after: usize, │ │33 + repos_after: usize, │ │34 ) !Self { │ │35 return .{ │ │36 .header = try Header.init(arena), │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │34 - .users = try Users.init(arena, haxy_moment), │ │35 - .repos = try Repos.init(arena, haxy_moment), │ │37 + .users = try Users.init(arena, haxy_moment, users_after),│ │38 + .repos = try Repos.init(arena, haxy_moment, repos_after),│ │39 .settings = Settings.init(), │ │40 .auth = Auth.init(), │ │41 .quit = Quit.init(), │ ╰─────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │123 if (header.getSelectedIndex()) |index| { │ │124 stack.getFocus().child_id = stack.children.keys()[index]; │ │125 switch (index) { │ │123 - 0 => self.session.data.current_page = .home_users, │ │124 - 1 => self.session.data.current_page = .home_repos, │ │126 + // mirror each list tab's built pagination window so the url stays │ │127 + // consistent with what's shown (and so a build doesn't reset it). │ │128 + 0 => self.session.data.current_page = .{ .home_users = self.data.users.after },│ │129 + 1 => self.session.data.current_page = .{ .home_repos = self.data.repos.after },│ │130 2 => self.session.data.current_page = .home_settings, │ │131 3 => self.session.data.current_page = .home_auth, │ │132 // the quit tab is tty-only and not a route, so leave current_page │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯