╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1317 theirs[2].author = .{ .name = "bob", .email = "bob@example.test" }; │ │1318 theirs[2].event.patch = theirs_values[2]; │ │1319 │ │1320 - try evt.consume(.repo, .xit, .{}, io, allocator, target_repo, evt.events_ref, &ours); │ │1320 + try evt.consume(.server, .repo, .xit, .{}, io, allocator, target_repo, evt.events_ref, &ours);│ │1321 var json: std.Io.Writer.Allocating = .init(allocator); │ │1322 defer json.deinit(); │ │1323 for (theirs, 0..) |event, i| { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1338 if (merge.result != .success) return error.MergeFailed; │ │1339 } │ │1340 try target_repo.removeBranch(io, .{ .name = other_ref.name }); │ │1341 - try evt.consume(.repo, .xit, .{}, io, allocator, target_repo, evt.events_ref, &.{}); │ │1342 - pch.refreshMergeability(.{}, io, allocator, target_repo, null); │ │1341 + try evt.consume(.server, .repo, .xit, .{}, io, allocator, target_repo, evt.events_ref, &.{});│ │1342 } │ │1343 │ │1344 // recursively copy the contents of src_dir into dest_dir │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │1764 git_http_port: ?u16 = null, │ │1765 git_ssh_port: ?u16 = null, │ │1766 git_ssh_prefix: []const u8 = "", │ │1767 - // true when this session views a single local repo. unlike `local` │ │1767 + // whether this session views a local repo or the server. unlike `local`│ │1768 // (the host-side filesystem source) this travels in the snapshot, so │ │1769 // the wasm side also parses elided link urls and hides the multi-user │ │1770 // chrome. │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │1771 - is_local: bool = false, │ │1771 + host_kind: evt.HostKind = .server, │ │1772 }; │ │1773 │ │1774 // a user-initiated state change. widgets enqueue these on the session during│ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1830 // the commit author for an event this session creates, or null when it may │ │1831 // not create one │ │1832 pub fn eventAuthor(self: *Self) !?evt.CommitAuthor { │ │1833 - if (self.data.is_local) { │ │1833 + if (self.data.host_kind == .local) { │ │1834 const src = self.local orelse return local_author_fallback; │ │1835 const io = self.io orelse return local_author_fallback; │ │1836 return try localAuthor(src, io, self.page_arena.child_allocator, self.page_arena);│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2147 if (!std.mem.startsWith(u8, custom, prefix)) return null; │ │2148 const path = custom[prefix.len..]; │ │2149 // local sessions build (and parse) links with the repo identity elided │ │2150 - return if (data.is_local) RoutablePage.fromUrlLocal(path) else RoutablePage.fromUrl(path); │ │2150 + return if (data.host_kind == .local) RoutablePage.fromUrlLocal(path) else RoutablePage.fromUrl(path);│ │2151 } │ │2152 │ │2153 // a display author, resolved against the admin db at read time │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │193 errdefer settings.deinit(allocator); │ │194 try stack.children.put(allocator, settings.getFocus().id, .{ .home_settings = settings });│ │195 } │ │196 - if (!session.data.is_local) { │ │196 + if (session.data.host_kind == .server) { │ │197 var auth = try Auth.View.init(allocator, &data.auth, session); │ │198 errdefer auth.deinit(allocator); │ │199 try stack.children.put(allocator, auth.getFocus().id, .{ .home_auth = auth }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │138 } │ │139 │ │140 // keep authentication within the fork page. │ │141 - if (!session.data.is_local) { │ │141 + if (session.data.host_kind == .server) { │ │142 var auth_tab = try AuthTab.View.init(allocator, session); │ │143 errdefer auth_tab.deinit(allocator); │ │144 auth_tab.text_box.getFocus().kind = .{ .custom = auth_link };│ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │229 switch (any_repo) { │ │230 inline else => |*opened| { │ │231 // local mode: bring the event db up to date with the events branch │ │232 - if (session.local != null) try evt.consume(.repo, repo_kind, opened.self_repo_opts, io, gpa, opened, evt.events_ref, &.{}); │ │232 + if (session.local != null) try evt.consume(.local, .repo, repo_kind, opened.self_repo_opts, io, gpa, opened, evt.events_ref, &.{}); │ │233 const files_data = try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, location, requested_ref_or_oid, requested_ref_value, files_dir, files_line);│ │234 const target_branch = if (files_data.ref_or_oid == .branch) files_data.ref_or_oid_value else ""; │ │235 break :blk .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │359 try stack.children.put(allocator, settings_view.getFocus().id, .{ .home_settings = settings_view });│ │360 } │ │361 │ │362 - if (!session.data.is_local) { │ │362 + if (session.data.host_kind == .server) { │ │363 var auth_view = try Auth.View.init(allocator, &data.auth, session); │ │364 errdefer auth_view.deinit(allocator); │ │365 try stack.children.put(allocator, auth_view.getFocus().id, .{ .home_auth = auth_view }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯