Skip to content

feat: support Edge browser cookie import for Codex provider#521

Closed
Astro-Han wants to merge 3 commits intosteipete:mainfrom
Astro-Han:feat/edge-browser-cookie-support
Closed

feat: support Edge browser cookie import for Codex provider#521
Astro-Han wants to merge 3 commits intosteipete:mainfrom
Astro-Han:feat/edge-browser-cookie-support

Conversation

@Astro-Han
Copy link
Copy Markdown
Contributor

@Astro-Han Astro-Han commented Mar 13, 2026

Summary

  • Replace hardcoded Safari/Chrome/Firefox switch in OpenAIDashboardBrowserCookieImporter.trySource with a generic tryBrowser method that handles any non-Safari browser
  • Edge (and all other Chromium-based browsers like Brave, Arc, Vivaldi) were silently ignored because default: nil dropped them — now they route through the same cookie loading path via SweetCookieKit
  • Net code reduction: 62 lines removed, 14 added

Context

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 build passes
  • swift test passes — 8 pre-existing Claude OAuth keychain test failures are unrelated (they depend on real keychain credentials not present in dev environments, same failures on main)
  • swiftformat and swiftlint --strict pass
  • Manual: install Edge on macOS, sign into chatgpt.com, verify CodexBar picks up Codex session cookies from Edge

No new unit tests added: the original tryChrome/tryFirefox had no unit tests either, as trySource depends on real browser cookie stores and Keychain access. The existing OpenAIDashboardBrowserCookieImporterTests only covers error message formatting.

…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 #372
@Astro-Han Astro-Han force-pushed the feat/edge-browser-cookie-support branch from 2f38384 to 0fef99b Compare March 23, 2026 11:07
@Astro-Han
Copy link
Copy Markdown
Contributor Author

Hi @ratulsarna — just a gentle ping. This is a small refactor (net -44 lines) that unblocks Edge and other Chromium browsers for Codex web cookie import. Happy to adjust if needed!

@ratulsarna
Copy link
Copy Markdown
Collaborator

Opened a replacement PR here: #694

Thanks again @Astro-Han for the original work on this.

@ratulsarna ratulsarna closed this Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Microsoft Edge browser cookie support for macOS

2 participants