pub(crate) async fn queue_target_stack_move(
state: &AppState,
tab_id: &str,
block_id: &str,
target_block_id: &str,
position: &str,
activate: bool,
) -> Result<(), String>Expand description
Tell the frontend that block_id was moved — already, in the reducer —
to position relative to target_block_id (Command::LayoutStackMove):
a same-pane reorder when both are already in one leaf’s stack, otherwise
a cross-pane move. Matches LayoutTreeActionType.StackMove = "stackmove"
in frontend/layout/lib/types.ts. position is the same
"before"/"after"/"end" string pane.moveTab’s caller supplied —
reused verbatim, not re-derived, so the frontend applies the identical
operation rather than inferring it from resulting tree state. activate
rides on LayoutActionData.focused — the same field queue_target_stack_push
above already overloads for this purpose (that call hardcodes true,
since CreateBlockInStack always activates; this one carries the
caller’s actual activate value since a reorder may or may not).
SPEC_PANE_TAB_DRAG_AND_DROP_2026_09_19.md §4.1, Phase 3.