feat: in-app control of brew command options (#47, #98 reactive, #13, #102, #100) - #109
Merged
Merged
Conversation
…102, #100) Users couldn't pass brew flags from the GUI, so a failed install/uninstall or a power-user option meant dropping to Terminal — defeating the app's purpose. Reactive recovery (#98 reactive / #13 / #102 / #100): when an install fails with "already an App", the Activity failure card offers **Adopt** (cask `--adopt`) and **Overwrite** (`--force`); when an uninstall is refused for a dependent, it offers **Force remove** (`--ignore-dependencies`). One-click re-run, no Terminal. Classification is a pure function in both shells (`util/recovery.ts` / `BrewRecovery.swift`) with matching tests. Advanced options in Settings → Brew (#47): a persisted "greedy upgrades" toggle (`--greedy`, wired into every upgrade path) and an **Autoremove** action (`brew autoremove`, confirm-gated). Backend (both shells): pure, unit-tested argv builders gain adopt/force, ignore-dependencies, greedy; new autoremove command (Tauri actions.rs + api.ts; native BrewArgs + AppModel). All option flags default off — behavior is unchanged until the user opts in. Tests: cargo +9 arg-builders, vitest +7 recovery, swift +9 (BrewArgs + BrewRecovery). NOTE: #98's proactive discovery (scan /Applications, match the cask catalog) is NOT in this PR — only the reactive adopt-on-conflict path. Tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the "users can't drive brew flags from the GUI" gap — a failed install/uninstall or a power-user option no longer means dropping to Terminal.
Reactive recovery (#98 reactive, #13, #102, #100)
When a brew command fails in a recoverable way, the Activity failure card now offers a one-click retry with the right flag instead of "run it in Terminal":
--adopt) + Overwrite (--force) — [brew-browser] Option to override brew install over current isntalls #13, [brew-browser] Install failed #102--ignore-dependencies) — [brew-browser] Uninstall failed #100Classification is a pure, unit-tested function in both shells (
src/lib/util/recovery.ts,BrewRecovery.swift).Advanced options — Settings → Brew (#47)
--greedyso self-updating casks are included) — wired into every upgrade path (Dashboard / per-package / curated).brew autoremove, confirm-gated) to remove no-longer-needed dependencies.Backend
Pure, unit-tested argv builders in both shells gain
adopt/force,ignore-dependencies, andgreedy; newautoremovecommand. All flags default off — behavior is unchanged until the user opts in.Tests
cargo +9 arg-builders · vitest +7 recovery · swift +9 (BrewArgs + BrewRecovery). Full suites green (cargo 658, swift 154, vitest 42, svelte-check clean).
Not included
#98's proactive discovery (scan
/Applications, match the cask catalog, "Discovered" surface) is not in this PR — only the reactive adopt-on-conflict path. Tracked as a follow-up.🤖 Generated with Claude Code