diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsx index 2b2316f2bc2..c1c69ecae00 100644 --- a/ui/src/components/AgentConfigForm.tsx +++ b/ui/src/components/AgentConfigForm.tsx @@ -400,10 +400,12 @@ export function AgentConfigForm(props: AgentConfigFormProps) { }), [environments, supportedEnvironmentDrivers], ); + // `runnableEnvironments` excludes the always-available Local environment, so a + // single entry already means the user has more than one environment configured + // (Local + that environment) and the override selector is meaningful. const showEnvironmentOverrideControl = environmentsEnabled && ( forcedKubernetes || - currentDefaultEnvironmentId.length > 0 || - runnableEnvironments.length > 1 + runnableEnvironments.length >= 1 ); const inheritedEnvironmentLabel = instanceDefaultEnvironment ? `${instanceDefaultEnvironment.name} (${instanceDefaultEnvironment.driver})` @@ -883,8 +885,8 @@ export function AgentConfigForm(props: AgentConfigFormProps) { // Render the environment read-only instead of the selectable picker.
{cards - ?

Execution

- :
Execution
+ ?

Environment

+ :
Environment
}
{cards - ?

Execution

- :
Execution
+ ?

Environment

+ :
Environment
}
- +
-
- {currentDefaultEnvironment - ? `Overriding the instance default with ${currentDefaultEnvironment.name}.` - : `Inheriting the instance default: ${inheritedEnvironmentLabel}.`} -