From 23f18ff13e0a8c612d04727de2ccfadf2d13ff7c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 22:48:11 -0700 Subject: Shared note links open on the post, with names and faces The server renders /nevent1 and /note1 pages with the thread inlined (post, root, replies, kind 0s) and Open Graph tags; the client seeds its thread cache from it and opens the thread on the first paint. Without it, a pending frame holds the screen instead of the front door. Profile lookups ask our relays and the profile indexes at once, streamed, instead of one after the other behind five-second waits. A thread opened straight from a link has no Back button. Co-Authored-By: Claude Opus 5.5 --- build.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build.js') diff --git a/build.js b/build.js index 1fdd889..c90656f 100644 --- a/build.js +++ b/build.js @@ -88,9 +88,13 @@ self.addEventListener('fetch', (e) => { if (u.pathname === '/api/feed') return; if (req.mode === 'navigate') { + // A note page comes back with its thread rendered into it (the server's + // note-page); that copy must not become the offline shell for every path. + const notePage = /^\\/(note|nevent)1/i.test(u.pathname); e.respondWith( fetch(req) .then((res) => { + if (notePage) return res; const copy = res.clone(); caches.open(CACHE).then((c) => c.put('./', copy)); return res; @@ -369,7 +373,7 @@ function bootShell(logo, staging) { : 'v3 beta'; return `
${badge}
`; } -const BOOT_SHELL_SCRIPT = ``; +const BOOT_SHELL_SCRIPT = ``; // HAL_NO_SW=1: the page registers no service worker. The Android bundled // build serves this page from its own assets, where a worker would only -- cgit v1.2.3