Skip to content

Fix login autostart (Windows Run key + macOS LaunchAgent) - #255

Merged
rodgolpe merged 7 commits into
masterfrom
fix/login-autostart
Nov 7, 2026
Merged

rodgolpe merged 7 commits into
masterfrom
fix/login-autostart

Conversation

@rodgolpe

@rodgolpe rodgolpe commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace auto-launch with our own login autostart so Windows starts OnlyKey (canonical Run value + StartupApproved) and macOS stays in the tray via a LaunchAgent (open -gj) instead of stacking Login Items / Dock icons.
  • On macOS, show an in-app “Allow System Events” note before the OS Automation prompt, then clean up legacy Login Items once while the window is visible (skipped on hidden autostart launches).
  • Includes release npm audit cleanup for the packaging tree.

Screenshots (macOS System Events)

In-app note before the OS prompt:

Allow System Events modal

macOS Automation prompt (purpose string):

macOS System Events prompt

Permission granted in System Settings → Privacy & Security → Automation:

Automation permission enabled

Test plan

  • Windows: enable login start from tray; reboot/login → app starts (hidden); Task Manager disable stays off across relaunch
  • macOS: enable login start; reboot/login → single tray instance, no extra Dock icon; first visible launch shows System Events note → Allow → legacy Login Items cleared
  • macOS: “Not now” / Don’t Allow still leaves LaunchAgent registration intact for next visible attempt
  • Linux: autostart desktop entry via onlykey-launch --hidden
  • npm test / npm run release audit path on target OS

Made with Cursor

rodgolpe and others added 7 commits November 4, 2026 22:44
…tray.

The auto-launch package registered a disabled Windows Run value named nw and kept adding macOS login items that opened the window and extra Dock icons.

Co-authored-by: Cursor <cursoragent@cursor.com>
…pears.

Hidden login still registers the LaunchAgent and skips that prompt until the window is open. A stored autostart off is not turned back on.

Co-authored-by: Cursor <cursoragent@cursor.com>
The app dependencies were already clean. npm run release audits the full tree, including vitest, happy-dom, and the nw, wait-on, and ESLint tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
That return failed lint and could discard the cleanup result.

Co-authored-by: Cursor <cursoragent@cursor.com>
The desktop shell only waits for Continue or Not now. It no longer builds its own overlay.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rodgolpe
rodgolpe merged commit 0db96dd into master Nov 7, 2026
10 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