Skip to content

fix: protect token rotation and account runtime state - #122

Open
LeaningLearner wants to merge 3 commits into
Lampese:mainfrom
LeaningLearner:fix/auth-rotation-runtime-state-localization
Open

fix: protect token rotation and account runtime state#122
LeaningLearner wants to merge 3 commits into
Lampese:mainfrom
LeaningLearner:fix/auth-rotation-runtime-state-localization

Conversation

@LeaningLearner

@LeaningLearner LeaningLearner commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Serialize account read-modify-write operations while retaining per-account refresh locking.
  • Reconcile active auth.json credentials, stop unsafe refresh rotation while Codex is running, and mark stable refresh failures for re-authentication.
  • Add in-place OAuth re-authentication with identity checks while preserving local account settings.
  • Keep Codex running state global and restore switch/re-auth confirmation flows.
  • Allow a confirmed account switch while Codex is running: force-close blocking processes, re-check the process state, switch credentials through the protected backend path, then automatically reopen the Codex desktop app.
  • Report the partial-success case clearly when the account switch succeeds but Codex cannot be reopened.
  • Add an English/Chinese UI language switch with shared locale-aware date and time formatting.
  • Clean up account menu and sort labels by removing duplicate plus signs and leading percent markers.
  • Add compatibility handling and regression tests for legacy account data, concurrent refreshes, re-authentication, runtime state, date formatting, and the switch/reopen sequence.

Validation

  • pnpm test:frontend — 8 tests passed.
  • pnpm build — TypeScript and Vite production build passed.
  • cargo test --manifest-path src-tauri/Cargo.toml — 43 tests passed.
  • git diff --check — passed.

The local-only packaging override remains excluded from this PR. No credentials or machine-specific account data are included.

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.

1 participant