Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ee0530c99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBar/Providers/Codex/CodexProviderImplementation.swift
Outdated
Show resolved
Hide resolved
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c99e55a00b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBar/Providers/Codex/CodexProviderImplementation.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec149a8ca4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f1c28541c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Token-account and other provider config updates bump configRevision; rebuilding every NSStatusItem via removeStatusItem reflows the system menu bar and makes other apps' extras flicker. Rebuild only when provider order changes. Made-with: Cursor
Resolve menu/icon/widget credits from codexActiveMenuCredits using allAccountCredits for add-on accounts; primary keeps RPC/dashboard store. Remove primary-only notice; show unlimited and loading states; add tests. Made-with: Cursor
…rimary missing - Use TokenAccountSupportCatalog envOverride for per-account credit refresh; load OPENAI_API_KEY-only env as API-key creds - isDefaultTokenAccountActive + display index for fetches/UI when ~/.codex primary is gone - Tests for env load and Claude token-account selection Made-with: Cursor
…ment - Introduced a new setting to allow CodexBar to ignore ~/.codex as an implicit account, requiring users to manage accounts explicitly through the UI. - Updated various components to reflect this change, including adjustments to account selection logic and UI elements. - Enhanced the handling of account-related actions and settings to improve user experience and clarity. Made-with: Cursor
Move Multi-Account toggles above the Accounts section so toggling never shifts scroll position. Rename Use → Default/Make Default, add drag-and-drop reordering, gate multi-account UI behind a toggle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add per-account WKWebView login windows for chatgpt.com dashboard, replacing the failed synthetic OAuth cookie approach. Each account gets isolated cookie storage. Dashboard login auto-opens after OAuth account creation when web extras is enabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add per-account WKWebsiteDataStore keyed by CODEX_HOME path (not email) so accounts with the same email but different workspaces get separate dashboard sessions - Add "OpenAI Web Dashboard" toggle in Multi-Account settings section - Show "Dashboard" / "Login to Dashboard" button per account row based on individual login state, with logout option in edit mode - Add "Usage Dashboard" / "Login to OpenAI Dashboard" in menu dropdown (below Buy Credits) reflecting active account's dashboard state - Fix WKWebView and rename TextField keyboard input by switching to NSApp.activationPolicy(.regular) temporarily - Fix dashboard window not closing Settings when dismissed - View-only mode for already-logged-in accounts (no auto-close polling) - Track dashboard login state via observable set on UsageStore for reactive SwiftUI updates - Suppress cost data when "CodexBar accounts only" is on with no accounts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each account uses its own WKWebView cookie store via the dashboard login window, making browser cookie import redundant and error-prone. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@ratulsarna added features and streamlined codex experience more: // Multi-account support: add, reorder, and switch between multiple Codex accounts with drag-and-drop |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d04b7cbe87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ation history Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…le dashboard key P1: Clear all cached credits/dashboard/cost data when codexExplicitAccountsOnly has no accounts, not just snapshots/errors/sourceLabel. P1: Reset selected token account to primary when multi-account toggle is turned off, so Codex stops fetching against a hidden CODEX_HOME override. P2: Use stable ~/.codex path as the default account dashboard key instead of the editable display label, so renaming doesn't break dashboard session persistence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
CodexBar/Sources/CodexBar/UsageStore.swift
Lines 655 to 656 in 3747c2c
In multi-account mode, the dashboard login window stores cookies in a WKWebsiteDataStore keyed by the per-account identifier (CODEX_HOME path / token), but refreshOpenAIDashboardIfNeeded() still derives the fetch key from codexAccountEmailForOpenAIDashboard(). For any added Codex account, that means the post-login refresh reads a different cookie store than the one the user just signed into, so "Login to Dashboard" can immediately fall back to a login-required state; accounts that share the same email also collapse onto one dashboard session.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sources/CodexBar/Providers/Codex/CodexProviderImplementation.swift
Outdated
Show resolved
Hide resolved
…oard, guard Add Account P1: refreshOpenAIDashboardIfNeeded now uses CODEX_HOME path (same key as the dashboard login window) instead of email, so per-account WKWebView cookie stores are correctly matched after login. P2: Skip dashboard login/logout UI for API-key accounts (apikey: prefix) to prevent raw secrets from leaking into UserDefaults and menu payloads. P2: Hide "Add Account..." menu item when codexMultipleAccountsEnabled is off, preventing silent switch to a hidden account. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aaf96c5c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Remove stale Add Account label override; use standard Switch/Add Account - Fix Usage history (30 days) missing in multi-account sectioned card path - Use card-style items for Credits history, Usage breakdown, Usage history buttons so chevron aligns with Subscription Utilization - Fix stale openAIDashboardCookieImportStatus shown when enabling multi-account - Fix dashboard error message showing raw file path in multi-account mode - Persist widget snapshot immediately on multi-account toggle for instant update - Include codexMultipleAccountsEnabled in menu structure fingerprint so account switcher disappears immediately on toggle off
The Login/Dashboard button label already communicates dashboard login state. Credits come from the Codex RPC/OAuth API, not the web dashboard scrape, so a dashboard-login error in the Credits section is both misleading and redundant.
There was a problem hiding this comment.
💡 Codex Review
CodexBar/Sources/CodexBar/StatusItemController+Actions.swift
Lines 97 to 99 in dcdf56b
The rest of this change switches dashboard cookies to a CODEX_HOME-based identifier so accounts with the same email but different workspaces stay isolated, but Buy Credits still opens the WebKit store keyed by codexAccountEmailForOpenAIDashboard(). In the same-email/multiple-workspace case, this can reuse the wrong dashboard session and send the user to another account’s billing page.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
CodexBar/Sources/CodexBar/StatusItemController+Actions.swift
Lines 96 to 99 in 6676a9f
In multi-account mode, dashboard cookies are now isolated by the account identifier (CODEX_HOME path or ~/.codex), but Buy Credits… still opens OpenAICreditsPurchaseWindowController with codexAccountEmailForOpenAIDashboard(). That points the purchase window at a different WKWebsiteDataStore, so after logging into the dashboard for a specific Codex row, the billing flow can still open logged out or on the wrong account.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
CodexBar/Sources/CodexBar/UsageStore.swift
Lines 790 to 791 in 94ec6e6
When the per-account ChatGPT session expires, this branch marks openAIDashboardRequiresLogin but leaves dashboardLoggedInEmails untouched. The menu/settings actions still render Usage Dashboard and pass viewOnly: true into openCodexDashboard, and OpenAIDashboardLoginWindowController skips login detection in that mode, so users cannot complete a re-login from this action until they manually log out the account first.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… logout clears snapshot
…Required, apikey leaking as data-store key
…enAccount index bounds
…ctive-codex-home in sync on switch/delete
… per-account sessions directories - API-key Codex accounts now fetch cost/usage via the OpenAI REST API (OpenAIAPIUsageFetcher) instead of scanning local session logs, which were absent for those accounts - OAuth/path accounts continue to scan local CODEX_HOME/sessions as before; cost fetch is suppressed entirely when the active account is not API-key backed - Replace the ~/.codex/sessions symlink with a dedicated per-account sessions/ directory to keep cost data isolated across accounts - Surface token cost errors in the menu card even when no snapshot data is available (error-only state) - Add inline orange warning notice in Preferences when the active account's cost fetch fails (e.g. missing api.usage.read scope) - Make ShellIntegration helpers injectable (FileManager, directory URLs) for unit testability - Conditionally show "Cost only available for API configured accounts" hint based on multi-account state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14721e9ced
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…cit-accounts toggle - Quote the \$(cat ...) command substitution in the precmd hook so paths with spaces are not split by zsh word-splitting - Call repairCodexShellIntegrationIfNeeded() after setting codexExplicitAccountsOnly so active-codex-home is synced immediately when the toggle auto-selects the first explicit account Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- moveTokenAccount: clamp already-invalid activeIndex instead of re-persisting it - codexMultipleAccountsEnabled setter: call repairCodexShellIntegrationIfNeeded so shell CODEX_HOME is updated immediately on enable, not only after a token-account write - codexExplicitAccountsOnly getter: return false when multipleAccounts is off, preventing hand-edited config from leaving the two flags in a contradictory state - refreshAllAccountCredits: await directly so credits and usage land in the same refresh cycle, eliminating the transient mismatch window in the menu - UsageStore+ObservationHelpers: observe codexMultipleAccountsEnabled explicitly so toggling it always triggers a refresh, independent of implementation internals - Fix two affected tests to enable codexMultipleAccountsEnabled before setting codexExplicitAccountsOnly, matching the new enforced invariant Made-with: Cursor
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Multi-Account Codex Support with Per-Account Dashboard
What it does
Adds full multi-account support for Codex — add, manage, and switch between multiple OpenAI/Codex accounts (OAuth or API key) from a single CodexBar instance. Each account is fully isolated, including same-email accounts on different workspaces.
Account Management
Add accounts via OAuth (codex auth) or API key, each with its own CODEX_HOME
Drag-to-reorder, rename (pencil icon), delete (edit mode), set as default
"CodexBar accounts only" mode — ignore ~/.codex, use only explicitly added accounts
Usage Display
Per-account Session / Weekly / Code Review usage bars in the menu dropdown
Account switcher tabs in the menu dropdown
Active account's credits shown correctly even when no add-on rows exist
Per-Account OpenAI Dashboard
"OpenAI Web Dashboard" toggle controls dashboard button visibility
Each account row shows "Dashboard" or "Login to Dashboard" based on per-account login state
Per-account cookie isolation keyed by CODEX_HOME path — same-email accounts on different workspaces get separate WebKit sessions
"Usage Dashboard" / "Login to OpenAI Dashboard" in the menu reflects the active account's state
Logout clears the account's session and snapshot immediately
**API-key accounts are excluded from web scraping and dashboard login (no ChatGPT session exists for them)
Cost & Usage Availability
Cost and 30-day usage history are only available for accounts that can supply an OpenAI API key:
API-key accounts — fetched directly via the OpenAI REST API (/v1/organization/usage)
~/.codex default account — uses the API key from ~/.codex/auth.json if present
OAuth accounts (added via codex auth with a separate CODEX_HOME path) do not show cost or usage history. OAuth sessions have no associated API key, so there is no way to query the OpenAI usage endpoint. The Usage section is hidden for these accounts; a note in both the settings and the Usage section header makes this clear.
Single Account Widget Multi Account Widget Updated Codex Settings