aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/api/webapp.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-17 03:40:52 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-17 03:40:52 +0200
commitf4fd6db8faa15bf02f38a14b652cc46936f8d6bf (patch)
tree396cbe7fe188fb565231be937ccfa6419384814f /packages/meshbay-hub/src/meshbay_hub/api/webapp.py
parent929bfcccf8928a30d86d48a8b0137db0dd4a1ee0 (diff)
downloadmeshbay-f4fd6db8faa15bf02f38a14b652cc46936f8d6bf.tar.gz
spa: a blank page can never be silent again
boot-guard.js is a classic script loaded before the module graph, so it survives the graph failing to link. If #app is still empty after ten seconds it names what failed and offers a reset of this origin — cache, storage, databases and the service worker, which clearing the cache does not touch. Two real defects found building it: openDB never settled when an upgrade was blocked by another tab, and a connection it gave up on stayed open and squatted the database. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/webapp.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/api/webapp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/webapp.py b/packages/meshbay-hub/src/meshbay_hub/api/webapp.py
index 6ac5cdb..3e23961 100644
--- a/packages/meshbay-hub/src/meshbay_hub/api/webapp.py
+++ b/packages/meshbay-hub/src/meshbay_hub/api/webapp.py
@@ -180,6 +180,10 @@ _HTML = """\
and app.js's own relative imports inherit the prefix, which is the only
way the module graph is guaranteed not to be a mixture of two builds.
See _asset_version() and VersionedStatics. -->
+ <!-- First, and not a module: if the graph below never links, no module code
+ runs at all, and this is what keeps the page from being silently blank.
+ It draws nothing unless #app is still empty ten seconds from now. -->
+ <script src="/a/{v}/boot-guard.js"></script>
<!-- Argon2id (WebAssembly, inlined) — WebCrypto has no memory-hard KDF, and the
keypair bundle needs one: it is protected by the passphrase alone and sits
on every node its owner joins (C4). Vendored, see static/vendor/PROVENANCE.md -->