Skip to content

feat(startup): option to start Plexo minimized in system tray and launch at boot (#258) - #261

Open
DhruvilPatel603 wants to merge 1 commit into
anmolkapil:mainfrom
DhruvilPatel603:feature-start-minimized
Open

DhruvilPatel603 wants to merge 1 commit into
anmolkapil:mainfrom
DhruvilPatel603:feature-start-minimized

Conversation

@DhruvilPatel603

Copy link
Copy Markdown
Contributor

Summary

Resolves #258.

Adds support for starting Plexo minimized to the system tray and launching automatically at system startup across Windows, macOS, and Linux.


Key Changes

  1. Settings UI (Speed & Data Limits / General):

    • Added "Launch on startup" switch: automatically opens Plexo on system boot.
    • Added "Start minimized" switch: opens Plexo in the system tray without popping up the main window.
    • Settings persist to app-settings.json and reset cleanly with "Reset to defaults".
  2. Cross-Platform Autostart Support (src/main/autostart.ts):

    • Windows: Uses Electron's native app.setLoginItemSettings passing --minimized when start-minimized is enabled.
    • macOS: Uses app.setLoginItemSettings({ openAtLogin }).
    • Linux: Manages standard XDG Autostart entry at ~/.config/autostart/plexo.desktop (supporting both installed binary and AppImage via process.env.APPIMAGE || process.execPath).
  3. Minimized Startup & Tray Handling (src/main/index.ts):

    • Supports CLI flags (--minimized, --start-minimized, --hidden) as well as the saved settings.startMinimized preference.
    • When launching minimized, keeps the window hidden on ready-to-show and initializes the system tray icon immediately.
    • Clicking the tray icon, launching a second instance, or receiving a download link (from the browser extension or CLI) smoothly brings the window forward.
  4. Testing (e2e/startup.spec.ts):

    • Tagged with @smoke for CI execution.
    • Uses exact Playwright locators to prevent ambiguous element matching.
    • Tests settings persistence across relaunches, UI switch interactions, default reset behavior, and minimized CLI launch.

Verification

  • npm run typecheck passes (0 errors across node, web, e2e, and extension)
  • npm run lint passes (0 errors)
  • npm run format:check clean
  • E2E startup test suite added

This branch has not been deployed

No deployments
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.

Feature request: option to start Plexo minimized in the system tray on Windows

1 participant