Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a "Launch at Login" feature to the Battery app, enabling users to configure the app to automatically start when they log into their macOS system. The setting is persisted using electron-store and properly handles macOS app bundle paths for compatibility.
- Added launch at login setting to store schema with getter and setter functions
- Integrated launch at login toggle into Advanced settings submenu with checkbox UI
- Applied launch at login setting on app startup to maintain sync with system preferences
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/modules/settings.js | Added launch_at_login store schema, getter/setter functions, and logic to apply the setting using Electron's setLoginItemSettings API with macOS app bundle path handling |
| app/modules/interface.js | Integrated launch at login checkbox into Advanced settings submenu and imported new settings functions |
| app/main.js | Applied launch at login setting on app startup before initializing the interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 'Launch at Login' option to Advanced settings submenu - Persist setting using electron-store - Use app bundle path (not executable path) for macOS compatibility - Apply setting on app startup to ensure it's always in sync - Setting appears in System Settings > General > Login Items when enabled Tested: - Enabled/disabled launch at login from menu - Verified setting persists across app restarts - Confirmed app launches automatically after logout/login - Tested with app in /Applications (required for login items to work)
1c55bea to
7764240
Compare
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.
Tested (Macbook Pro Apple Silicon M4 Pro):