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:
@@ -167,7 +167,7 @@ function buildDraftStatusControls(input: {
|
||||
features,
|
||||
onSetFeature,
|
||||
onDropdownClose,
|
||||
onModelSelectorOpen: formState.invalidateProviderModels,
|
||||
onModelSelectorOpen: formState.refetchProviderModelsIfStale,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user