refactor(app): replace providers-snapshot invalidate with refetchIfStale

invalidate() flagged the query stale and kicked off a refetch unconditionally,
causing a loading flash every time the model selector opened. Expose
refetchIfStale() instead so callers only refetch when data is actually stale.
This commit is contained in:
Mohamed Boudra
2026-04-18 16:03:13 +07:00
parent 5d76cc8840
commit 72e4476acc
4 changed files with 17 additions and 19 deletions
@@ -167,7 +167,7 @@ function buildDraftStatusControls(input: {
features,
onSetFeature,
onDropdownClose,
onModelSelectorOpen: formState.invalidateProviderModels,
onModelSelectorOpen: formState.refetchProviderModelsIfStale,
};
}