mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-16 16:42:01 +02:00
CI runs `cargo test --all`, which compiled yaak-web for the host and failed in sqlite-wasm-rs's C shim. The crate is now `#![cfg(target_arch = "wasm32")]` with its browser-only dependencies target-scoped, so it is empty natively. Review caught a race in the worker fallback: a shared worker that starts after the tab has given up on it and taken a dedicated worker would open the database with no lock. The Web Lock now guards every worker, shared or not — requested with a short timeout so a reloading tab's dying predecessor is waited out, then reported. The tab also closes the port it abandoned. Verified in production builds: 8/8 shared and 3/3 dedicated reloads render, and a second tab in dedicated mode is told the database is in use.