From 03bbe3e15cbb15cde6a07952d1e557a2ba94cda4 Mon Sep 17 00:00:00 2001 From: Devin Foley Date: Mon, 22 Jun 2026 12:20:30 -0700 Subject: [PATCH] Clean up agent config environment selector Show the environment override selector only when a meaningful alternative exists, remove the explanatory helper copy, relabel the inherited option, and rename the section header to Environment. Co-Authored-By: Paperclip --- ui/src/components/AgentConfigForm.tsx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) 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}.`} -