bootstrap_state_from_wstore

Function bootstrap_state_from_wstore 

Source
pub async fn bootstrap_state_from_wstore(
    state: &Arc<Mutex<State>>,
    wstore: &WaveStore,
)
Expand description

Phase E.2 / E.2b — load workspaces and their tabs from SQLite into the reducer state. Called once at srv startup before the IPC server starts accepting commands. Async because we’re inside the tokio runtime.

Errors are logged but non-fatal: if a SQLite read fails (fresh install, empty DB, transient I/O), the reducer starts with whatever loaded successfully. Workspace and tab loads are independent — a workspace-load failure does not prevent the tab load from being attempted (and vice versa), since pipe commands later in the session can populate either map.