From 3b677cbcfeec18bdffaf1bb846c6ae2f0f85a4fa Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 8 Feb 2026 10:14:14 +1100 Subject: [PATCH] Fetch PRs after checkout (not blocking UI) If you check out a new branch via the remote branches tab you'd want to see its status --- pkg/gui/controllers/helpers/refs_helper.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go index 7b58edc1e..3e5068bc6 100644 --- a/pkg/gui/controllers/helpers/refs_helper.go +++ b/pkg/gui/controllers/helpers/refs_helper.go @@ -66,6 +66,11 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions types.STATUS, types.BISECT_INFO, types.STAGING, + }, Then: func() { + // Fetch PRs in the background after checkout; the new branch may + // have a PR that we haven't fetched yet. We do this in Then so + // that branches are loaded first (PRs are matched against branches). + self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.PULL_REQUESTS}}) }}) }