╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │357 + .view = view, │ │358 .kind = kind, │ │359 .selected = Array(evt.event_id_size * 2).from(selected) orelse return null,│ │360 } }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │580 break :blk if (e.kind) |kind| │ │581 try std.fmt.allocPrint(arena.allocator(), "{s}/event:{s}/kind:{s}", .{ prefix, e.selected.slice(), @tagName(kind) }) │ │582 else │ │579 - try std.fmt.allocPrint(arena.allocator(), "{s}/events", .{prefix}); │ │583 + try std.fmt.allocPrint(arena.allocator(), "{s}/events/{s}", .{ prefix, @tagName(e.view) }); │ │584 }, │ │585 .repo_settings => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/settings", .{try repoUrlPrefix(arena, name.slice())}),│ │586 .repo_auth => |name| try std.fmt.allocPrint(arena.allocator(), "{s}/auth", .{try repoUrlPrefix(arena, name.slice())}), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │768 if (std.mem.eql(u8, w, "new")) return if (tag_value.len == 0) repoIssuesNewRoute(pair) else null;│ │769 return null; │ │770 } │ │767 - if (std.mem.eql(u8, tab, "events")) │ │768 - return if (segments.next() == null) repoEventsRoute(pair, null, "") else null; │ │771 + if (std.mem.eql(u8, tab, "events")) { │ │772 + const view = if (segments.next()) |word| │ │773 + std.meta.stringToEnum(EventsView, word) orelse return null │ │774 + else │ │775 + .active; │ │776 + return if (segments.next() == null) repoEventsRoute(pair, view, null, "") else null; │ │777 + } │ │778 if (std.mem.startsWith(u8, tab, "event:")) { │ │779 const event_id = tab["event:".len..]; │ │780 const kind_segment = segments.next() orelse return null; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │781 if (!std.mem.startsWith(u8, kind_segment, "kind:")) return null; │ │782 const kind = std.meta.stringToEnum(evt.EventKind, kind_segment["kind:".len..]) orelse return null;│ │783 if (event_id.len == 0 or segments.next() != null) return null; │ │775 - return repoEventsRoute(pair, kind, event_id); │ │784 + return repoEventsRoute(pair, .active, kind, event_id); │ │785 } │ │786 if (std.mem.eql(u8, tab, files_seg)) { │ │787 params.scanPairs(&segments) catch return null; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │841 a_i.comments_start == b.repo_issues.comments_start and │ │842 std.mem.eql(u8, a_i.comment.slice(), b.repo_issues.comment.slice()), │ │843 .repo_events => |a_e| std.mem.eql(u8, a_e.name.slice(), b.repo_events.name.slice()) and│ │844 + a_e.view == b.repo_events.view and │ │845 a_e.kind == b.repo_events.kind and │ │846 std.mem.eql(u8, a_e.selected.slice(), b.repo_events.selected.slice()), │ │847 .repo_settings => |a_name| std.mem.eql(u8, a_name.slice(), b.repo_settings.slice()), │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │1378 // file to the url after the prefix │ │1379 pub const file_input_prefix = "file:"; │ │1380 │ │1381 +// a submit button that overrides its enclosing form's action │ │1382 +pub const submit_action_prefix = "submit:"; │ │1383 + │ │1384 // the url an `ax:` link points at, or null for anything else. a host that│ │1385 // suppresses the anchor's own navigation needs this to follow the link. │ │1386 pub fn rawLink(root_focus: *Focus, focus_id: usize) ?[]const u8 { │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────╮ │131 .repo_events => |e| e.kind, │ │132 else => null, │ │133 }; │ │134 + const events_view: ui.RoutablePage.EventsView = switch (route) {│ │135 + .repo_events => |e| e.view, │ │136 + else => .active, │ │137 + }; │ │138 const events_selected: []const u8 = switch (route) { │ │139 .repo_events => |*e| e.selected.slice(), │ │140 else => "", │ ╰─────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 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), │ │200 try Refs.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, refs_kind, refs_from), │ │201 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), │ │202 + try Events.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, events_view, events_kind, events_selected, session.local != null, session.data.sync_failure), │ │203 }; │ │204 }, │ │205 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │212 try Commits.emptyResult(aa, repo_identity.identity, requested_ref_or_oid orelse .branch, requested_ref_value, commits_content), │ │213 try Refs.emptyResult(arena, repo_identity.identity, refs_kind, refs_from), │ │214 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), │ │215 + try Events.empty(aa, repo_identity.identity, events_view, session.local != null, session.data.sync_failure), │ │216 }; │ │217 }; │ │218 issues.repo_source = source; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │363 // the issues tab mirrors this page's tag filter (issue urls │ │364 // themselves never carry the tag). │ │365 .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, │ │366 + .repo_events => self.session.data.current_page = ui.RoutablePage.repoEventsRoute(self.data.identity.slice(), self.data.events.view, null, "") orelse self.session.data.current_page,│ │367 .home_settings => { │ │368 if (ui.RoutablePage.Array(ui.RoutablePage.repo_route_max_len).from(self.data.identity.slice())) |identity| │ │369 self.session.data.current_page = .{ .repo_settings = identity }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯