Skip to content

fix(electron): packaged UI via localhost static server (v0.8.7)#8

Merged
I4cTime merged 1 commit intomainfrom
develop
Apr 15, 2026
Merged

fix(electron): packaged UI via localhost static server (v0.8.7)#8
I4cTime merged 1 commit intomainfrom
develop

Conversation

@I4cTime
Copy link
Copy Markdown
Owner

@I4cTime I4cTime commented Apr 15, 2026

Problem

Packaged builds used BrowserWindow.loadFile() for the Next static export. Under file://, root-relative assets (/_next/static/..., /splash.png) resolve to the filesystem root, so CSS/JS never load and the UI appears as unstyled HTML.

Fix

When packaged, start a minimal HTTP server on 127.0.0.1 (random port) serving renderer/out/, then loadURL(http://127.0.0.1:<port>/). Same pattern as dev (HTTP origin). Server closes on before-quit.

Version

0.8.7 — publish new AppImage / .deb after merge.

Made with Cursor

loadFile(file://) breaks root-relative /_next/, /splash.png, and /routes.
Bind a minimal 127.0.0.1 static server to the renderer out/ directory and
loadURL(http://127.0.0.1:<port>/) when packaged. Bump to v0.8.7.

Made-with: Cursor
@I4cTime I4cTime merged commit a29fc63 into main Apr 15, 2026
4 checks passed
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