Skip to content

fix(desktop): load logo assets via relative paths so the packaged app renders#90

Merged
haksungjang merged 1 commit into
mainfrom
fix/logo-file-url
Jul 14, 2026
Merged

fix(desktop): load logo assets via relative paths so the packaged app renders#90
haksungjang merged 1 commit into
mainfrom
fix/logo-file-url

Conversation

@haksungjang

Copy link
Copy Markdown
Member

Problem

The logo PR (#89) referenced /favicon.svg (index.html) and /logo-mark.svg (App.tsx header) with absolute paths. Vite's base is ./ specifically so the packaged desktop 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 in the installed app
  • file-load.e2e.mjs (the guard for the file:// render path) fails

This is why the e2e-desktop check is red on main and on every PR branched from it.

Fix

  • App.tsx — import the header mark from src/assets so Vite inlines it (779 B → data URI) instead of emitting 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

Verification

Locally: pnpm -C frontend build succeeds, and file-load.e2e.mjs passes (the ERR_FILE_NOT_FOUND assertion and the try-sample → sidecar parse). Frontend typecheck and App tests (11/11) pass; Hangul guard clean.

… 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.
@haksungjang
haksungjang merged commit f4ab620 into main Jul 14, 2026
24 checks passed
@haksungjang
haksungjang deleted the fix/logo-file-url branch July 14, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant