From 6e3f50a3a8547443a6b4d83940a0926fa0580033 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sat, 30 May 2026 01:40:42 -0500 Subject: [PATCH] fix(desktop): resolve renderer assets relative to BASE_URL Absolute public asset paths (/apple-touch-icon.png, /ds-assets/...) work under the dev server but break in the packaged app, where the renderer is loaded from file://.../index.html and a leading slash resolves to the filesystem root -> broken onboarding provider icon and backdrop image on macOS. Prefix these with import.meta.env.BASE_URL so they resolve next to the bundled index.html in both dev and packaged builds. --- apps/desktop/src/components/Backdrop.tsx | 3 ++- apps/desktop/src/components/desktop-onboarding-overlay.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/Backdrop.tsx b/apps/desktop/src/components/Backdrop.tsx index 1f69167c6c..1ced2f4d11 100644 --- a/apps/desktop/src/components/Backdrop.tsx +++ b/apps/desktop/src/components/Backdrop.tsx @@ -21,6 +21,7 @@ const BLEND_MODES = [ ] as const type BlendMode = (typeof BLEND_MODES)[number] +const assetPath = (path: string) => `${import.meta.env.BASE_URL}${path.replace(/^\/+/, '')}` export function Backdrop() { const [controlsOpen, setControlsOpen] = useState(false) @@ -99,7 +100,7 @@ export function Backdrop() { alt="" className="w-auto min-w-dvw object-cover" fetchPriority="low" - src="/ds-assets/filler-bg0.jpg" + src={assetPath('ds-assets/filler-bg0.jpg')} style={{ height: `${statue.scale}dvh`, objectPosition: statue.objectPosition, diff --git a/apps/desktop/src/components/desktop-onboarding-overlay.tsx b/apps/desktop/src/components/desktop-onboarding-overlay.tsx index 0b75aadd15..d3f12a71df 100644 --- a/apps/desktop/src/components/desktop-onboarding-overlay.tsx +++ b/apps/desktop/src/components/desktop-onboarding-overlay.tsx @@ -108,6 +108,8 @@ const PROVIDER_DISPLAY: Record = { 'qwen-oauth': { order: 5, title: 'Qwen Code' } } +const assetPath = (path: string) => `${import.meta.env.BASE_URL}${path.replace(/^\/+/, '')}` + const FLOW_SUBTITLES: Record = { pkce: 'Opens your browser to sign in, then continues here', device_code: 'Opens a verification page in your browser — Hermes connects automatically', @@ -333,7 +335,7 @@ function FeaturedProviderRow({ >
- + {providerTitle(provider)} {loggedIn ? (