Skip to content

fix(publishing): exclude desktop restart calls from publishing builds - #48

Open
soizo wants to merge 1 commit into
logseq:version/filefrom
soizo:fix/publishing-restart-controls
Open

fix(publishing): exclude desktop restart calls from publishing builds#48
soizo wants to merge 1 commit into
logseq:version/filefrom
soizo:fix/publishing-restart-controls

Conversation

@soizo

@soizo soizo commented Aug 26, 2026

Copy link
Copy Markdown

I found this while auditing the optimized publishing bundle from the current version/file branch on macOS (Apple Silicon).

The publishing bundle contains calls compiled as $logseq$$.api.$relaunch$(), but that build does not include the desktop logseq.api implementation. The desktop bundle includes and exports logseq.api.relaunch as expected.

Most of the affected controls are already hidden by runtime Electron checks, so I did not reproduce this through the normal publishing UI. However, /settings is still part of the publishing build, and the invalid API references remain in the generated artifact.

This change adds publishing guards to the five restart actions and their render sites. It keeps the settings route and the existing desktop behavior unchanged.

I tested optimized publishing and desktop builds with Node 18. In the generated artifacts, the publishing bundle no longer contains .$relaunch$() or logseq.api references, while the desktop bundle still exports and calls logseq.api.relaunch.

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