From 5b596bb62b7c42369f8e8ceeab717fedc9f23e71 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 25 Apr 2026 14:21:37 +0200 Subject: [PATCH] Stop showing cached PRs when we no longer have a base remote If we used to have a base remote (e.g. because there was only one), but now we don't (e.g. because the user has added a second one, and we don't know yet which one is the base), stop showing the cached PRs. This is especially important in the case that the user cancels the prompt, in which case we don't have a base remote for the rest of the session, but would keep showing the (potentially stale) cached PRs forever. --- pkg/gui/controllers/helpers/refresh_helper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 71e5282d9..ec2ad0d19 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -819,6 +819,9 @@ func (self *RefreshHelper) refreshGithubPullRequests() { baseRemote := self.getGithubBaseRemote() if baseRemote == nil { + self.c.Model().PullRequests = nil + self.c.Model().PullRequestsMap = nil + if !self.githubBaseRemotePromptDismissed[self.c.Git().RepoPaths.RepoPath()] { self.promptForBaseGithubRepo(authToken) }