╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────╮ │17 pub const Refs = @import("./Repo/Refs.zig"); │ │18 pub const Issues = @import("./Repo/Issues.zig"); │ │19 pub const Comment = @import("./Repo/Comment.zig");│ │20 +pub const Events = @import("./Repo/Events.zig"); │ │21 pub const Settings = @import("./Settings.zig"); │ │22 pub const Auth = @import("./Auth.zig"); │ │23 pub const Quit = @import("./Quit.zig"); │ ╰──────────────────────────────────────────────────────╯ ╭───────────────────────╮ │30 commits: Commits, │ │31 refs: Refs, │ │32 issues: Issues, │ │33 +events: Events, │ │34 settings: Settings,│ │35 auth: Auth, │ │36 quit: Quit, │ ╰───────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │126 const issues_comments_start: usize = switch (route) { │ │127 .repo_issues => |i| i.comments_start, │ │128 else => 0, │ │129 + }; │ │130 + const events_kind: ?evt.EventKind = switch (route) { │ │131 + .repo_events => |e| e.kind, │ │132 + else => null, │ │133 + }; │ │134 + const events_selected: []const u8 = switch (route) { │ │135 + .repo_events => |*e| e.selected.slice(), │ │136 + else => "", │ │137 }; │ │138 │ │139 // where the on-disk repo lives (null keeps the views' empty fallback), plus│ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │177 // route named none), so they end up viewing the same one and either's │ │178 // resolved ref can canonicalize the tab mirror urls below. no filesystem│ │179 // (wasm), nowhere to look, or a failed open: empty tabs. │ │170 - const files, const commits, const refs, var issues = blk: { │ │180 + const files, const commits, const refs, var issues, const events = blk: {│ │181 read: { │ │182 const io = session.io orelse break :read; │ │183 const src = source orelse break :read; │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │195 try Commits.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, session.haxy_moment, repo_identity.identity, requested_ref_or_oid, requested_ref_value, commits_content), │ │196 try Refs.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, refs_kind, refs_from), │ │197 try Issues.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, issues_tag, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view),│ │198 + try Events.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, events_kind, events_selected, session.local != null, session.data.sync_failure), │ │199 }; │ │200 }, │ │201 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │208 try Commits.emptyResult(aa, repo_identity.identity, requested_ref_or_oid orelse .branch, requested_ref_value, commits_content), │ │209 try Refs.emptyResult(arena, repo_identity.identity, refs_kind, refs_from), │ │210 try Issues.emptyResult(aa, repo_identity.identity, issues_tag, issues_selected, issues_comment, issues_comments_start, issues_theirs, issues_view),│ │211 + try Events.empty(aa, repo_identity.identity, session.local != null, session.data.sync_failure), │ │212 }; │ │213 }; │ │214 issues.repo_source = source; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────╮ │238 .commits = commits, │ │239 .refs = refs, │ │240 .issues = issues, │ │241 + .events = events, │ │242 .settings = Settings.init(),│ │243 .auth = Auth.init(), │ │244 .quit = Quit.init(), │ ╰─────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │300 try stack.children.put(allocator, issues_view.getFocus().id, .{ .repo_issues = issues_view });│ │301 } │ │302 │ │303 + { │ │304 + var events_view = try Events.View.init(allocator, &data.events, session); │ │305 + errdefer events_view.deinit(allocator); │ │306 + try stack.children.put(allocator, events_view.getFocus().id, .{ .repo_events = events_view });│ │307 + } │ │308 + │ │309 // the header only shows the settings tab with a login and the auth │ │310 // tab outside local mode, so keep the stack's children 1:1 with │ │311 // the tabs by skipping the same views. │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │359 // the issues tab mirrors this page's tag filter (issue urls │ │360 // themselves never carry the tag). │ │361 .repo_issues => self.session.data.current_page = ui.RoutablePage.repoIssuesRoute(self.data.identity.slice(), .open, self.data.issues.tag, "") orelse self.session.data.current_page,│ │362 + .repo_events => self.session.data.current_page = ui.RoutablePage.repoEventsRoute(self.data.identity.slice(), null, "") orelse self.session.data.current_page, │ │363 .home_settings => { │ │364 if (ui.RoutablePage.Array(ui.RoutablePage.repo_route_max_len).from(self.data.identity.slice())) |identity| │ │365 self.session.data.current_page = .{ .repo_settings = identity }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────╮ │400 .repo_commits => |*v| v.getSelectedIndex() == 0, │ │401 .repo_refs => |*v| v.getSelectedIndex() == 0, │ │402 .repo_issues => |*v| v.getSelectedIndex() == 0, │ │403 + .repo_events => |*v| v.getSelectedIndex() == 0, │ │404 .home_settings => |*v| v.getSelectedIndex() == 0,│ │405 .home_auth => |*v| v.getSelectedIndex() == 0, │ │406 .quit => |*v| v.getSelectedIndex() == 0, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯