diff --git a/apps/web/src/hooks/useSettings.ts b/apps/web/src/hooks/useSettings.ts index 3fec075b06..3dc2cf9b20 100644 --- a/apps/web/src/hooks/useSettings.ts +++ b/apps/web/src/hooks/useSettings.ts @@ -177,3 +177,10 @@ export function useUpdateSettings() { resetSettings, }; } + +export function __resetClientSettingsPersistenceForTests(): void { + clientSettingsSnapshot = DEFAULT_CLIENT_SETTINGS; + clientSettingsHydrated = false; + clientSettingsHydrationPromise = null; + clientSettingsListeners.clear(); +} diff --git a/apps/web/src/localApi.ts b/apps/web/src/localApi.ts index 8fe17f4a89..40ed014580 100644 --- a/apps/web/src/localApi.ts +++ b/apps/web/src/localApi.ts @@ -142,6 +142,8 @@ export function ensureLocalApi(): LocalApi { export async function __resetLocalApiForTests() { cachedApi = undefined; + const { __resetClientSettingsPersistenceForTests } = await import("./hooks/useSettings"); + __resetClientSettingsPersistenceForTests(); await resetEnvironmentServiceForTests(); resetGitStatusStateForTests(); resetRequestLatencyStateForTests();