╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────────╮ │src/ui/Repo/Discussions.zig│ ╰───────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │160 const record_cursor = try records.getCursor(hash.hashInt(repo_opts.hash, &id)) orelse return error.NotFound; │ │161 const record = try evt.read(evt.Discussion.Record, DB, repo_opts.hash, arena, try DB.HashMap(.read_only).init(record_cursor));│ │162 if (record.removed) return error.NotFound; │ │163 - const order_key = try aa.dupe(u8, &evt.orderKeyDesc(record.created_ts, &id)); │ │163 + const activity_order = try evt.Discussion.activityOrder(DB, repo_opts.hash, haxy_moment, &id); │ │164 + const order_key = try aa.dupe(u8, &evt.orderKeyDesc(activity_order, &id)); │ │165 const set = set_maybe orelse return error.NotFound; │ │166 if (!try set.contains(order_key)) return error.NotFound; │ │167 root_key = order_key; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │193 .comment_id = empty.comment_id, │ │194 .comments_start = comments_start, │ │195 .comment_page = comment_page, │ │195 - .all = loaded_window, │ │196 + .recent = loaded_window, │ │197 .view = empty.view, │ │198 .description_page = empty.description_page,│ │199 .tags = tag_names.items, │ ╰────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │281 │ │282 const aa = session.page_arena.allocator(); │ │283 │ │283 - // all discussions │ │284 + // recent discussions │ │285 { │ │286 const route = ui.RoutablePage.repoDiscussionsRoute(data.identity, data.tag, "") orelse return error.RouteTooLong;│ │287 const link = try std.fmt.allocPrint(aa, "ai:{s}", .{try route.toUrl(session.page_arena)}); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │287 - const label = try std.fmt.allocPrint(aa, "all ({d})", .{data.all.count}); │ │288 + const label = try std.fmt.allocPrint(aa, "recent ({d})", .{data.recent.count});│ │289 try addTab(allocator, &box, &tab_ids, label, link); │ │290 } │ │291 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │ 97 result.selected = .{ .id = try aa.dupe(u8, selected), .kind = kind }; │ │ 98 const meta = try readMeta(repo_opts.hash, arena, haxy_moment, kind, &id);│ │ 99 result.view = if (meta.removed) .removed else .active; │ │100 - root_key = evt.orderKeyDesc(meta.created_ts, &id); │ │100 + root_key = evt.orderKeyDesc(meta.created_order, &id); │ │101 } │ │102 │ │103 for ([_]ui.RoutablePage.EventsView{ .active, .removed }) |view| { │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────╮ │173 } │ │174 │ │175 const EventMeta = struct {│ │176 - created_ts: u64, │ │176 + created_order: u64, │ │177 removed: bool, │ │178 }; │ │179 │ ╰───────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │195 .attach => evt.Attachment, │ │196 }; │ │197 const record = (try readRecord(T, hash_kind, arena, haxy_moment, id)) orelse return error.NotFound;│ │198 - break :blk .{ .created_ts = record.created_ts, .removed = record.removed }; │ │198 + break :blk .{ .created_order = record.created_order, .removed = record.removed }; │ │199 }, │ │200 }; │ │201 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │175 } │ │176 │ │177 // read one window per status of an opened repo's issues (filtered to `tag` │ │178 -// when set), ordered by creation time (newest first). the window of the issue│ │178 +// when set), ordered by creation (newest first). the window of the issue │ │179 // `selected_id` names starts at it ("" = the beginning). a git repo reads the│ │180 // event db next to it (synced from the events branch on each page build); a │ │181 // xit repo reads its own db. │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │267 const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &id_bytes)) orelse return error.NotFound;│ │268 const issue_map = try DB.HashMap(.read_only).init(issue_cursor); │ │269 const issue_event = try evt.read(evt.Issue.Record, DB, repo_opts.hash, arena, issue_map); │ │270 - const order_key = try aa.dupe(u8, &evt.orderKeyDesc(issue_event.created_ts, &id_bytes)); │ │270 + const order_key = try aa.dupe(u8, &evt.orderKeyDesc(issue_event.created_order, &id_bytes)); │ │271 │ │272 if (view == .conflicts) { │ │273 // the id roots the conflicts window, so it must be conflicted │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/User.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │54 var repos_next_start: ?usize = null; │ │55 │ │56 // the user-id->repo-id-set index maps each user to a set of their repo event │ │57 - // ids ordered by creation time (newest first); it only exists once a repo has │ │57 + // ids ordered by creation (newest first); it only exists once a repo has │ │58 // been consumed, so a user with no repos simply yields an empty list. │ │59 if (try haxy_moment.getCursor(hash.hashInt(hash_kind, "user-id->repo-id-set"))) |user_id_to_repo_id_set_cursor| {│ │60 const user_id_to_repo_id_set = try DB.HashMap(.read_only).init(user_id_to_repo_id_set_cursor); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯