feat(updater): add Chocolatey as optional Windows package manager#111
feat(updater): add Chocolatey as optional Windows package manager#111
Conversation
Add Chocolatey (`choco`) as an alternative to winget in the Software Updater, with a Settings dropdown to choose between them. Falls back to the other manager automatically if the preferred one is not installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ec9f39294
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. 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".
Pass the packageManagerName from the scan result through to runUpdates so updates use the manager that produced the app IDs, not the current setting. Also return per-app errors when no manager is available instead of a silent no-op. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a819e552a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. 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".
| // Fallback: use the setting preference with availability check | ||
| const settings = getSettings() | ||
| const preferChoco = settings.windowsPackageManager === 'choco' |
There was a problem hiding this comment.
Require stable manager selection for Windows update runs
This fallback path still binds update execution to the current setting when source is omitted, so callers that only send appIds can dispatch IDs to the wrong backend if settings/availability change between check and run. Fresh evidence: while the renderer now passes source, handleUpdateRun in src/main/services/cloud-agent.ts (around lines 2328-2343) still calls runUpdates(appIds, () => {}) without manager context, so previously checked winget IDs can be sent to Chocolatey (or vice versa) and fail.
Useful? React with 👍 / 👎.
Summary
choco) as an alternative Windows package manager in the Software Updater, alongside winget--forceretryChanges
src/main/services/software-updater.ts— Chocolatey backend (parse, check, upgrade), Windows dispatcher with fallbacksrc/shared/types.ts—windowsPackageManagersetting,'choco'inpackageManagerNameunionsrc/main/services/settings-store.ts/src/renderer/src/stores/settings-store.ts— Default:wingetsrc/main/services/ipc-validation.ts— Validation for the new settingsrc/renderer/src/pages/SettingsPage.tsx— Windows-only dropdown in General sectionsrc/renderer/src/pages/SoftwareUpdaterPage.tsx— "choco not found" error with install linkTest plan
npm test— all 1937 tests passchoco outdatedchoco upgrade <id> -y) with elevation fallback🤖 Generated with Claude Code