Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ Controls display style:
- `uiAccentColor`
- `menuFocusStyle`

## Sync Center

The settings hub includes a preview-first sync center for Codex CLI account sync.

Before applying sync, it shows:

- target path
- current source path when available
- last sync result for this session
- preview summary (adds, updates, destination-only preserved accounts)
- destination-only preservation behavior
- backup and rollback context (`.bak`, `.bak.1`, `.bak.2`, `.wal`)

---

## Experimental
Expand Down
8 changes: 7 additions & 1 deletion lib/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import {
loadCodexCliState,
type CodexCliTokenCacheEntry,
} from "./codex-cli/state.js";
import { syncAccountStorageFromCodexCli } from "./codex-cli/sync.js";
import {
commitCodexCliSyncRunFailure,
commitPendingCodexCliSyncRun,
syncAccountStorageFromCodexCli,
} from "./codex-cli/sync.js";
import { setCodexCliActiveSelection } from "./codex-cli/writer.js";

export {
Expand Down Expand Up @@ -116,7 +120,9 @@ export class AccountManager {
if (synced.changed && sourceOfTruthStorage) {
try {
await saveAccounts(sourceOfTruthStorage);
commitPendingCodexCliSyncRun(synced.pendingRun);
} catch (error) {
commitCodexCliSyncRunFailure(synced.pendingRun, error);
log.debug("Failed to persist Codex CLI source-of-truth sync", {
error: String(error),
});
Expand Down
Loading