Skip to content

Commit ca8bbe4

Browse files
committed
fix(settings): align experimental sync review flow
1 parent a3ca72c commit ca8bbe4

2 files changed

Lines changed: 7 additions & 19 deletions

File tree

lib/codex-manager/settings-hub.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,6 @@ async function persistDashboardSettingsSelection(
763763
}
764764

765765
async function readFileWithRetry(path: string): Promise<string> {
766-
const retryable = new Set([
767-
"EBUSY",
768-
"EPERM",
769-
"EAGAIN",
770-
"ENOTEMPTY",
771-
"EACCES",
772-
]);
773766
for (let attempt = 0; ; attempt += 1) {
774767
try {
775768
return await fs.readFile(path, "utf-8");
@@ -778,7 +771,11 @@ async function readFileWithRetry(path: string): Promise<string> {
778771
if (code === "ENOENT") {
779772
throw error;
780773
}
781-
if (!code || !retryable.has(code) || attempt >= 3) {
774+
if (
775+
!code ||
776+
!RETRYABLE_SETTINGS_WRITE_CODES.has(code) ||
777+
attempt >= SETTINGS_WRITE_MAX_ATTEMPTS - 1
778+
) {
782779
throw error;
783780
}
784781
await sleep(25 * 2 ** attempt);
@@ -2653,7 +2650,7 @@ async function promptExperimentalSettings(
26532650
{
26542651
message: UI_COPY.settings.experimentalTitle,
26552652
subtitle: UI_COPY.settings.experimentalSubtitle,
2656-
help: UI_COPY.settings.experimentalHelpMenu,
2653+
help: UI_COPY.settings.experimentalHelpStatus,
26572654
clearScreen: true,
26582655
theme: ui.theme,
26592656
selectedEmphasis: "minimal",
@@ -2714,7 +2711,7 @@ async function promptExperimentalSettings(
27142711
{
27152712
message: UI_COPY.settings.experimentalTitle,
27162713
subtitle: UI_COPY.settings.experimentalSubtitle,
2717-
help: UI_COPY.settings.experimentalHelpPreview,
2714+
help: UI_COPY.settings.experimentalHelpStatus,
27182715
clearScreen: true,
27192716
theme: ui.theme,
27202717
selectedEmphasis: "minimal",

test/settings-hub-utils.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,6 @@ describe("settings-hub utility coverage", () => {
459459
direction: 1,
460460
},
461461
{ type: "back" },
462-
{ type: "open-category", key: "refresh-recovery" },
463-
{ type: "toggle", key: "proactiveRefreshGuardian" },
464-
{ type: "bump", key: "proactiveRefreshIntervalMs", direction: 1 },
465-
{ type: "back" },
466462
{ type: "open-category", key: "performance-timeouts" },
467463
{ type: "toggle", key: "parallelProbing" },
468464
{ type: "bump", key: "fetchTimeoutMs", direction: 1 },
@@ -483,11 +479,6 @@ describe("settings-hub utility coverage", () => {
483479
"preemptiveQuotaRemainingPercent5h",
484480
(defaults.preemptiveQuotaRemainingPercent5h ?? 0) + 1,
485481
),
486-
proactiveRefreshGuardian: !(defaults.proactiveRefreshGuardian ?? false),
487-
proactiveRefreshIntervalMs: api.clampBackendNumber(
488-
"proactiveRefreshIntervalMs",
489-
(defaults.proactiveRefreshIntervalMs ?? 5_000) + 5_000,
490-
),
491482
parallelProbing: !(defaults.parallelProbing ?? false),
492483
fetchTimeoutMs: api.clampBackendNumber(
493484
"fetchTimeoutMs",

0 commit comments

Comments
 (0)