From 1ffa3ec6c6004ba59e5586e57d3f4137de6bdb56 Mon Sep 17 00:00:00 2001 From: iamtoruk Date: Wed, 9 Sep 2026 22:45:35 -0700 Subject: [PATCH] fix(mac): drop the post-await disconnect guards the refresh generation already covers --- mac/Sources/CodeBurnMenubar/AppStore.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mac/Sources/CodeBurnMenubar/AppStore.swift b/mac/Sources/CodeBurnMenubar/AppStore.swift index 9b8134ec..7187c220 100644 --- a/mac/Sources/CodeBurnMenubar/AppStore.swift +++ b/mac/Sources/CodeBurnMenubar/AppStore.swift @@ -1736,17 +1736,14 @@ final class AppStore { do { let usage = try await copilotQuotaRuntime.refresh() guard gen == copilotRefreshGen else { return } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return } copilotUsage = usage copilotError = nil copilotLoadState = .loaded } catch let err as CopilotSubscriptionService.FetchError { guard gen == copilotRefreshGen else { return } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return } applyCopilotFetchError(err) } catch { guard gen == copilotRefreshGen else { return } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return } copilotError = sanitizeForUI(error.localizedDescription) copilotLoadState = .failed } @@ -1782,19 +1779,16 @@ final class AppStore { do { let usage = try await copilotQuotaRuntime.refresh() guard gen == copilotRefreshGen else { return false } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false } copilotUsage = usage copilotError = nil copilotLoadState = .loaded return true } catch let err as CopilotSubscriptionService.FetchError { guard gen == copilotRefreshGen else { return false } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false } applyCopilotFetchError(err) return false } catch { guard gen == copilotRefreshGen else { return false } - if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false } copilotError = sanitizeForUI(error.localizedDescription) copilotLoadState = .failed return false