feat: support Edge browser cookie import for Codex provider#521
Open
Astro-Han wants to merge 7 commits intosteipete:mainfrom
Open
feat: support Edge browser cookie import for Codex provider#521Astro-Han wants to merge 7 commits intosteipete:mainfrom
Astro-Han wants to merge 7 commits intosteipete:mainfrom
Conversation
…te#506) Write the resolved refreshFrequency value to UserDefaults when the key is absent, matching the pattern used by sessionQuotaNotificationsEnabled and other settings. This ensures the key appears in the plist from the very first run and survives app restarts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also write back the resolved default when UserDefaults contains an unrecognized rawValue, preventing silent fallback on every launch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract parsed result into a local variable to avoid calling flatMap twice, matching the three-step pattern used by other settings. Add test for unrecognized rawValue repair on init. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mport Replace separate tryChrome/tryFirefox methods with a generic tryBrowser that handles any non-Safari browser. Previously the trySource switch only matched .safari/.chrome/.firefox, silently ignoring Edge, Brave, Arc and all other browsers detected by SweetCookieKit. Closes steipete#372
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.
Summary
OpenAIDashboardBrowserCookieImporter.trySourcewith a generictryBrowsermethod that handles any non-Safari browserdefault: nildropped them — now they route through the same cookie loading path via SweetCookieKitContext
SweetCookieKit already has full Edge support (enum, profile paths, keychain labels, decryption). Other providers (MiniMax, Augment, Kimi) already iterate all browsers generically. The Codex/OpenAI web cookie importer was the only place still using a closed browser list.
Closes #372
Test plan
swift buildpassesswift testpasses — 8 pre-existing Claude OAuth keychain test failures are unrelated (they depend on real keychain credentials not present in dev environments, same failures onmain)swiftformatandswiftlint --strictpassNo new unit tests added: the original
tryChrome/tryFirefoxhad no unit tests either, astrySourcedepends on real browser cookie stores and Keychain access. The existingOpenAIDashboardBrowserCookieImporterTestsonly covers error message formatting.