╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │265 // a server shows events to whoever it shows undo to, so the route follows │ │266 if (route == .repo_events and session.data.host_kind != .local and !undo_allowed) return error.NotFound;│ │267 const undo_index = if (route == .repo_undo) route.repo_undo.index else null; │ │268 + const undo_clear = route == .repo_undo and route.repo_undo.clear; │ │269 // an unreadable repo still shows the tab, like every other tab │ │270 var undo_data: ?Undo = if (undo_allowed) .{ .identity = repo_identity.identity } else null; │ │271 const files, const changes, const refs, var issues, var patches, var discussions, const events = blk: { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │327 try Events.empty(aa, repo_identity.identity, events_view, session.local != null, session.data.sync_failure),│ │328 }; │ │329 }; │ │329 - if (undo_data) |*undo| undo.can_undo = session.local != null or evt.Repo.roleOf(repo, session.userId()) == .owner; │ │330 + if (undo_data) |*undo| { │ │331 + undo.can_undo = session.local != null or evt.Repo.roleOf(repo, session.userId()) == .owner; │ │332 + undo.clear = undo_clear; │ │333 + } │ │334 if (route == .repo_undo and undo_data == null) return error.NotFound; │ │335 issues.repo_source = source; │ │336 patches.repo_source = source; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │519 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) {│ │520 .repo_files => |*v| if (v.focusHeader(root_focus)) return, │ │521 .repo_commits => |*v| if (v.focusHeader(root_focus)) return, │ │522 + .repo_undo => |*v| if (v.focusHeader(root_focus)) return, │ │523 else => {}, │ │524 }; │ │525 index = stack_index; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯