╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │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, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │120 const refs_link = try std.fmt.allocPrint(aa, "ai:{s}", .{try refs_route.toUrl(session.page_arena)}); │ │121 const issues_route = ui.RoutablePage.repoIssuesRoute(identity, .open, data.issues_tag, "") orelse return error.RouteTooLong;│ │122 const issues_link = try std.fmt.allocPrint(aa, "ai:{s}", .{try issues_route.toUrl(session.page_arena)}); │ │123 + const events_route = ui.RoutablePage.repoEventsRoute(identity, null, "") orelse return error.RouteTooLong; │ │124 + const events_link = try std.fmt.allocPrint(aa, "ai:{s}", .{try events_route.toUrl(session.page_arena)}); │ │125 const settings_route = ui.RoutablePage{ .repo_settings = Array.from(identity) orelse return error.RouteTooLong }; │ │126 const settings_link = try std.fmt.allocPrint(aa, "ai:{s}", .{try settings_route.toUrl(session.page_arena)}); │ │127 const auth_route = ui.RoutablePage{ .repo_auth = Array.from(identity) orelse return error.RouteTooLong }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────╮ │133 .repo_commits => commits_link, │ │134 .repo_refs => refs_link, │ │135 .repo_issues => issues_link, │ │136 + .repo_events => events_link, │ │137 .repo_settings => settings_link,│ │138 .repo_auth => auth_link, │ │139 else => files_link, │ ╰─────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │197 .widget = .{ .text_box = text_box }, │ │198 .rect = null, │ │199 .min_size = .{ .width = "issues".len + 2, .height = null }, │ │200 + }); │ │201 + } │ │202 + │ │203 + // events │ │204 + { │ │205 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "events", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │206 + errdefer text_box.deinit(allocator); │ │207 + text_box.getFocus().focusable = true; │ │208 + text_box.getFocus().kind = .{ .custom = events_link }; │ │209 + try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │210 + if (std.mem.eql(u8, events_link, current_link)) selected_tab = text_box.getFocus().id; │ │211 + try box.children.put(allocator, text_box.getFocus().id, .{ │ │212 + .widget = .{ .text_box = text_box }, │ │213 + .rect = null, │ │214 + .min_size = .{ .width = "events".len + 2, .height = null }, │ │215 }); │ │216 } │ │217 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯