Skip to main content

handle_layout_delete_node_by_block

Function handle_layout_delete_node_by_block 

Source
pub(super) fn handle_layout_delete_node_by_block(
    state: &mut State,
    tab_id: String,
    block_id: String,
    correlation_id: String,
) -> Vec<Event>
Expand description

SPEC_864 site #6 — delete the layout node holding block_id. Resolution happens here because the reducer owns the tree; the caller (the delete_block saga) only knows the block id.

Unresolved block → silent idempotent no-op (empty event vec), NOT an error: every delete_block saga run dispatches this, and a block may legitimately have no layout node (the frontend’s own delete flow already pushed a pruned tree via LayoutSetTree, the block was floating/never laid out, or the tab tree is empty).