Autostart fix#121
Merged
Merged
Conversation
📊 Coverage Report
|
🧪 E2E Test Results✅ 18 passed, 0 failed, 0 skipped
|
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.
Summary
Added
requestSingleInstanceLock()in the main entry point, plus asecond-instancehandler that restores/shows/focuses the existing window.getAutoStartState()in the autoStart module, exposed through a newauto-start-get-stateIPC channel andwindow.api.getAutoStartState(); the settings toggle now reflects the actual OS login-item state (falls back to the persisted value on Linux/dev).startMinimizedis now honored on launch — when enabled, the window stays hidden in the system tray.Changed
AppUserModelIdset tocom.clipless.app(was the electron-vite template defaultcom.electron). On Windows this value is used as the autostart registry value name, so a unique ID prevents collisions with other Electron apps and stops dev builds from clobbering the installed app's entry.applyAutoStartnow manages OS login items only in packaged builds (app.isPackaged), sonpm run devand e2e runs no longer register stray login items pointing atnode_modules/electron.Fixed
com.electronAppUserModelId used as the login-item registry name, and dev/e2e runs writing stray login items into the user'sRunkey.Removed
com.electronlogin-item entry is now cleared automatically during reconciliation (self-healing migration tocom.clipless.app), so a stale entry can no longer keep launching the app after autostart is turned off — or cause a duplicate launch while it's on.