╭ changed ──────────╮ │src/event/Issue.zig│ ╰───────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │15 event: Self, │ │16 removed: bool = false, │ │17 author_email: ?[]const u8 = null, │ │18 - created_ts: u64 = 0, // the commit timestamp of the event that first created this issue│ │18 + created_order: u64 = 0, │ │19 }; │ │20 │ │21 const Self = @This(); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │78 const event_id_to_issue_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "event-id->issue")); │ │79 const event_id_to_issue = try DB.HashMap(.read_write).init(event_id_to_issue_cursor); │ │80 │ │81 - // the per-status sets the issues views list, ordered by creation time, │ │81 + // the per-status sets the issues views list, ordered by creation, │ │82 // keyed by status name │ │83 const status_to_issues_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "status->issue-id-set"));│ │84 const status_to_issues = try DB.SortedMap(.read_write).init(status_to_issues_cursor); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │109 }; │ │110 │ │111 if (existing_record_maybe) |existing_record| { │ │112 - // updates preserve the original creation timestamp and author │ │113 - record_to_write.created_ts = existing_record.created_ts; │ │112 + // updates preserve the original creation order and author │ │113 + record_to_write.created_order = existing_record.created_order; │ │114 record_to_write.author_email = existing_record.author_email; │ │115 │ │116 // drop the old status's and tags' entries; active values are re-added below│ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │117 - const order_key = evt.orderKeyDesc(existing_record.created_ts, event_id); │ │117 + const order_key = evt.orderKeyDesc(existing_record.created_order, event_id); │ │118 if (!existing_record.removed) { │ │119 const status_set = try statusSet(DB, status_to_issues, existing_record.event.status);│ │120 _ = try status_set.remove(&order_key); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │131 const issue_cursor = try event_id_to_issue.putCursor(issue_key); │ │132 const issue = try DB.HashMap(.read_write).init(issue_cursor); │ │133 try evt.upsert(Record, DB, hash_kind, issue, record_to_write); │ │134 - try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .issue, record_to_write.created_ts, record_to_write.removed); │ │134 + try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .issue, record_to_write.created_order, record_to_write.removed);│ │135 │ │136 - const order_key = evt.orderKeyDesc(record_to_write.created_ts, event_id); │ │136 + const order_key = evt.orderKeyDesc(record_to_write.created_order, event_id); │ │137 │ │138 // the id set retains removed records so merges can carry removals │ │139 if (existing_cursor_maybe == null) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │266 │ │267 const conflicts_cursor = (try moment.getCursor(hash.hashInt(repo_opts.hash, conflicts_key))) orelse return updated;│ │268 const conflicts = try DB.SortedMap(.read_only).init(conflicts_cursor); │ │269 - const order_key = evt.orderKeyDesc(live.created_ts, id_bytes); │ │269 + const order_key = evt.orderKeyDesc(live.created_order, id_bytes); │ │270 const conflict_cursor = (try conflicts.getCursor(&order_key)) orelse return updated; │ │271 const entry = try DB.HashMap(.read_only).init(conflict_cursor); │ │272 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯