Repository navigation
Conversation
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough
🚥 Pre-merge checks | ✅ 3 | ❌ 2
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/renderer/src/components/settings/AccountsPane.tsx (1)
1191-1194: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemember to sync the locale catalog for the new key.
importCodexHomeis a new translate key with only an English fallback baked into the code. Based on learnings, when adding a localization key you should validate/update the catalogs withpnpm sync:localization-catalog,pnpm verify:localization-catalog, andpnpm verify:localization-coveragesoes/ja/ko/zhstay in sync.Based on learnings: "When making any localization change, validate/update the catalogs using
pnpm sync:localization-catalog,pnpm verify:localization-catalog, andpnpm verify:localization-coverage."Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 404590c1-1603-485e-b051-38478c205b6e
📒 Files selected for processing (9)
src/main/codex-accounts/import-existing-codex-home.test.tssrc/main/codex-accounts/import-existing-codex-home.tssrc/main/codex-accounts/service.test.tssrc/main/codex-accounts/service.tssrc/main/ipc/codex-accounts.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/web/web-preload-api.ts
8c7f046 to
234a00c
Compare
Sync update (
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4d780d1c-02d1-4c6e-840c-d4421fb55e77
📥 Commits
Reviewing files that changed from the base of the PR and between 81e7a2d and 234a00cb86e33952940318634543e02eb55410bd.
📒 Files selected for processing (9)
src/main/codex-accounts/import-existing-codex-home.test.tssrc/main/codex-accounts/import-existing-codex-home.tssrc/main/codex-accounts/service.test.tssrc/main/codex-accounts/service.tssrc/main/ipc/codex-accounts.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/web/web-preload-api.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/preload/api-types.ts
- src/renderer/src/web/web-preload-api.ts
- src/main/codex-accounts/import-existing-codex-home.test.ts
- src/main/codex-accounts/service.test.ts
- src/preload/index.ts
- src/renderer/src/components/settings/AccountsPane.tsx
234a00c to
5efcc8e
Compare
Sync update (
|
5efcc8e to
ca54ef3
Compare
[Medium impact] Adds account import flow for existing CODEX_HOME directories. The recursive import must be contained before merging because a selectable source layout can make it copy managed credentials or recurse into its own destination. Findings
SummaryThe PR adds a desktop flow for importing an authenticated external CODEX_HOME into managed account storage without another login.
|
| await cp(from, to, { | ||
| recursive: true, | ||
| force: true, | ||
| // Why: CODEX_HOME often holds symlinks (skills, config overlays); copy | ||
| // contents so the managed home stays self-contained on every host. | ||
| dereference: true | ||
| }) |
There was a problem hiding this comment.
Recursive copy escapes containment
When the selected CODEX_HOME contains a directory symlink targeting Orca managed storage, or contains Orca’s user-data directory as a descendant, this recursive copy dereferences that path and enters the managed account tree or its own destination, causing credential duplication, runaway disk usage, or a failed partial import. Validate both containment directions and nested symlink targets before copying.
Allow Settings → Codex Accounts → Import CODEX_HOME to copy an already authenticated external home into Orca managed storage and register it as a normal managed account (issue stablyai#10366 Option B).
CodeRabbit: use statSync for type checks; async cp so large homes do not block the Electron main process.
ca54ef3 to
9a3d509
Compare
Sync update (
|
Summary
CODEX_HOMEinto Orca managed storage and registers it as a normal managed account without runningcodex loginagain (issue Option B)auth.json, resolves OAuth identity (email required), refuses import from Orca managed storage or WSL slots (host only for now)Closes #10366
Motivation
Power users keep isolated homes (
~/.codex-work, device-auth flows, enterprise login). Today every extra account must go through Orca's browser login, so those homes cannot be reused.Implementation
CodexAccountService.importAccountFromExistingHome(sourceHomePath, target?)import-existing-codex-home.ts(validate, copy, ownership marker)codexAccounts:importExistingHome+ preload APITest plan
codex login, rejects API-key-only and WSL targetservice.test.ts+ helper tests (72 pass, including custom-provider import rejection)~/.codex-*with priorcodex login→ account appears and becomes active without browser loginNotes
ELI5
You can import an already-logged-in CODEX_HOME into Orca managed accounts without running codex login again. Handy if you keep separate Codex homes for different workflows.