╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────╮ │2105 repo_events_header: Repo.Events.Header.View,│ │2106 repo_events: Repo.Events.View, │ │2107 repo_comment: Repo.Comment.Item, │ │2107 - git_remote: GitRemote.View, │ │2108 + copyable_text: CopyableText.View, │ │2109 home_users: Home.Users.View, │ │2110 home_repos: Home.Repos.View, │ │2111 auth_tab: Home.Header.AuthTab.View, │ ╰──────────────────────────────────────────────────────╯ ╭ removed ───────────╮ │src/ui/GitRemote.zig│ ╰────────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │229 inline else => |*opened| { │ │230 // local mode: bring the event db up to date with the events branch │ │231 if (session.local != null) try evt.consume(.repo, repo_kind, opened.self_repo_opts, io, gpa, opened, evt.events_ref, &.{}); │ │232 + const files_data = try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, requested_ref_or_oid, requested_ref_value, files_dir, files_line); │ │233 + const target_branch = if (files_data.ref_or_oid == .branch) files_data.ref_or_oid_value else ""; │ │234 break :blk .{ │ │233 - try Files.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, requested_ref_or_oid, requested_ref_value, files_dir, files_line), │ │235 + files_data, │ │236 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), │ │237 try Refs.init(repo_kind, opened.self_repo_opts, arena, opened, io, gpa, repo_identity.identity, refs_kind, refs_from), │ │238 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),│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │237 - try Patches.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, session, repo_id_maybe, repo_identity.identity, patches_tag, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view), │ │239 + try Patches.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, session, repo_id_maybe, repo_identity.identity, target_branch, patches_tag, patches_selected, patches_comment, patches_comments_start, patches_theirs, patches_view),│ │240 try Discussions.init(repo_kind, opened.self_repo_opts, arena, opened, io, session.haxy_moment, repo_identity.identity, discussions_tag, discussions_selected, discussions_comment, discussions_comments_start, discussions_view), │ │241 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), │ │242 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │259 issues.repo_source = source; │ │260 patches.repo_source = source; │ │261 patches.repo_id = repo_id_maybe; │ │260 - patches.target_branch = if (files.ref_or_oid == .branch) files.ref_or_oid_value else "";│ │262 discussions.repo_source = source; │ │263 │ │264 return .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │437 switch (child.*) { │ │438 .repo_header => { │ │439 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) {│ │439 - .repo_files => |*v| if (v.focusGitRemote(root_focus)) return, │ │440 - .repo_commits => |*v| if (v.focusGitRemote(root_focus)) return, │ │440 + .repo_files => |*v| if (v.focusCloneUrl(root_focus)) return, │ │441 + .repo_commits => |*v| if (v.focusCloneUrl(root_focus)) return, │ │442 else => {}, │ │443 }; │ │444 index = stack_index; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │750 } │ │751 return; │ │752 } │ │753 - if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │753 + if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(root_focus)) return; │ │754 if (self.diffActive()) { │ │755 try self.diffInput(key, root_focus); │ │756 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │944 // only the clone-url row sits directly below the repository header. │ │945 pub fn getSelectedIndex(self: *View) ?usize { │ │946 if (self.headerActive()) return 0; │ │947 - return if (self.header().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │947 + return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │948 } │ │949 │ │950 - pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │951 - return self.header().focusGitRemote(root_focus); │ │950 + pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │951 + return self.header().focusCloneUrl(root_focus); │ │952 } │ │953 }; │ │954 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1008 errdefer box.deinit(allocator); │ │1009 │ │1010 if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │1011 - var git_remote = try ui.GitRemote.View.initClone(allocator, session, identity); │ │1012 - errdefer git_remote.deinit(allocator); │ │1013 - const min_width = git_remote.minWidth(); │ │1014 - box.getFocus().child_id = git_remote.getFocus().id; │ │1015 - try box.children.put(allocator, git_remote.getFocus().id, .{ .widget = .{ .git_remote = git_remote }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } }); │ │1011 + var clone_url = try ui.CopyableText.View.initClone(allocator, session, identity); │ │1012 + errdefer clone_url.deinit(allocator); │ │1013 + const min_width = clone_url.minWidth(); │ │1014 + box.getFocus().child_id = clone_url.getFocus().id; │ │1015 + try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .copyable_text = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } });│ │1016 } │ │1017 │ │1018 var spacer = try ui.Spacer.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1036 } │ │1037 │ │1038 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │1039 - const git_remote = self.gitRemote() orelse return; │ │1040 - try git_remote.input(allocator, key, root_focus); │ │1039 + const clone_url = self.cloneUrl() orelse return; │ │1040 + try clone_url.input(allocator, key, root_focus); │ │1041 } │ │1042 │ │1043 - pub fn focusGitRemote(self: *Header.View, root_focus: *Focus) bool { │ │1044 - const git_remote = self.gitRemote() orelse return false; │ │1045 - root_focus.setFocus(git_remote.getFocus().id); │ │1043 + pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { │ │1044 + const clone_url = self.cloneUrl() orelse return false; │ │1045 + root_focus.setFocus(clone_url.getFocus().id); │ │1046 return true; │ │1047 } │ │1048 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯