Menu ▾ ▴

#450 feat(autostart): show whether Carrier really starts at login, and use a login item on macOS

closed
nobody
None
6 days ago
6 days ago
Anonymous
No

Originally created by: kristofferR

Start on System Startup only ever wrote the setting. Every OS lets people switch startup off outside Carrier (Task Manager, the desktop's autostart settings, macOS Login Items), and Carrier's switch then stayed on while Carrier didn't start. On macOS 13+ the LaunchAgent it used also showed up under "Allow in the Background" instead of as a normal "Open at Login" item.

What changed

  • tauri-plugin-autostart is replaced by src-tauri/src/autostart.rs, which writes the registration and reads it back on every platform. Carrier reads the OS state at startup and whenever Settings opens or regains focus, on the settings worker so it can't overwrite a save in flight. The OS wins; an unreadable state keeps the stored setting.
  • macOS 13+: an "Open at Login" item through SMAppService.mainApp. A login item waiting for approval (which is also what switching it off in Login Items reports) reads as off, and Settings shows a "Waiting for Approval" row with an Open Login Items button. 10.15 to 12 keep the LaunchAgent.
  • Migration from the LaunchAgent: the login item is registered and the agent is removed only once the login item is enabled, so startup never has a gap. An agent the user switched off under "Allow in the Background" (read through statusForLegacyURL) is removed without registering a login item.
  • Windows: on when the per-user Run value points at this executable and StartupApproved\Run doesn't mark it disabled. Turning it on in Carrier clears that mark. The plugin's machine-wide path for elevated runs is gone.
  • Linux: the XDG autostart entry counts unless it has Hidden=true or X-GNOME-Autostart-enabled=false, and only if it launches this install (the AppImage when running from one). It now honours $XDG_CONFIG_HOME, and the launch path is quoted, so paths with spaces work.
  • Registrations keep the plugin's names, so existing ones carry over.

Testing

  • cargo fmt, clippy -D warnings (Linux, and cross-checked for aarch64-apple-darwin and x86_64-pc-windows-msvc), cargo test --lib and bun run check pass. Unit tests cover the Task Manager flag, Run value parsing, Exec quoting, .desktop switches, the OS-wins rule, and the macOS migration plan.
  • Not yet tested on real logins: macOS login item registration, approval and LaunchAgent migration (needs a signed build), Windows registry reads and writes, and a Linux desktop's own autostart switch.

Ref [#443]

Related

Tickets: #443

Discussion

  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: kristofferR

    @codex review for consequential defects introduced by this PR; do not expand its original scope with unrelated refactors, features, or speculative hardening

     
  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: coderabbitai[bot]

    Action not completed

    Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
     
  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: coderabbitai[bot]

    [!WARNING]

    Review limit reached

    You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

    Next included review available in 49 minutes.

    Check out review usage here.


    View limit details



    Limit details: You’ve used the included review currently available.

    Learn how review limits work.

    Review configuration:


    <picture></picture> Run configuration






    <picture></picture> Commits



    Reviewing files that changed from the base of the PR and between [f577fd] and 3467c0d6f22c007aeb87cda03d641d64ccdb1244.




    <picture></picture> Files ignored due to path filters: 1



    • src-tauri/Cargo.lock is excluded by !**/*.lock




    <picture></picture> Files selected for processing: 6



    • dist/settings.html
    • src-tauri/Cargo.toml
    • src-tauri/src/autostart.rs
    • src-tauri/src/commands.rs
    • src-tauri/src/lib.rs
    • src-tauri/src/settings.rs





    • [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    Share

    - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
     

    Related

    Commit: [f577fd]

  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review Summary: ✅ Completed This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-08T21:34:38.093418Z">2026-11-08T21:34:38.093418Z</relative-time> | `3467c0d` | Manual request |
    ℹ️ About Codex in GitHub
    [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
     
  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: chatgpt-codex-connector[bot]

    Codex Review: Didn't find any major issues. Bravo.

    Reviewed commit: 3467c0d6f2

    ℹ️ About Codex in GitHub
    [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
     
  • Anonymous

    Anonymous - 6 days ago

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.