╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1249 const source = request_repo.source; │ │1250 │ │1251 if (parts.kind == .patch) switch (host) { │ │1257 - .remote => |remote| { │ │1252 + .server => |server| { │ │1253 const user_id = request_author.user_id orelse return respondLoginRequired(request); │ │1254 │ │1260 - var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path });│ │1255 + var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path });│ │1256 defer admin_repo.deinit(io, allocator); │ │1257 const moment = try evt.currentMoment(evt.admin_repo_opts, &admin_repo); │ │1258 const record = try evt.Fork.readById(evt.AdminDB, evt.admin_repo_opts.hash, moment, &author_arena, &parts.id); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1260 const repo_id = evt.parseEventId(std.fs.path.basename(source.path)) catch return respondRemoveNotFound(request); │ │1261 if (!fork_record.removed and fork_record.event.stage == .draft and std.mem.eql(u8, fork_record.event.repo_id, &repo_id)) { │ │1262 const id = std.fmt.bytesToHex(parts.id, .lower); │ │1268 - const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(remote.admin_repo_path) orelse ".", "repos" });│ │1263 + const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(server.admin_repo_path) orelse ".", "repos" });│ │1264 defer allocator.free(repos_dir); │ │1265 try fork.remove(io, allocator, repos_dir, &admin_repo, &id, &user_id, author); │ │1266 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1283 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1284 defer any_repo.deinit(io, allocator); │ │1285 switch (any_repo) { │ │1291 - inline else => |*repo| evt.remove(.repo, repo_kind, repo.self_repo_opts, io, allocator, repo, &parts.id, parts.kind, author) catch |err| switch (err) { │ │1286 + inline else => |*repo| evt.remove(std.meta.activeTag(host), .repo, repo_kind, repo.self_repo_opts, io, allocator, repo, &parts.id, parts.kind, author) catch |err| switch (err) {│ │1287 error.EventNotFound => return respondRemoveNotFound(request), │ │1288 else => |e| return e, │ │1289 }, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1327 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1328 defer any_repo.deinit(io, allocator); │ │1329 switch (any_repo) { │ │1335 - inline else => |*repo| try evt.Discussion.update(repo_kind, repo.self_repo_opts, io, allocator, repo, id, title, tags, description, author), │ │1330 + inline else => |*repo| try evt.Discussion.update(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, id, title, tags, description, author),│ │1331 } │ │1332 }, │ │1333 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1433 │ │1434 const draft_user_id = if (parts.thread_kind == .patch) request_author.user_id else null; │ │1435 if (draft_user_id) |user_id| { │ │1441 - const remote = switch (host) { │ │1442 - .remote => |remote| remote, │ │1436 + const server = switch (host) { │ │1437 + .server => |server| server, │ │1438 .local => unreachable, │ │1439 }; │ │1440 const request_repo = (try requestRepoSource(io, allocator, host, parts.repo_base)) orelse return respondRemoveNotFound(request);│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1445 return respondThreadFormFailure(request, allocator, host, form_location, invalidTargetBranchFeedback(title, tags, description, target_branch));│ │1446 } │ │1447 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │1453 - var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path }); │ │1448 + var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ │1449 defer admin_repo.deinit(io, allocator); │ │1450 const id = std.fmt.bytesToHex(parts.thread_id, .lower); │ │1456 - const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(remote.admin_repo_path) orelse ".", "repos" }); │ │1451 + const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(server.admin_repo_path) orelse ".", "repos" }); │ │1452 defer allocator.free(repos_dir); │ │1453 const fork_path = try fork.forkPath(allocator, repos_dir, &id); │ │1454 defer allocator.free(fork_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │1672 var page_arena = std.heap.ArenaAllocator.init(allocator); │ │1673 defer page_arena.deinit(); │ │1674 │ │1680 - // the remote admin repo must outlive the page build, since the session's│ │1675 + // the server admin repo must outlive the page build, since the session's│ │1676 // moment reads from it. │ │1677 var repo_maybe: ?rp.Repo(.xit, evt.admin_repo_opts) = null; │ │1678 defer if (repo_maybe) |*repo| repo.deinit(io, allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1679 │ │1680 var session = switch (host) { │ │1686 - .remote => |remote| blk: { │ │1681 + .server => |server| blk: { │ │1682 // open the admin repo to read live user/repo data. │ │1688 - repo_maybe = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path });│ │1683 + repo_maybe = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path });│ │1684 const repo = if (repo_maybe) |*repo| repo else unreachable; │ │1685 var session = try ui.Session.init(&page_arena, repo, session_data); │ │1686 // give the page builders filesystem access to the on-disk repos (a │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1687 // sibling "repos" dir next to the admin repo) so the Repo page can │ │1688 // read its files. │ │1694 - session.repos_dir = try std.fs.path.join(page_arena.allocator(), &.{ std.fs.path.dirname(remote.admin_repo_path) orelse ".", "repos" });│ │1689 + session.repos_dir = try std.fs.path.join(page_arena.allocator(), &.{ std.fs.path.dirname(server.admin_repo_path) orelse ".", "repos" });│ │1690 break :blk session; │ │1691 }, │ │1692 .local => |local| ui.Session{ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯