From 07e513690f90553f89c8bfdc6b93a9c81a2b5a5f Mon Sep 17 00:00:00 2001 From: Arnas Donauskas Date: Thu, 18 Jun 2026 11:20:55 +0300 Subject: [PATCH] fix(automations): remove spurious third output on condition steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A Condition (If/Else) step rendered three add-step connectors: Yes, No, and a trailing linear "+". ConditionBranches already renders the Yes/No branch StepLists (each with its own AddButton), while StepRenderer also emitted a trailing AddButton after every step — including conditions. Skip the trailing AddButton when step_type === "condition", since a condition branches into Yes/No and has no linear continue path. Steps after a condition are added inside one of its branches. Fixes #256 Co-Authored-By: Claude Opus 4.8 --- src/components/automations/automation-builder.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/automations/automation-builder.tsx b/src/components/automations/automation-builder.tsx index d1034bd..677f62b 100644 --- a/src/components/automations/automation-builder.tsx +++ b/src/components/automations/automation-builder.tsx @@ -927,9 +927,14 @@ function StepRenderer({ )} - props.addStepAt(parentScope, index + 1, t)} - /> + {/* A condition branches into Yes/No (rendered above by + ConditionBranches), so it has no linear "continue" path — adding + the trailing connector here would produce a spurious third output. */} + {!isCondition && ( + props.addStepAt(parentScope, index + 1, t)} + /> + )} ) }