Skip to main content

bridge_layout_event

Function bridge_layout_event 

Source
async fn bridge_layout_event(
    event: Event,
    mstore: &Arc<Store>,
    event_bus: &Arc<EventBus>,
)
Expand description

Layout events (Phase 2, partial). Focused/Magnified + TreeReplaced are persisted by apply_event_to_mstore (persist_subscriber.rs), so the bridge can safely re-read LayoutState and broadcast it: the HTTP RPC path applies SQLite synchronously before publishing the event (the post-event-state guarantee on dispatch_event), so the read sees post-event tree state.

LayoutNodeDeleted is persisted too but deliberately NOT bridged: on the srv-IPC path srv_ipc/server.rs publishes without a synchronous apply, so a re-read could race ahead of the persist subscriber and emit pre-event state (#1883). Its handlers’ success_with_updates(...) responses cover it (#861). It falls out here with every other unbridged event.