╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────╮ │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 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │314 } │ │315 const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(hash_kind, order_key[@sizeOf(u64)..])) orelse continue;│ │316 const issue_map = try DB.HashMap(.read_only).init(issue_cursor); │ │317 - const issue_event = try evt.read(evt.Issue, DB, hash_kind, arena, issue_map); │ │317 + const issue_event = try evt.read(evt.Issue.Record, DB, hash_kind, arena, issue_map); │ │318 try issues.append(aa, .{ │ │319 .id = try aa.dupe(u8, &id_hex), │ │320 .issue = issue_event, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │475 if (win.prev_id) |prev| │ │476 try addRow(allocator, &list_box, "← previous", try issuesLink(session.page_arena, data.identity, status, data.tag, prev));│ │477 for (win.issues) |entry| │ │478 - try addRow(allocator, &list_box, entry.issue.title, try issueRowLink(session.page_arena, data.identity, entry.id)); │ │478 + try addRow(allocator, &list_box, entry.issue.event.title, try issueRowLink(session.page_arena, data.identity, entry.id)); │ │479 if (win.next_id) |next| │ │480 try addRow(allocator, &list_box, "next →", try issuesLink(session.page_arena, data.identity, status, data.tag, next)); │ │481 // select the window's first issue (past a leading "previous" │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │529 // an issue form: title/tags/description inputs and a submit button, │ │530 // prefilled from `issue` when given. its form: subtree makes the web │ │531 // overlay wrap them in a <form> POSTing to `action`'s route. │ │532 - fn initIssueForm(allocator: std.mem.Allocator, action: []const u8, issue: ?*const evt.Issue) !wgt.Box(ui.Widget) { │ │532 + fn initIssueForm(allocator: std.mem.Allocator, action: []const u8, issue: ?*const evt.Issue.Record) !wgt.Box(ui.Widget) {│ │533 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │534 errdefer box.deinit(allocator); │ │535 box.getFocus().kind = .{ .custom = action }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │538 var title = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " title ", .name = "title", .visible_width = null, .rounded_corners = true, .render_content = !wasm });│ │539 errdefer title.deinit(allocator); │ │540 title.getFocus().focusable = true; │ │541 - if (issue) |i| try title.setContent(allocator, i.title); │ │541 + if (issue) |i| try title.setContent(allocator, i.event.title); │ │542 try box.children.put(allocator, title.getFocus().id, .{ .widget = .{ .text_input = title }, .rect = null, .min_size = .{ .width = null, .height = 3 } }); │ │543 } │ │544 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │546 var tags = try wgt.TextInput(ui.Widget).init(allocator, .{ .label = " tags (separate with spaces) ", .name = "tags", .visible_width = null, .rounded_corners = true, .render_content = !wasm });│ │547 errdefer tags.deinit(allocator); │ │548 tags.getFocus().focusable = true; │ │549 - if (issue) |i| try tags.setContent(allocator, i.tags); │ │549 + if (issue) |i| try tags.setContent(allocator, i.event.tags); │ │550 try box.children.put(allocator, tags.getFocus().id, .{ .widget = .{ .text_input = tags }, .rect = null, .min_size = .{ .width = null, .height = 3 } }); │ │551 } │ │552 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯