Skip to content

Add Launch at Login feature#425

Open
emrdgrmnci wants to merge 1 commit intoactuallymentor:mainfrom
emrdgrmnci:feature/launch-at-login
Open

Add Launch at Login feature#425
emrdgrmnci wants to merge 1 commit intoactuallymentor:mainfrom
emrdgrmnci:feature/launch-at-login

Conversation

@emrdgrmnci
Copy link

  • 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 (Macbook Pro Apple Silicon M4 Pro):

  • 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)

Copilot AI review requested due to automatic review settings December 11, 2025 21:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
@emrdgrmnci emrdgrmnci force-pushed the feature/launch-at-login branch from 1c55bea to 7764240 Compare December 11, 2025 22:15
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