Skip to content

chore(desktop): simplify the installer - #1048

Merged
elyasmnvidian merged 5 commits into
mainfrom
emehtabuddin/desktop-installer-platforms
Oct 21, 2026
Merged

elyasmnvidian merged 5 commits into
mainfrom
emehtabuddin/desktop-installer-platforms

Conversation

@elyasmnvidian

@elyasmnvidian elyasmnvidian commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The installer repeats platform checks throughout shared code. This PR separates the macOS, Linux, and Windows implementations and removes unused code.

On Windows, run install and uninstall with cargo desktop from the source checkout, because Windows locks running executables. App updates continue to use a temporary copy.

@elyasmnvidian
elyasmnvidian requested a review from a team as a code owner October 20, 2026 06:13
@elyasmnvidian
elyasmnvidian added this pull request to stack #1053 October 20, 2026 06:14
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA-NeMo/Switchyard/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 443c835a-86de-430c-8e00-55452237dfd4
📥 Commits

Reviewing files that changed from the base of the PR and between ae2daec and 2e9f94b.

📒 Files selected for processing: 6
  • crates/switchyard-desktop/Cargo.toml
  • crates/switchyard-desktop/src/bin/switchyard-desktop-install.rs
  • crates/switchyard-desktop/src/install.rs
  • crates/switchyard-desktop/src/install/linux.rs
  • crates/switchyard-desktop/src/install/macos.rs
  • crates/switchyard-desktop/src/install/windows.rs

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

Walkthrough

The installer now delegates operations to platform-specific modules. Linux adds systemd user-service installation and removal. macOS adds LaunchAgent management and app-bundle staging and replacement. Windows removes the installed-helper handoff and directs non-dry-run actions to the source checkout.

Changes

Desktop installer

Layer / File(s) Summary
Shared platform routing
crates/switchyard-desktop/src/install.rs
Installation, preflight, service stopping, app replacement, and uninstall now call the selected platform module.
Linux systemd service
crates/switchyard-desktop/src/install/linux.rs
The Linux module checks user systemd availability and writes, enables, restarts, stops, and removes the user service. When saved keys are present, installation checks service activity and includes a journal lookup command in activity-check errors.
macOS LaunchAgents
crates/switchyard-desktop/src/install/macos.rs, crates/switchyard-desktop/src/install.rs
The macOS module manages server, desktop, and legacy LaunchAgents. It generates job plists, bootstraps and kickstarts jobs, and stops or removes them.
macOS app bundle staging and replacement
crates/switchyard-desktop/src/install/macos.rs
The macOS module stages and ad hoc-signs an app bundle. Replacement restores the prior bundle if installing the staged bundle fails.
Windows installer execution and identity
crates/switchyard-desktop/Cargo.toml, crates/switchyard-desktop/src/bin/switchyard-desktop-install.rs, crates/switchyard-desktop/src/install/windows.rs
Windows SID lookup now uses whoami.exe. The installed-helper handoff command and related functions were removed. Non-dry-run actions from the installed installer now return an error directing the user to run Cargo from the source checkout.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 2e9f9

The installer changes are ready to merge after normal checks. Installed Windows helpers now direct users to run installer commands from the source checkout, while app-triggered updates retain their temporary-copy path.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: simplifying the desktop installer through platform-specific refactoring and removal of handoff logic.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 5 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

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

A rabbit checks the service light,
Then bounds through launchd in the night.
A bundle waits, signed and neat,
While Windows points back to source-tree feet.
Linux units settle, jobs restart,
And rabbit ears applaud each part.

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from emehtabuddin/server-recorded-costs to main October 20, 2026 21:46
…self-install handoff

Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
@elyasmnvidian
elyasmnvidian force-pushed the emehtabuddin/desktop-installer-platforms branch from 2e9f94b to a2a5532 Compare October 20, 2026 23:02
Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
@elyasmnvidian elyasmnvidian changed the title chore(desktop): split the installer by platform and drop the Windows self-install handoff chore(desktop): simplify the installer Oct 20, 2026
Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
…mplate

Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
@elyasmnvidian
elyasmnvidian merged commit 21075c6 into main Oct 21, 2026
16 checks passed
@elyasmnvidian
elyasmnvidian deleted the emehtabuddin/desktop-installer-platforms branch October 21, 2026 03:11
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.

2 participants