Noticed while fixing #1593. Code shape confirmed; I have not driven the drag live, so treat the exploitability as unproven.
MacroBuilder.configureConditionalBranch (MacroBuilder.ts:186-193) opens ConditionalBranchEditorModal over the still-open macro builder. Both modals mount a CommandList, and both register their drop zone with the same svelte-dnd-action type:
CommandList.svelte -> baseDndOptions({ items, dragDisabled, type: "command", ... })
baseDndOptions (dndReorder.ts:60-79) never sets dropFromOthersDisabled, so two zones of the same type are mutually valid drop targets. CommandList also has no TRIGGERS.DROPPED_INTO_ANOTHER strip - compare ChoiceList.svelte:107-109, which added exactly that for the choice list because committing the source list verbatim after a cross-zone drop persists a COPY in both zones. CommandList.svelte does not even import TRIGGERS.
Expected failure modes, if the drag is reachable
Suggested shape
Either set dropFromOthersDisabled: true for command zones (they are never a legitimate cross-zone target - unlike folders, a command has no "move into" gesture), or mirror ChoiceList's DROPPED_INTO_ANOTHER strip. The former looks correct here.
Reproducing it needs a macro with a Conditional, the branch editor open on top, and a pointer drag between the two lists - worth doing before fixing, to confirm the modal stacking actually allows it.
Noticed while fixing #1593. Code shape confirmed; I have not driven the drag live, so treat the exploitability as unproven.
MacroBuilder.configureConditionalBranch(MacroBuilder.ts:186-193) opensConditionalBranchEditorModalover the still-open macro builder. Both modals mount aCommandList, and both register their drop zone with the samesvelte-dnd-actiontype:CommandList.svelte->baseDndOptions({ items, dragDisabled, type: "command", ... })baseDndOptions(dndReorder.ts:60-79) never setsdropFromOthersDisabled, so two zones of the same type are mutually valid drop targets.CommandListalso has noTRIGGERS.DROPPED_INTO_ANOTHERstrip - compareChoiceList.svelte:107-109, which added exactly that for the choice list because committing the source list verbatim after a cross-zone drop persists a COPY in both zones.CommandList.sveltedoes not even importTRIGGERS.Expected failure modes, if the drag is reachable
idinto a list that already contains it, which is theeach_key_duplicateshape [BUG] A macro'scommandshas no read-accessor guard, so a malformed one is unrecoverable through the UI #1593 is about (now survivable, since the editor re-keys it, but it should not happen at all)Suggested shape
Either set
dropFromOthersDisabled: truefor command zones (they are never a legitimate cross-zone target - unlike folders, a command has no "move into" gesture), or mirrorChoiceList'sDROPPED_INTO_ANOTHERstrip. The former looks correct here.Reproducing it needs a macro with a Conditional, the branch editor open on top, and a pointer drag between the two lists - worth doing before fixing, to confirm the modal stacking actually allows it.