╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │124 // the repo and owner-name metadata the header shows. local mode already│ │125 // knows all three; the server paths resolve them from the admin db. │ │126 var source: ?ui.RepoSource = null; │ │127 - var repo: evt.Repo = undefined; │ │127 + var repo: evt.Repo.Record = undefined; │ │128 var owner_name: []const u8 = undefined; │ │129 if (session.local) |local| { │ │130 source = local; │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │131 // local routes elide the identity, so the display name comes from the │ │132 // repo's directory rather than the route. │ │133 - repo = .{ │ │133 + repo = .{ .event = .{ │ │134 .user_id = "", │ │135 .name = try arena.allocator().dupe(u8, std.fs.path.basename(local.path)),│ │136 .description = "", │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │137 - }; │ │137 + } }; │ │138 owner_name = ""; │ │139 } else { │ │140 const haxy_moment = session.haxy_moment orelse return error.NoMoment;│ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │143 │ │144 // resolve the creating user so the header can show their name to the left │ │145 // of the repo title. │ │146 - const owner = (try evt.User.readById(DB, hash_kind, haxy_moment, arena, repo.user_id)) orelse return error.NotFound; │ │147 - owner_name = owner.name; │ │146 + const owner = (try evt.User.readById(DB, hash_kind, haxy_moment, arena, repo.event.user_id)) orelse return error.NotFound;│ │147 + owner_name = owner.event.name; │ │148 │ │149 // the repo's working copy lives at <repos_dir>/<hex event id>. │ │150 if (session.repos_dir) |repos_dir| { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │214 return .{ │ │215 // files and commits resolve the same ref, so either's serves the header, │ │216 // which points both tabs at it. │ │217 - .header = try Header.init(arena, repo.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, issues_tag), │ │217 + .header = try Header.init(arena, repo.event.name, owner_name, files.ref_or_oid, files.ref_or_oid_value, issues_tag),│ │218 .repo = repo, │ │219 .files = files, │ │220 .commits = commits, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │29 // (the id lives in the event envelope, not the payload).│ │30 pub const IssueWithId = struct { │ │31 id: []const u8, │ │32 - issue: evt.Issue, │ │32 + issue: evt.Issue.Record, │ │33 // the creation commit's author │ │34 author: ui.Author = .unknown, │ │35 }; │ ╰─────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │184 _ = std.fmt.hexToBytes(&id_bytes, empty.selected_id) catch return error.NotFound; │ │185 const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &id_bytes)) orelse return error.NotFound;│ │186 const issue_map = try DB.HashMap(.read_only).init(issue_cursor); │ │187 - const issue_event = try evt.read(evt.Issue, DB, repo_opts.hash, arena, issue_map); │ │187 + const issue_event = try evt.read(evt.Issue.Record, DB, repo_opts.hash, arena, issue_map); │ │188 const order_key = try aa.dupe(u8, &evt.orderKeyDesc(issue_event.created_ts, &id_bytes)); │ │189 │ │190 // the named issue must be in its windowed set (a tag url can name an │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────╮ │191 // issue that doesn't carry the tag). │ │192 - const set = (switch (issue_event.status) { │ │192 + const set = (switch (issue_event.event.status) {│ │193 .open => open_set, │ │194 .closed => closed_set, │ │195 }) orelse return error.NotFound; │ ╰─────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────╮ │196 if (!try set.contains(order_key)) return error.NotFound;│ │197 │ │198 - switch (issue_event.status) { │ │198 + switch (issue_event.event.status) { │ │199 .open => open_root = order_key, │ │200 .closed => closed_root = order_key, │ │201 } │ ╰─────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │202 // an edit url keeps its view; otherwise the issue's status picks it. │ │203 - if (empty.view != .edit) resolved_view = switch (issue_event.status) { │ │203 + if (empty.view != .edit) resolved_view = switch (issue_event.event.status) {│ │204 .open => .open, │ │205 .closed => .closed, │ │206 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯