It is not possible to add actions after a switch case #25

Closed
opened 2026-09-17 08:10:25 +02:00 by morten-olsen · 1 comment
Owner
No description provided.
Author
Owner

Fixed in e4f3978 (committed locally, push blocked on a 1Password approval).

Root cause: the editor walked the graph itself and only offered an insertion control where an output port had no connection. A switch has no main output — its ports are branch routes — so the trunk dead-ended at the switch, and the linear-editor "Add next action" button was suppressed for any workflow containing one. Adding into a branch worked; continuing the route after the branches was unreachable.

The editor now renders a route projection (WorkflowRoute): a trunk of steps, each branching step's ports hanging off it as lanes, and the steps after it in the same lane being the continuation. Every lane offers an add control at its end, including the trunk after a switch. A lane chains its steps through their exit ports, and a branching step's exits are its branch tails, so the step after a switch is fed by every branch; ENGINE.md's empty-batch completion signal is what lets it run when only one branch matched.

Verified on emulator-5554: added "Set torch" from the trunk control below a switch — its sheet reports "ARRIVES FROM: 2 routes merge here" — saved, reopened and re-ran the automation to Completed. Engine test a step after the branches runs once with only the selected branch's records covers the runtime contract.

Fixed in `e4f3978` (committed locally, push blocked on a 1Password approval). Root cause: the editor walked the graph itself and only offered an insertion control where an output port had no connection. A switch has no `main` output — its ports are branch routes — so the trunk dead-ended at the switch, and the linear-editor "Add next action" button was suppressed for any workflow containing one. Adding into a branch worked; continuing the route after the branches was unreachable. The editor now renders a route projection (`WorkflowRoute`): a trunk of steps, each branching step's ports hanging off it as lanes, and the steps after it in the same lane being the continuation. Every lane offers an add control at its end, including the trunk after a switch. A lane chains its steps through their exit ports, and a branching step's exits are its branch tails, so the step after a switch is fed by every branch; ENGINE.md's empty-batch completion signal is what lets it run when only one branch matched. Verified on emulator-5554: added "Set torch" from the trunk control below a switch — its sheet reports "ARRIVES FROM: 2 routes merge here" — saved, reopened and re-ran the automation to Completed. Engine test `a step after the branches runs once with only the selected branch's records` covers the runtime contract.
Sign in to join this conversation.
No labels
bug
enhancement
feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
incubator/macros#25
No description provided.