From 06182363cfa7941d12c7a00f04f14e8907922d4b Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 1 Jul 2026 15:05:50 +0000 Subject: [PATCH] Portal: render placeholder instead of recursing when embedded in an iframe An un-routed app path falls back to serving the portal, which would otherwise load the whole shell inside itself endlessly. Detect self-embedding and show a 'not available yet' placeholder instead. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/App.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index b5f9f76..b3a3fda 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,32 @@ import { Dashboard } from './pages/Dashboard' import { AppFrame } from './pages/AppFrame' import { AdminUsers } from './pages/AdminUsers' +// The portal is only ever the top-level frame. If it finds itself loaded inside +// an iframe, it means an app's path fell back to the portal (that app isn't +// deployed or routed in NPM yet) — so render a placeholder instead of recursing +// the whole shell endlessly inside itself. +function EmbeddedFallback() { + return ( +
+
+
🚧
+

+ This app isn’t available yet +

+

+ It hasn’t been deployed or routed on this site. +

+
+
+ ) +} + export default function App() { + if (window.self !== window.top) return + return (