diff --git a/src/stores/useConfigStore.ts b/src/stores/useConfigStore.ts index da8f2a0..b97a36d 100644 --- a/src/stores/useConfigStore.ts +++ b/src/stores/useConfigStore.ts @@ -267,7 +267,12 @@ export const useConfigStore = create((set, get) => ({ // 同时清除完整配置缓存 newCache.delete('__full__'); - set({ cache: newCache }); + // Section-level invalidation usually follows an optimistic write path. Invalidate any in-flight + // full fetch so stale responses can't overwrite newer local changes. + configRequestToken += 1; + inFlightConfigRequest = null; + + set({ cache: newCache, loading: false, error: null }); return; } else { newCache.clear();