@@ -244,7 +244,8 @@ export function AcpSessionManagementSection(props: {
244244 if (
245245 ! readEnvironmentScope ( props . environmentId , AuthProvidersManageScope ) ||
246246 projectId === null ||
247- savingProviderId !== null
247+ savingProviderId !== null ||
248+ loadingProviders
248249 )
249250 return ;
250251 const draft = providerDrafts [ provider . providerId ] ;
@@ -281,7 +282,8 @@ export function AcpSessionManagementSection(props: {
281282 } ;
282283
283284 const disableConfiguredProvider = async ( provider : AcpRegistryConfigurableProvider ) => {
284- if ( projectId === null || savingProviderId !== null || provider . required ) return ;
285+ if ( projectId === null || savingProviderId !== null || loadingProviders || provider . required )
286+ return ;
285287 const confirmed = await ensureLocalApi ( ) . dialogs . confirm (
286288 `Disable ACP provider "${ provider . providerId } "?` ,
287289 { variant : "destructive" } ,
@@ -468,7 +470,9 @@ export function AcpSessionManagementSection(props: {
468470 type = "button"
469471 size = "xs"
470472 variant = "outline"
471- disabled = { ! canRead || loadingProviders || projectId === null }
473+ disabled = {
474+ ! canRead || loadingProviders || savingProviderId !== null || projectId === null
475+ }
472476 onClick = { ( ) => void loadProviders ( ) }
473477 >
474478 { loadingProviders ? "Loading" : providers . length === 0 ? "List providers" : "Refresh" }
@@ -534,6 +538,7 @@ export function AcpSessionManagementSection(props: {
534538 disabled = {
535539 props . readOnly ||
536540 savingProviderId !== null ||
541+ loadingProviders ||
537542 draft . apiType . length === 0 ||
538543 draft . baseUrl . length === 0
539544 }
@@ -546,7 +551,9 @@ export function AcpSessionManagementSection(props: {
546551 type = "button"
547552 size = "xs"
548553 variant = "ghost-muted"
549- disabled = { props . readOnly || savingProviderId !== null }
554+ disabled = {
555+ props . readOnly || savingProviderId !== null || loadingProviders
556+ }
550557 onClick = { ( ) => void disableConfiguredProvider ( provider ) }
551558 >
552559 Disable
0 commit comments