╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │58 // the fork's viewer is the target repo's │ │59 const handle = ui.RepoHandle{ │ │60 .location = .{ .fork = .{ .identity = identity.identity, .id = &id_hex } },│ │61 - .viewer = try ui.Viewer.init(session, arena, target.role), │ │61 + .viewer = try ui.Viewer.init(session, arena, target_role), │ │62 }; │ │63 const fork_path = try fork.forkPath(aa, users_dir, &forker_id, &id); │ │64 // a fork shares its target's hash kind │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │246 const users_dir = session.users_dir orelse return error.NoMoment; │ │247 const found = (try evt.readRepoByOwnerAndName(io, arena.child_allocator, arena, haxy_moment, users_dir, repo_identity.owner, repo_identity.name, session.userId())) orelse return error.NotFound;│ │248 // a repo the session can't read doesn't exist to it │ │249 - if (found.role == .none) return error.NotFound; │ │249 + role = found.role orelse return error.NotFound; │ │250 repo = found.repo; │ │251 - role = found.role; │ │251 repo_id_maybe = found.event_id; │ │252 │ │253 // resolve the creating user so the header can show their name to the left │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/User.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │91 _ = try pair.value_cursor.readBytes(&event_id); │ │92 const repo_event = (try evt.Repo.readById(DB, hash_kind, moment, arena, &event_id)) orelse continue; │ │93 // unreadable repos leave their window short rather than shifting the others │ │94 - if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &event_id, session.userId()) == .none) continue;│ │94 + if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &event_id, session.userId()) == null) continue; │ │95 try repos.append(arena.allocator(), repo_event); │ │96 } │ │97 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │108 const kv_cursor = (try iter.next()) orelse break; │ │109 const repo_id = try evt.readOrderKeyId(DB, kv_cursor); │ │110 const repo_event = (try evt.Repo.readById(DB, hash_kind, moment, arena, &repo_id)) orelse continue; │ │111 - if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &repo_id, session.userId()) == .none) continue;│ │111 + if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &repo_id, session.userId()) == null) continue; │ │112 try repos.append(arena.allocator(), repo_event); │ │113 } │ │114 repos_next_start = if (end < count) end else null; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │134 // the target lives in its owner's user repo │ │135 const owner_id = record.event.repo_user_id[0..evt.event_id_size]; │ │136 const target = (try evt.readRepoById(io, gpa, arena, users_dir, owner_id, record.event.repo_id[0..evt.event_id_size], session.userId())) orelse continue;│ │137 - if (target.role == .none) continue; │ │137 + if (target.role == null) continue; │ │138 const target_repo = target.repo; │ │139 │ │140 var title: []const u8 = "(unavailable)"; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │542 }; │ │543 const owner_repo = evt.parseOwnerRepoPath(identity) orelse return false; │ │544 const repo = (try evt.readRepoByOwnerAndName(io, allocator, &arena, moment, server.users_dir, owner_repo.owner, owner_repo.name, user_id)) orelse return false;│ │545 - return repo.role != .none; │ │545 + return repo.role != null; │ │546 } │ │547 │ │548 // the logged-in user the request's session cookie names │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯