From 2717477f0ca6645636491a463882b32cd08dbbc6 Mon Sep 17 00:00:00 2001 From: Duncan Date: Sat, 29 Aug 2026 15:15:13 -0400 Subject: [PATCH] refactor(agents): remove now-dead hasNamePool declaration in agentFormModel The hasNamePool const was only used by the !hasNamePool gate in nameChanged, which was removed in the previous commit. Drop it to keep the model clean. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- desktop/src/features/agents/ui/AgentEditMergedDialog.tsx | 5 +---- desktop/src/features/agents/ui/agentFormModel.ts | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/desktop/src/features/agents/ui/AgentEditMergedDialog.tsx b/desktop/src/features/agents/ui/AgentEditMergedDialog.tsx index b14c833a95..6fe5efc6fc 100644 --- a/desktop/src/features/agents/ui/AgentEditMergedDialog.tsx +++ b/desktop/src/features/agents/ui/AgentEditMergedDialog.tsx @@ -567,10 +567,7 @@ export function AgentEditMergedDialog({ (selectedRuntimeId !== "custom" || inheritHarness || agentCommand.trim().length > 0) && - // Block submission when the instance name field is blank — applies to - // all instances including pool-named ones. Pooled instances can be - // explicitly renamed; the blank guard prevents submitting an empty name - // regardless of pool membership. + // Block submission when the visible instance name is blank (pool or not). instanceName.trim().length > 0 : true); diff --git a/desktop/src/features/agents/ui/agentFormModel.ts b/desktop/src/features/agents/ui/agentFormModel.ts index 0a80a031de..eea4efaaf2 100644 --- a/desktop/src/features/agents/ui/agentFormModel.ts +++ b/desktop/src/features/agents/ui/agentFormModel.ts @@ -528,9 +528,6 @@ export function emitAgentFormDiff( // I-field diff — only when instance is present let agentInput: UpdateManagedAgentInput | null = null; if (inst !== null) { - // Row 1 contract: stop materializing displayName→name when a name pool exists - const hasNamePool = (def?.namePool?.length ?? 0) > 0; - // Row 8 contract: instance env edit goes to instance, NOT wholesale-replace from definition. // When a definition is present, instanceEnvVars holds the per-instance overlay. const instanceEnvChanged =