Not possible to move switch actions up or down #26

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

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

Two causes, both gone:

  • The structured (switch-containing) renderer passed showOrdering = false, so the overflow menu held only Remove — no Move up/Move down existed for any step in such a workflow.
  • withStepMoved required linearActionNodesOrNull(), which is null for any graph holding a switch, so even a wired-up control would have been a silent no-op.

Moves are now lane-relative on the route projection: a step reorders within its own lane (trunk or branch), and the lane's edges are rebuilt from the new order — including the branch-tail edges that feed whatever follows the switch. A move that would place a step above the step whose output it reads is refused with a sentence naming both, leaving the draft unchanged.

Verified on emulator-5554: Move up on the switch reordered the trunk; Move up inside the "Matching" branch reordered that lane only; moving a step above its value source produced "Show notification reads a value from Make uppercase, which would no longer run before it." with the route unchanged. Covered by a step moves within a branch lane of a switched workflow, a trunk step moves even though the route holds a switch, and a move that would strand a value reference is refused with an explanation.

Fixed in `e4f3978` (committed locally, push blocked on a 1Password approval). Two causes, both gone: - The structured (switch-containing) renderer passed `showOrdering = false`, so the overflow menu held only **Remove** — no Move up/Move down existed for any step in such a workflow. - `withStepMoved` required `linearActionNodesOrNull()`, which is null for any graph holding a switch, so even a wired-up control would have been a silent no-op. Moves are now lane-relative on the route projection: a step reorders within its own lane (trunk or branch), and the lane's edges are rebuilt from the new order — including the branch-tail edges that feed whatever follows the switch. A move that would place a step above the step whose output it reads is refused with a sentence naming both, leaving the draft unchanged. Verified on emulator-5554: Move up on the switch reordered the trunk; Move up inside the "Matching" branch reordered that lane only; moving a step above its value source produced "Show notification reads a value from Make uppercase, which would no longer run before it." with the route unchanged. Covered by `a step moves within a branch lane of a switched workflow`, `a trunk step moves even though the route holds a switch`, and `a move that would strand a value reference is refused with an explanation`.
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#26
No description provided.