Repository navigation
fix(mac): preserve explicit Copilot disconnect - #1278
Merged
iamtoruk merged 4 commits intoSep 10, 2026
Merged
Conversation
Plan and Settings treated sticky .notBootstrapped after Disconnect as missing credentials. Keep first-use and real noCredentials sign-in copy; disconnected state says quota tracking is off, credentials untouched, and Connect resumes.
Nil-quota Capacity Dock used generic OAuth retry copy. Explicit Disconnect leaves credentials, so reuse the existing disconnected Settings detail for Copilot only.
avs-io
marked this pull request as ready for review
September 9, 2026 19:51
Member
|
Pushed 1ffa3ec: removed the six post-await isSet guards. disconnectCopilot bumps copilotRefreshGen in the same MainActor block it sets the flag, so the existing generation guard on the line above already returns; all 8 focused tests pass without them. Full swift test 442/442. Note the Dock's "Complete Copilot OAuth, then click Retry" copy still shows for the no-credentials and terminal-failure cases; Kimi, Gemini and Antigravity have the same resurrect-on-relaunch bug. Merging. |
iamtoruk
approved these changes
Sep 10, 2026
iamtoruk
left a comment
Member
There was a problem hiding this comment.
Verified: bug reproduced on main, fix single-writer and provider-namespaced, 442/442 swift tests.
This was referenced Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1273.
After Disconnect, discoverable Copilot credentials could reactivate quota tracking on the next refresh or relaunch. Persist the explicit opt-out, preserve it during automatic refresh, and clear it only when the user connects again. Credentials and historical usage are preserved. Plan, Settings, and Capacity Dock distinguish an explicit disconnect from missing credentials.
Validation: the initial fix passed 46 focused/adjacent standalone tests and 47 integrated tests, including in-flight cancellation and same-defaults relaunch. The presentation follow-up passed 16 focused tests. A universal native QA build passed compilation and strict ad-hoc signature verification. Actual UI checks exercised Disconnect, Refresh, normal Quit, same-profile relaunch remaining disconnected, and explicit Connect resuming discovery. Capacity Dock's incorrect OAuth guidance was reproduced and the corrected message and Connect action verified in the app. Tests used a separate bundle identity, a fictional token, and blocked network/Keychain access; no live-account or release-signing acceptance is claimed.