╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │539 if (std.meta.activeTag(a) != std.meta.activeTag(b)) return false; │ │540 return switch (a) { │ │510 - .home_users => |a_after| a_after == b.home_users, │ │511 - .home_repos => |a_after| a_after == b.home_repos, │ │512 - .user_repos => |a_u| std.mem.eql(u8, a_u.name.slice(), b.user_repos.name.slice()) and a_u.after == b.user_repos.after, │ │541 + .home_users => |a_start| a_start == b.home_users, │ │542 + .home_repos => |a_start| a_start == b.home_repos, │ │543 + .user_repos => |a_u| std.mem.eql(u8, a_u.name.slice(), b.user_repos.name.slice()) and a_u.start == b.user_repos.start, │ │544 .user_settings => |a_name| std.mem.eql(u8, a_name.slice(), b.user_settings.slice()), │ │545 .user_auth => |a_name| std.mem.eql(u8, a_name.slice(), b.user_auth.slice()), │ │515 - .repo_files => |a_f| std.mem.eql(u8, a_f.name.slice(), b.repo_files.name.slice()) and a_f.after == b.repo_files.after, │ │516 - .repo_commits => |a_c| std.mem.eql(u8, a_c.name.slice(), b.repo_commits.name.slice()) and a_c.after == b.repo_commits.after, │ │517 - .repo_refs => |a_r| std.mem.eql(u8, a_r.name.slice(), b.repo_refs.name.slice()) and a_r.kind == b.repo_refs.kind and a_r.after == b.repo_refs.after, │ │546 + .repo_files => |a_name| std.mem.eql(u8, a_name.slice(), b.repo_files.slice()), │ │547 + .repo_commits => |a_name| std.mem.eql(u8, a_name.slice(), b.repo_commits.slice()), │ │548 + .repo_refs => |a_r| std.mem.eql(u8, a_r.name.slice(), b.repo_refs.name.slice()) and a_r.kind == b.repo_refs.kind and std.mem.eql(u8, a_r.from.slice(), b.repo_refs.from.slice()),│ │549 .repo_issues => |a_i| std.mem.eql(u8, a_i.name.slice(), b.repo_issues.name.slice()) and │ │550 std.mem.eql(u8, a_i.tag.slice(), b.repo_issues.tag.slice()) and │ │551 std.mem.eql(u8, a_i.selected.slice(), b.repo_issues.selected.slice()) and │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │561 pub fn repoPageChanged(a: RoutablePage, b: RoutablePage) bool { │ │562 if (a.parent() != .repo or b.parent() != .repo) return false; │ │563 if (std.meta.activeTag(a) == .repo_refs and std.meta.activeTag(b) == .repo_refs and│ │533 - a.repo_refs.after == 0 and b.repo_refs.after == 0) │ │564 + a.repo_refs.from.len == 0 and b.repo_refs.from.len == 0) │ │565 return !std.mem.eql(u8, a.repo_refs.name.slice(), b.repo_refs.name.slice()); │ │566 return !a.eql(b); │ │567 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │568 │ │569 // true when `a` and `b` are the same user paginated to a different repos │ │570 // window. switching between a user's tabs is in-page (header-handled), so│ │540 - // only a changed `after` on the repos list navigates. │ │571 + // only a changed `start` on the repos list navigates. │ │572 pub fn userPageChanged(a: RoutablePage, b: RoutablePage) bool { │ │573 return switch (a) { │ │574 .user_repos => |aa| switch (b) { │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │544 - .user_repos => |bb| std.mem.eql(u8, aa.name.slice(), bb.name.slice()) and aa.after != bb.after,│ │575 + .user_repos => |bb| std.mem.eql(u8, aa.name.slice(), bb.name.slice()) and aa.start != bb.start,│ │576 else => false, │ │577 }, │ │578 else => false, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │944 }; │ │945 const a_prefix = "a:"; │ │946 if (!std.mem.startsWith(u8, custom, a_prefix)) return null; │ │916 - const url = custom[a_prefix.len..]; │ │917 - const q = std.mem.indexOfScalar(u8, url, '?'); │ │918 - const path = if (q) |i| url[0..i] else url; │ │919 - const query = if (q) |i| url[i + 1 ..] else null; │ │947 + const path = custom[a_prefix.len..]; │ │948 // local sessions build (and parse) links with the repo identity elided │ │921 - const route = (if (data.is_local) RoutablePage.fromUrlLocal(path, query) else RoutablePage.fromUrl(path, query)) orelse return null;│ │949 + const route = (if (data.is_local) RoutablePage.fromUrlLocal(path) else RoutablePage.fromUrl(path)) orelse return null; │ │950 // a link to a different parent page always navigates; within a page, a │ │951 // files-directory / commits-page / list-window change navigates while tab │ │952 // links stay in-page (header-handled). │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │30 arena: *std.heap.ArenaAllocator, │ │31 haxy_moment: evt.AdminDB.HashMap(.read_only), │ │32 // pagination window start for each list tab; the inactive tab gets 0.│ │33 - users_after: usize, │ │34 - repos_after: usize, │ │33 + users_start: usize, │ │34 + repos_start: usize, │ │35 ) !Self { │ │36 return .{ │ │37 .header = try Header.init(arena), │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │38 - .users = try Users.init(arena, haxy_moment, users_after),│ │39 - .repos = try Repos.init(arena, haxy_moment, repos_after),│ │38 + .users = try Users.init(arena, haxy_moment, users_start),│ │39 + .repos = try Repos.init(arena, haxy_moment, repos_start),│ │40 .settings = Settings.init(), │ │41 .auth = Auth.init(), │ │42 .quit = Quit.init(), │ ╰─────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │127 switch (std.meta.activeTag(stack.children.values()[index])) { │ │128 // mirror each list tab's built pagination window so the url stays │ │129 // consistent with what's shown (and so a build doesn't reset it). │ │130 - .home_users => self.session.data.current_page = .{ .home_users = self.data.users.after },│ │131 - .home_repos => self.session.data.current_page = .{ .home_repos = self.data.repos.after },│ │130 + .home_users => self.session.data.current_page = .{ .home_users = self.data.users.start },│ │131 + .home_repos => self.session.data.current_page = .{ .home_repos = self.data.repos.start },│ │132 .home_settings => self.session.data.current_page = .home_settings, │ │133 .home_auth => self.session.data.current_page = .home_auth, │ │134 // the quit tab is tty-only and not a route, so leave current_page │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Home/Repos.zig│ ╰─────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │14 │ │15 repos: []const evt.Repo, │ │16 owner_names: []const []const u8, │ │17 -after: usize, // the window start this page was built with, mirrored into the url │ │18 -next_after: ?usize, // the `after` for the "next" row, or null when this is the last window│ │17 +start: usize, // the window start this page was built with, mirrored into the url │ │18 +next_start: ?usize, // the `start` for the "next" row, or null when this is the last window│ │19 │ │20 const Self = @This(); │ │21 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────╮ │22 pub fn init( │ │23 arena: *std.heap.ArenaAllocator, │ │24 haxy_moment: evt.AdminDB.HashMap(.read_only),│ │25 - after: usize, │ │25 + start: usize, │ │26 ) !Self { │ │27 const DB = evt.AdminDB; │ │28 const hash_kind = evt.admin_repo_opts.hash; │ ╰─────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯