Can’t reach Shell:B
The Spark may be asleep, restarting or on another network. This page reloads by itself when it answers.
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 95b511f..a3f1eed 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -490,6 +490,12 @@ Making a share needs the owner's session (not localhost trust) and is audited. Network → **Share host** names a host that reaches this machine without Access or login in front: `share.shellb.app` (set up 2026-10-10) goes through `hub-shellb-edge`, which serves only the app shell, `/assets/*`, `/vendor/*` and `/api/share/*` with cookies stripped; links are built on it. + +**Access on phones.** When the Access session runs out, every request gets a redirect to Cloudflare's login, which a +fetch can't follow. `ui/src/net.ts` (`reloadIfEdgeLogin`) spots that (the redirect, or a 401/403 on `/api/auth/me`, +which Shell:B itself always answers with 200) and reloads the page so Access can sign in, instead of showing +"Can't reach Shell:B" forever. The manifest link carries `crossorigin="use-credentials"`, since browsers fetch it +without cookies otherwise and Access turns that away, which stops phones installing the app. The shared page renders Markdown and sandboxes HTML/SVG exactly like the owner's view, and makes no other API calls. ## Worlds diff --git a/ui/index.html b/ui/index.html index 6cc34c6..cab9c3a 100644 --- a/ui/index.html +++ b/ui/index.html @@ -3,7 +3,8 @@
- + + diff --git a/ui/public/sw.js b/ui/public/sw.js index ae328a5..1350023 100644 --- a/ui/public/sw.js +++ b/ui/public/sw.js @@ -42,6 +42,7 @@ const receiveShare = async (request) => { }; // Shown when Shell:B can't be reached and this device has never cached the app (first visit, or cleared site data). +// Its probe doesn't follow redirects: a Cloudflare Access login redirect is an answer too, and the reload signs in. const offlinePage = () => new Response(`The Spark may be asleep, restarting or on another network. This page reloads by itself when it answers.