From a364a8d75ca5e584d5dfd678fb856a1d9c062657 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 7 May 2026 08:30:43 +0200 Subject: [PATCH] Bounce explicit LocalCommits render in refreshBranches to UI thread refreshBranches runs on a worker goroutine and re-renders the commits view directly to refresh the branch-head visualization. As with refreshView, this currently only flushes because HandleRender ends with self.c.Render(). Wrap the explicit HandleRender call (along with the LocalCommitsMutex pair around it) in OnUIThread so it keeps working once Render() is removed. --- pkg/gui/controllers/helpers/refresh_helper.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 6638d150c..cb17ffd43 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -532,9 +532,12 @@ func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSele // Need to re-render the commits view because the visualization of local // branch heads might have changed - self.c.Mutexes().LocalCommitsMutex.Lock() - self.c.Contexts().LocalCommits.HandleRender() - self.c.Mutexes().LocalCommitsMutex.Unlock() + self.c.OnUIThread(func() error { + self.c.Mutexes().LocalCommitsMutex.Lock() + self.c.Contexts().LocalCommits.HandleRender() + self.c.Mutexes().LocalCommitsMutex.Unlock() + return nil + }) self.refreshStatus() }