File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -728,9 +728,21 @@ func (app *App) checkForNewlyBlockedPRs(ctx context.Context) {
728728 app .mu .Unlock ()
729729
730730 // Update UI after releasing the lock
731- // Only update if there are newly blocked PRs
732- if menuInitialized && len (currentBlocked ) > len (previousBlocked ) {
733- log .Print ("[BLOCKED] Updating UI for newly blocked PRs" )
731+ // Check if the set of blocked PRs has changed
732+ blockedPRsChanged := ! reflect .DeepEqual (currentBlocked , previousBlocked )
733+
734+ // Update UI if blocked PRs changed or if we cleaned up stale entries
735+ if menuInitialized && (blockedPRsChanged || removedCount > 0 ) {
736+ switch {
737+ case len (currentBlocked ) > len (previousBlocked ):
738+ log .Print ("[BLOCKED] Updating UI for newly blocked PRs" )
739+ case len (currentBlocked ) < len (previousBlocked ):
740+ log .Print ("[BLOCKED] Updating UI - blocked PRs were removed" )
741+ case blockedPRsChanged :
742+ log .Print ("[BLOCKED] Updating UI - blocked PRs changed (same count)" )
743+ default :
744+ log .Printf ("[BLOCKED] Updating UI after cleaning up %d stale entries" , removedCount )
745+ }
734746 app .setTrayTitle ()
735747 app .updateMenu (ctx )
736748 }
You can’t perform that action at this time.
0 commit comments