Keep the Tauri boot splash until the server is up, and get there faster - #1312
Open
joepio wants to merge 3 commits into
Open
Keep the Tauri boot splash until the server is up, and get there faster#1312joepio wants to merge 3 commits into
joepio wants to merge 3 commits into
Conversation
The webview is ready before the embedded atomic-server binds, so the app was fetching into a dead port and landing on "Could not reach the server". Hold the HTML splash until node_status (or an HTTP fallback) says the listener is accepting, and show the startup error on that splash if the node never comes up. Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
joepio
marked this pull request as ready for review
August 27, 2026 06:10
HTTP binds without waiting on the Iroh n0 relay (up to 10s). The boot splash lives outside #root so React does not blank it, unused WASM preloads are stripped from the Tauri shell, and readiness uses cached IPC (HEAD only as the e2e fallback). Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
The transform drops the preload tags; the HTML comment still names the worker import path, which is not a fetch on the critical path. Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
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.
Related Issues
The desktop and Android apps open the webview before the embedded atomic-server binds. The HTML splash disappeared as soon as React started, the Store fetched into a dead port, and the page settled on "Could not reach the server" — for a node that was about to answer in milliseconds. On a failed start (another
atomic-serverholding the data directory) the splash also spun forever with no reason.First contentful paint of the real app was then delayed further: HTTP bind waited on the Iroh n0 relay (up to 10s on a slow or offline network), React wiped the splash for
IdentityReconcileGate's empty first paint, and the Tauri shell preloaded ~6MB of unused OPFS WASM.Checklist
What changed
The existing boot splash (spinning AtomicServer lockup in
index.html) now stays up until the embedded node is actually accepting connections. The Store is not created until then, so the first fetch cannot race the bind.Readiness is
node_status, a new Tauri command: our store is up and the HTTP port is accepting (the embedder hook fires beforebind(), so the store alone is too early). A startup error — the usual "Database already open" case — is written onto the splash instead of spinning forever.HTTP HEAD is the fallback when invoke is missing, so e2e tests that fake
__TAURI_INTERNALS__without a real shell still resolve against the already-running test server. When IPC answers{ready:false}, we do not also download the SPA.To get real content on screen sooner:
#root(#boot-splash) so React mount andIdentityReconcileGatecannot blank it. The gate fades it once children are about to paint.Tests
waitForEmbeddedServer.test.ts: no-op in a browser, ready vianode_status, HTTP HEAD fallback, skip HTTP when IPC already answered, fail-fast on startup error, retries, timeout, splash error DOM,hideBootSplash.tauriHtml.test.ts: the Tauri transform strips WASM/atomicdata preloads fromindex.html.tauri.test.tsstill covers origin detection.cargo check -p atomic_lib --features db-redb,iroh --libandcargo check -p atomic-server --libsucceeded.cargo check -p atomic-server-tauricould not run in this environment (nogdk-3.0). The Tauri GUI cannot be launched here; JS unit tests cover the splash/readiness path.Notes
Pairing over Iroh is unchanged:
POST /iroh-syncalready polls until a node id is advertised, because HTTP being up never meant the transport was dialable.