diff --git a/ui/src/pages/CompanyEnvironments.tsx b/ui/src/pages/CompanyEnvironments.tsx index d5057184..0b74ee24 100644 --- a/ui/src/pages/CompanyEnvironments.tsx +++ b/ui/src/pages/CompanyEnvironments.tsx @@ -6,7 +6,6 @@ import { type EnvironmentProbeResult, type JsonSchema, } from "@paperclipai/shared"; -import { Settings } from "lucide-react"; import { environmentsApi } from "@/api/environments"; import { instanceSettingsApi } from "@/api/instanceSettings"; import { secretsApi } from "@/api/secrets"; @@ -476,8 +475,6 @@ export function CompanyEnvironments() { instanceSettings?.defaultEnvironmentId ?? null, savedEnvironments, ); - const instanceDefaultEnvironment = - nonLocalEnvironments.find((environment) => environment.id === instanceDefaultEnvironmentId) ?? null; if (!selectedCompanyId) { return
Select a company context to manage environment secrets and bindings.
; @@ -486,10 +483,6 @@ export function CompanyEnvironments() { if (!environmentsEnabled) { return (
-
- -

Environments

-
Enable Environments in instance experimental settings to manage shared execution targets.
@@ -499,24 +492,11 @@ export function CompanyEnvironments() { return (
-
-
- -

Environments

-
-

- Define reusable execution targets for the instance. The built-in default is Local; agents inherit that unless the instance default or an agent override points somewhere else. -

-
-
-
Instance default environment
-
- New agent configurations inherit this target unless they explicitly override it. -
+
Default
-
- {instanceDefaultEnvironment - ? `Agents currently inherit ${instanceDefaultEnvironment.name} unless they override it.` - : "Agents currently inherit the built-in Local environment unless they override it."} -
-
-
Saved environments
+
- {savedEnvironments.length === 0 ? ( -
No saved environments yet. Local remains the default until you add another target.
- ) : ( - savedEnvironments.map((environment) => { - const probe = probeResults[environment.id] ?? null; - const isEditing = editingEnvironmentId === environment.id; - return ( -
-
-
-
- {environment.name} · {environment.driver} -
- {environment.description ? ( -
{environment.description}
- ) : null} - {environment.driver === "ssh" ? ( -
- {typeof environment.config.host === "string" ? environment.config.host : "SSH host"} ·{" "} - {typeof environment.config.username === "string" ? environment.config.username : "user"} -
- ) : environment.driver === "sandbox" ? ( -
- {(() => { - const provider = - typeof environment.config.provider === "string" ? environment.config.provider : "sandbox"; - const displayName = - environmentCapabilities?.sandboxProviders?.[provider]?.displayName ?? provider; - const summary = summarizeSandboxConfig(environment.config as Record); - return `${displayName} sandbox provider${summary ? ` · ${summary}` : ""}`; - })()} -
- ) : ( -
Runs on this Paperclip host.
- )} + {savedEnvironments.map((environment) => { + const probe = probeResults[environment.id] ?? null; + const isEditing = editingEnvironmentId === environment.id; + return ( +
+
+
+
+ {environment.name} · {environment.driver}
-
- {environment.driver !== "local" ? ( - - ) : null} + {environment.description ? ( +
{environment.description}
+ ) : null} + {environment.driver === "ssh" ? ( +
+ {typeof environment.config.host === "string" ? environment.config.host : "SSH host"} ·{" "} + {typeof environment.config.username === "string" ? environment.config.username : "user"} +
+ ) : environment.driver === "sandbox" ? ( +
+ {(() => { + const provider = + typeof environment.config.provider === "string" ? environment.config.provider : "sandbox"; + const displayName = + environmentCapabilities?.sandboxProviders?.[provider]?.displayName ?? provider; + const summary = summarizeSandboxConfig(environment.config as Record); + return `${displayName} sandbox provider${summary ? ` · ${summary}` : ""}`; + })()} +
+ ) : ( +
Runs on this Paperclip host.
+ )} +
+
+ {environment.driver !== "local" ? ( -
-
- {probe ? ( -
handleEditEnvironment(environment)} > -
{probe.summary}
- {probe.details?.error && typeof probe.details.error === "string" ? ( -
{probe.details.error}
- ) : null} -
- ) : null} + {isEditing ? "Editing" : "Edit"} + +
- ); - }) - )} + {probe ? ( +
+
{probe.summary}
+ {probe.details?.error && typeof probe.details.error === "string" ? ( +
{probe.details.error}
+ ) : null} +
+ ) : null} +
+ ); + })}