Skip to content

feat(codex): add account picker lifecycle controls - #1303

Merged
Wibias merged 2 commits into
lidge-jun:devfrom
chrisae9:split/1019-04-management-gui
Aug 8, 2026
Merged

feat(codex): add account picker lifecycle controls#1303
Wibias merged 2 commits into
lidge-jun:devfrom
chrisae9:split/1019-04-management-gui

Conversation

@chrisae9

@chrisae9 chrisae9 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an explicit Codex Auth toggle that shows one model-picker entry per configured account selector, so a conversation can target exactly one stored account without logging out, Pool rotation, fallback, or changing the active Pool account.
  • Keep the feature opt-in and role-neutral: selectors are arbitrary public labels, ordinary GPT picker rows return when the toggle is off, and existing conversations, saved model selections, selector mappings, and exact routes keep working.
  • Persist account add/remove/login and setting changes before one bounded catalog convergence. API and GUI consumers receive only the privacy-safe catalogRefreshPending completion bit; CLI and dashboard recovery guidance uses the fixed ocx sync command.
  • Preserve hand-written selector maps, extend only explicitly dashboard-managed maps, retain deleted-account bindings so routes fail closed, and restore the same selector if that account id is added again.
  • Complete the final management API + GUI slice requested in feat(codex): add account picker lifecycle settings #1019, after feat(codex): add account picker visibility setting #1096, feat(codex): initialize account picker selectors #1152, and feat(codex): converge account picker catalogs #1212.

Verification

  • bun run typecheck
  • bun test tests/codex-catalog-refresh-status.test.ts tests/settings-stream-mode.test.ts tests/codex-auth-api.test.ts tests/cli-account.test.ts — 320 passed
  • cd gui && bun run lint && bun run lint:i18n && bun run build && bun run test — 696 passed
  • cd docs-site && bun run build — 221 pages built
  • bun run privacy:scan
  • bun run audit:high — no vulnerabilities found
  • bun test tests/repo-hygiene.test.ts
  • node --test .github/scripts/pr-sponsored-surface.test.cjs
  • Independent security/privacy, backend correctness, code-quality/conventions, and rendered UI/i18n/docs reviews
  • Full aggregate bun run test: 10,066 passed, 10 skipped, with one existing suite-order failure in native-profile-drain-server.test.ts; the same aggregate assertion fails on clean upstream/dev, while the exact test passes 5/5 in isolation.

Screenshot

Codex account targeting opt-in

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • New Features

    • Added an opt-in Codex account picker for targeting individual accounts from the model selector.
    • Selected conversations remain fixed to the chosen account without rotation or fallback.
    • Added account-picker visibility controls and localized interface text.
    • Account changes report pending catalog refreshes with ocx sync recovery guidance.
  • Documentation

    • Updated dashboard, CLI, configuration, routing, and management API documentation across supported languages.
    • Documented selector preservation, account lifecycle behavior, and policy-based routing fallback.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change adds an opt-in Codex account picker, durable selector mappings, bounded catalog-convergence reporting, management API updates, GUI and CLI feedback, tests, and multilingual documentation.

Changes

Codex account picker and catalog convergence

Layer / File(s) Summary
Account lifecycle and catalog status
src/codex/..., src/server/management-api.ts, tests/codex-*
Account mutations persist selector bindings before catalog convergence and return sanitized catalogRefreshPending status.
Picker settings API
src/server/management/config-routes.ts, tests/settings-stream-mode.test.ts
/api/settings validates, persists, rolls back, and reports codexAccountPickerEnabled changes.
Dashboard picker and feedback
gui/src/components/..., gui/src/pages/..., gui/src/ui.tsx, gui/tests/...
The GUI adds the picker control, optimistic state handling, stale-response protection, warning notices, and pending-refresh feedback.
CLI recovery reporting
src/cli/..., tests/cli-account.test.ts
Codex login and removal commands preserve success status while reporting pending catalog refreshes in JSON or stderr guidance.
Documentation and structure
docs-site/src/content/docs/..., structure/...
The API, routing, selector ownership, picker behavior, and refresh-recovery contracts are documented across supported locales.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested labels: documentation

Suggested reviewers: ingwannu, lidge-jun, wibias

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.88% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Codex account-picker lifecycle controls.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 8, 2026
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 16:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/src/content/docs/ja/reference/management-api.md`:
- Line 209: Update the table row containing GET, POST, DELETE
/api/codex-auth/accounts by adding the missing trailing pipe delimiter,
preserving the existing row content.

In `@docs-site/src/content/docs/ko/reference/cli/providers-accounts.md`:
- Around line 188-190: Update the generic success response shape in the CLI
account reference to make catalogRefreshPending optional, matching
src/cli/account-extended.ts where it is emitted only for codex credentials. Keep
the documented OAuth and API-key response examples consistent with their
omission of this field.

In `@docs-site/src/content/docs/reference/cli/providers-accounts.md`:
- Around line 246-247: Update the generic success response documentation to mark
catalogRefreshPending as optional or explicitly Codex-only, matching the
implementation for OAuth and API-key removals. Apply the same change in
docs-site/src/content/docs/reference/cli/providers-accounts.md (lines 246-247)
and docs-site/src/content/docs/ru/reference/cli/providers-accounts.md (lines
244-245); both sites require direct updates.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eebc30f6-1469-4d1e-9dc3-0f3a174b0b50

📥 Commits

Reviewing files that changed from the base of the PR and between 14e9485 and eb0b038.

📒 Files selected for processing (63)
  • docs-site/src/content/docs/guides/web-dashboard.md
  • docs-site/src/content/docs/ja/guides/web-dashboard.md
  • docs-site/src/content/docs/ja/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/ja/reference/configuration/providers.md
  • docs-site/src/content/docs/ja/reference/configuration/routing.md
  • docs-site/src/content/docs/ja/reference/management-api.md
  • docs-site/src/content/docs/ko/guides/web-dashboard.md
  • docs-site/src/content/docs/ko/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/ko/reference/configuration/providers.md
  • docs-site/src/content/docs/ko/reference/configuration/routing.md
  • docs-site/src/content/docs/ko/reference/management-api.md
  • docs-site/src/content/docs/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/reference/configuration/providers.md
  • docs-site/src/content/docs/reference/configuration/routing.md
  • docs-site/src/content/docs/reference/management-api.md
  • docs-site/src/content/docs/ru/guides/web-dashboard.md
  • docs-site/src/content/docs/ru/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/ru/reference/configuration/providers.md
  • docs-site/src/content/docs/ru/reference/configuration/routing.md
  • docs-site/src/content/docs/ru/reference/management-api.md
  • docs-site/src/content/docs/zh-cn/guides/web-dashboard.md
  • docs-site/src/content/docs/zh-cn/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/providers.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/routing.md
  • docs-site/src/content/docs/zh-cn/reference/management-api.md
  • gui/src/codex-account-mutation.ts
  • gui/src/components/AddCodexAccountModal.tsx
  • gui/src/components/CodexAccountPickerSetting.tsx
  • gui/src/components/CodexAccountPool.tsx
  • gui/src/components/codex-account-pool-main-card.tsx
  • gui/src/components/use-add-codex-account-oauth.ts
  • gui/src/hooks/useCodexAccountPool.ts
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/CodexAuth.tsx
  • gui/src/pages/Providers.tsx
  • gui/src/pages/providers-page-modals.tsx
  • gui/src/styles.css
  • gui/src/ui.tsx
  • gui/tests/add-codex-account-oauth.test.tsx
  • gui/tests/codex-account-picker-setting.test.tsx
  • gui/tests/codex-account-pool-behaviour.test.tsx
  • gui/tests/codex-account-pool-toast-tone.test.tsx
  • gui/tests/providers-codex-completion-toast.test.tsx
  • src/cli/account-auth.ts
  • src/cli/account-catalog-refresh.ts
  • src/cli/account-extended.ts
  • src/codex/account-lifecycle.ts
  • src/codex/auth-api.ts
  • src/codex/catalog-refresh-status.ts
  • src/server/management-api.ts
  • src/server/management/config-routes.ts
  • structure/02_config-and-codex-home.md
  • structure/05_gui-and-management-api.md
  • tests/cli-account.test.ts
  • tests/codex-auth-api.test.ts
  • tests/codex-catalog-refresh-status.test.ts
  • tests/helpers/catalog-convergence.ts
  • tests/settings-stream-mode.test.ts

Comment thread docs-site/src/content/docs/ja/reference/management-api.md Outdated
Comment thread docs-site/src/content/docs/ko/reference/cli/providers-accounts.md
Comment thread docs-site/src/content/docs/reference/cli/providers-accounts.md Outdated
@chrisae9
chrisae9 marked this pull request as draft August 8, 2026 16:17
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 16:18
@chrisae9
chrisae9 force-pushed the split/1019-04-management-gui branch from eb0b038 to 02f0414 Compare August 8, 2026 16:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/codex/auth-api.ts`:
- Around line 411-440: The account persistence flow must roll back credentials
and related runtime state when saveRuntimeConfig fails, not only restore
runtimeConfig. Update persistNewCodexAccount and the manual and OAuth callers to
stage credential changes until configuration persistence succeeds, or snapshot
and restore the prior credential, validation, and quota state in the failure
path; add failure coverage for both new-account flows.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ef1d1133-f01a-499d-981c-47b2932c876c

📥 Commits

Reviewing files that changed from the base of the PR and between eb0b038 and 02f0414.

📒 Files selected for processing (11)
  • docs-site/src/content/docs/ja/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/ja/reference/management-api.md
  • docs-site/src/content/docs/ko/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/ru/reference/cli/providers-accounts.md
  • docs-site/src/content/docs/zh-cn/reference/cli/providers-accounts.md
  • gui/src/codex-account-mutation.ts
  • gui/src/ui.tsx
  • src/codex/account-lifecycle.ts
  • src/codex/auth-api.ts
  • src/codex/catalog-refresh-status.ts

Comment thread src/codex/auth-api.ts Outdated
@chrisae9
chrisae9 marked this pull request as draft August 8, 2026 16:21
@chrisae9
chrisae9 force-pushed the split/1019-04-management-gui branch from 02f0414 to 929c8de Compare August 8, 2026 17:12
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 17:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/src/content/docs/zh-cn/reference/configuration/routing.md`:
- Around line 47-50: Update the Chinese model-resolution order in the routing
reference to include policy/<id> before account selectors, matching the English
routing documentation; alternatively, explicitly state that the numbered list
excludes policy-profile routes. Ensure the surrounding translated routing
behavior remains consistent with the English source.

In `@src/codex/auth-api.ts`:
- Around line 1370-1376: Update handleCodexAuthAPI’s publication-failure path so
persistence.error is converted into an explicit JSON recovery response rather
than thrown through the management dispatcher. Preserve the successful
catalogRefresh response, and return a client-safe signal such as
needsReauth/credential-missing without exposing credential-store details or file
paths.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6ef7de30-3c47-4a53-b965-f36ddca610c2

📥 Commits

Reviewing files that changed from the base of the PR and between 02f0414 and 929c8de.

📒 Files selected for processing (5)
  • docs-site/src/content/docs/reference/configuration/routing.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/routing.md
  • src/codex/auth-api.ts
  • tests/codex-auth-api.test.ts
  • tests/provider-workspace-auth.test.ts

Comment thread docs-site/src/content/docs/zh-cn/reference/configuration/routing.md
Comment thread src/codex/auth-api.ts
@chrisae9
chrisae9 marked this pull request as draft August 8, 2026 17:18
@chrisae9
chrisae9 force-pushed the split/1019-04-management-gui branch from 929c8de to 0038dc1 Compare August 8, 2026 17:56
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 17:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/codex-auth-api.test.ts`:
- Around line 3826-3828: Remove the duplicate const data declaration in the
affected test block, keeping a single response-body read before the status
assertion.
- Around line 4310-4312: Replace the source-text assertions in the auth API test
with behavioral cases alongside the existing `isAccountNeedsReauth` HTTP
coverage: verify `reauth=1` with a valid credential and no flow row returns
`status: "expired"` rather than `done`, and verify no `reauth` parameter with a
valid credential and no reauth marker returns `status: "done"`. Remove the
assertions inspecting `handleCodexAuthAPI` source text.
- Around line 2546-2550: Add the required email field to the mocked
codexAccounts entry in the makeConfig fixture, matching the CodexAccount shape
and the neighboring fixture while leaving the other account properties
unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6cd938f6-4a9e-4872-b436-f5fe942da995

📥 Commits

Reviewing files that changed from the base of the PR and between 929c8de and 0038dc1.

📒 Files selected for processing (12)
  • docs-site/src/content/docs/ja/reference/configuration/routing.md
  • docs-site/src/content/docs/ja/reference/management-api.md
  • docs-site/src/content/docs/ko/reference/configuration/routing.md
  • docs-site/src/content/docs/ko/reference/management-api.md
  • docs-site/src/content/docs/reference/configuration/routing.md
  • docs-site/src/content/docs/reference/management-api.md
  • docs-site/src/content/docs/ru/reference/configuration/routing.md
  • docs-site/src/content/docs/ru/reference/management-api.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/routing.md
  • docs-site/src/content/docs/zh-cn/reference/management-api.md
  • src/codex/auth-api.ts
  • tests/codex-auth-api.test.ts

Comment thread tests/codex-auth-api.test.ts
Comment thread tests/codex-auth-api.test.ts
Comment thread tests/codex-auth-api.test.ts Outdated
@chrisae9
chrisae9 marked this pull request as draft August 8, 2026 18:03
@chrisae9
chrisae9 force-pushed the split/1019-04-management-gui branch from 0038dc1 to dea62e4 Compare August 8, 2026 18:07
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 18:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
tests/codex-auth-api.test.ts (1)

3826-3828: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

The duplicated const data declaration is still present.

Line 3827 repeats the same statement twice in one block:

const data = await resp!.json() as { status: string; accountId?: string };
const data = await resp!.json() as { status: string; accountId?: string };

This breaks the file two ways. First, const data is redeclared in the same lexical block, which is a TypeScript and JavaScript error. Second, resp!.json() consumes the Response body, so the second read throws TypeError: Body already used.

The retrieved learning about repeated const declarations covers separate test() callbacks. Both declarations here sit inside the same callback block, so that exemption does not apply.

🐛 Proposed fix
     const resp = await handleCodexAuthAPI(req, new URL(req.url), {} as any);
     const data = await resp!.json() as { status: string; accountId?: string };
-    const data = await resp!.json() as { status: string; accountId?: string };
     expect(data).toEqual({ status: "expired" });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/codex-auth-api.test.ts` around lines 3826 - 3828, Remove the duplicate
const data declaration in the test callback around handleCodexAuthAPI, leaving a
single response-body read and preserving the existing expired-status assertion.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@tests/codex-auth-api.test.ts`:
- Around line 3826-3828: Remove the duplicate const data declaration in the test
callback around handleCodexAuthAPI, leaving a single response-body read and
preserving the existing expired-status assertion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: acd867ce-bf6d-406f-bdf7-db69c4705508

📥 Commits

Reviewing files that changed from the base of the PR and between 0038dc1 and dea62e4.

📒 Files selected for processing (1)
  • tests/codex-auth-api.test.ts

@chrisae9

chrisae9 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

CI's test 3/4 job timed out after entering tests/cli-restart-health.test.ts; it produced no assertion failure before GitHub cancelled it at 15 minutes.

I reran the exact shard locally: 2,416 passed, 2 skipped, 0 failed in 96s. I also ran tests/cli-restart-health.test.ts in isolation 10 times: all 10 passed in 3.9–4.1s. This PR does not change that test or its restart/health command paths, so I have not added code churn or moved the PR back to Draft.

Could someone with Actions permission rerun the failed jobs?

@chrisae9

chrisae9 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Synced current dev into this PR at signed merge commit b62a59b2, keeping it Ready.

Post-sync validation is green:

  • exact CI shard 3/4: 2,431 passed, 2 skipped, 0 failed in 98.7s
  • typecheck: passed
  • synced dev suites: 147 passed
  • PR-focused account-management matrix: 320 passed

I also confirmed the same 15-minute cli-restart-health hang on unrelated PRs; #1288 passed that shard in 96s on rerun and later merged. The fresh Cross-platform CI and React Doctor runs for this head are now awaiting fork-workflow approval.

@Wibias Wibias left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

I reviewed the current head (b62a59b2) against dev for functional bugs, privacy/data leaks, security regressions, failure handling, concurrency/lifecycle edge cases, and GUI/CLI behaviour.

I like that this is an opt-in feature. That is the right default for account-qualified picker rows: users who want exact account targeting can enable it, while existing Pool/Direct behaviour and ordinary GPT picker rows remain unchanged for everyone else.

What I checked

  • Picker enable/disable semantics and backward compatibility with existing/manual selector maps.
  • Generated selector privacy: account IDs/emails are not used as generated public picker labels.
  • Deleted-account selector retention: stale bindings stay in config for fail-closed exact routing, but deleted accounts are filtered from visible picker rows and the same selector is restored on re-add.
  • New-account persistence ordering for manual import and OAuth login.
  • Credential publication failures after config commit: the durable account remains recoverable, is marked needsReauth, quota is not published prematurely, and private storage/token/path errors are not reflected to API clients.
  • Catalog convergence failures and malformed outcomes: management/API/GUI/CLI surfaces collapse them to the privacy-safe catalogRefreshPending bit and fixed ocx sync recovery guidance.
  • Login-status recovery so a partially published credential cannot be reported as a completed login.
  • Settings validation, rollback on persistence/allocation failure, one bounded post-persistence convergence, and stale-response protection in the dashboard toggle.
  • Account add/remove completion propagation through the dashboard and CLI.
  • Current review threads and current-head CI. Cross-platform CI and React Doctor are green, and CodeRabbit is green at this head.

The earlier major concern around account/config atomicity and the later credential-store error exposure path are both addressed in the current code. I do not see a current blocking security, privacy, correctness, or edge-case regression in this PR.

Non-blocking, pre-existing hardening note

deleteCodexAccount() still removes credential/runtime state before the caller persists the config deletion. If that config save fails, the durable config can still contain the account while its credential has already been removed. This ordering existed before this PR, so I would not block this change on it, but it is worth fixing separately with the same config-first/compensating approach now used for new-account creation.

Approved.

@Wibias
Wibias merged commit de6f3db into lidge-jun:dev Aug 8, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants