Fix concurrent Web SQLite access across tabs - #195
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fission Web applications can now use the same SQLite store from multiple tabs and overlapping page contexts. The Web provider moves from the single-owner OPFS SAH-pool VFS to SQLite 3.53's Web-Locks-backed
opfs-wlVFS, so every tab keeps an independent connection while SQLite remains the locking and transaction authority.The generated bridge derives a stable database namespace from
app.app_id, making applications hosted on the same origin independent. Bridge installation is idempotent within a page, and the worker performs a one-time migration of databases created by the previous SAH-pool implementation before opening the new namespaced database. The official SQLite async OPFS proxy is now included in generated assets.fission runandfission serve-webemit the cross-origin isolation headers required byopfs-wl. The storage guide documents the corresponding production hosting requirement. Generated framework-owned SQLite assets are refreshed during Web preparation so existing projects receive worker and SQLite fixes instead of retaining stale copies.This also closes the setup gap where
store-sqlite-webcould compile without thestoragecapability that installs its JavaScript host. Web run/build preparation now verifies the resolved provider and capability agree, repairs missing generated assets, and reports a configuration error before compilation when they do not. Direct builds receive a typed missing-bridge error rather than an uncaught wasm-bindgen exception.The browser conformance fixture opens two same-origin browsing contexts, writes through both SQLite connections, and verifies that both committed values are visible through the shared application database.
Closes #194