pub fn spawn_block_prune_subscriber(
watcher: Arc<SubagentWatcher>,
events_rx: Receiver<Event>,
) -> JoinHandle<()> ⓘExpand description
Subscribe to the reducer’s srv_events_tx broadcast and prune watcher’s
per-block state on Event::BlockDeleted/TabDeleted/WorkspaceDeleted —
the robust backstop described on SubagentWatcher::prune_block’s doc
comment. Mirrors crates/cef/src/srv_ipc.rs’s cascaded-block-id
extraction (same three-arm match, same rationale: TabDeleted/
WorkspaceDeleted never emit a per-block event of their own — see
reducer/tab.rs::handle_delete_tab’s doc comment — so block_ids is the
only signal for a block that cascaded out via its tab/workspace) and
server/mux_obj_bridge.rs::run_mux_obj_bridge’s subscribe-loop
plumbing (lag/close handling).