fix(desktop): load logo assets via relative paths so the packaged app renders#90
Merged
Conversation
… renders The logo PR referenced /favicon.svg and /logo-mark.svg with absolute paths. Vite's base is './' precisely so the packaged app can load assets over file:// (Electron loadFile); an absolute '/' resolves to the drive root instead, so both assets 404 with ERR_FILE_NOT_FOUND in the built app — the favicon and the in-app header logo never appear, and the file:// render E2E (file-load.e2e.mjs) fails. - App.tsx: import the header mark from src/assets so Vite inlines it (779 B → data URI) instead of a runtime absolute URL - index.html: reference the favicon relatively (favicon.svg) - move logo-mark.svg into src/assets; drop the unused public/logo.svg Verified: frontend build + file-load.e2e.mjs pass locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The logo PR (#89) referenced
/favicon.svg(index.html) and/logo-mark.svg(App.tsx header) with absolute paths. Vite'sbaseis./specifically so the packaged desktop app can load assets overfile://(ElectronloadFile). An absolute/resolves to the drive root instead, so both assets 404 withERR_FILE_NOT_FOUNDin the built app:file-load.e2e.mjs(the guard for thefile://render path) failsThis is why the
e2e-desktopcheck is red onmainand on every PR branched from it.Fix
App.tsx— import the header mark fromsrc/assetsso Vite inlines it (779 B → data URI) instead of emitting a runtime absolute URLindex.html— reference the favicon relatively (favicon.svg)logo-mark.svgintosrc/assets; drop the unusedpublic/logo.svgVerification
Locally:
pnpm -C frontend buildsucceeds, andfile-load.e2e.mjspasses (the ERR_FILE_NOT_FOUND assertion and the try-sample → sidecar parse). Frontend typecheck and App tests (11/11) pass; Hangul guard clean.