fix(automations): remove spurious third output on condition steps

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 <noreply@anthropic.com>
This commit is contained in:
Arnas Donauskas 2026-06-18 11:20:55 +03:00
parent f35ae4ef1c
commit 07e513690f
No known key found for this signature in database

View File

@ -927,9 +927,14 @@ function StepRenderer({
)}
</div>
{/* 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 && (
<AddButton
onPick={(t) => props.addStepAt(parentScope, index + 1, t)}
/>
)}
</>
)
}