From 429ac206f9bc9a1cf8eef1e47e7e877358b1b4b7 Mon Sep 17 00:00:00 2001 From: Viktor Vaczi Date: Thu, 18 Jun 2026 14:33:55 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Gerber=20demo:=20survive?= =?UTF-8?q?=20a=20stale=20cross-origin-isolation=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The demo showed "Live demo unavailable in this browser" on fully capable browsers (e.g. Chrome) whenever a page load wasn't cross-origin isolated — a soft SPA navigation, or a visit cached from before the COOP/COEP headers went live. The old reload guard used a sticky sessionStorage flag that, once set during a non-isolated load, never cleared, so it skipped the recovery reload and showed a misleading "unsupported browser" message. - Reload guard now uses a timestamp, not a sticky flag: a stale flag from an earlier visit no longer permanently strands the demo (reload loop still prevented within a 10s debounce). - Non-isolated pages now open the standalone viewer (/gerber-demo/, isolated on its own and always works) in a new tab instead of dead-ending. - The "needs a recent browser" note only shows when provably incapable (isolated but missing SharedArrayBuffer/WebGL2). Co-Authored-By: Claude Opus 4.8 (1M context) --- site/src/components/GerberDemo.astro | 73 ++++++++++++++++------------ 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/site/src/components/GerberDemo.astro b/site/src/components/GerberDemo.astro index ed851bc..7134291 100644 --- a/site/src/components/GerberDemo.astro +++ b/site/src/components/GerberDemo.astro @@ -56,6 +56,7 @@ const caption =