From 843cd7c3e5a5a8dec366b947a5fe7fa84da72748 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Thu, 21 May 2026 13:11:07 +0100 Subject: [PATCH 1/2] fix(preview): relative iframe src for subpath deployment (bd-0pm7a) Q2DebugIframe and Q2PreviewIframe hard-coded `src="/q2-*.html"`, which is root-absolute and bypasses Vite's `base: './'`. Locally and in Playwright the SPA is served at the host root so the two coincide; under a subpath deployment the iframe requested `https://host/q2-*.html` and got the platform's 404 / SPA shell, blanking the preview. Dropping the leading slash resolves the iframe against the parent doc's pathname, matching how the rest of the build references its assets. Hash-only routing keeps the parent's pathname stable across client navigation, so the relative form is correct at every route. --- hub-client/src/components/render/q2-debug/Q2DebugIframe.tsx | 2 +- ts-packages/preview-renderer/src/iframe/Q2PreviewIframe.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hub-client/src/components/render/q2-debug/Q2DebugIframe.tsx b/hub-client/src/components/render/q2-debug/Q2DebugIframe.tsx index 9cf8a2e0d..5a345c14c 100644 --- a/hub-client/src/components/render/q2-debug/Q2DebugIframe.tsx +++ b/hub-client/src/components/render/q2-debug/Q2DebugIframe.tsx @@ -74,7 +74,7 @@ export function Q2DebugIframe({ return (