feat(shell): in-app uninstall button replacing copy-to-terminal#150
Merged
Conversation
Replace the Diagnostics 'copy a command to Terminal' Uninstall card with a real in-app 'Uninstall Maximal…' button that runs the cleanup itself. - CLI: add a --keep-app flag to `maximal uninstall` that skips deleting the .app bundle while still removing the ~/.local/bin/maximal symlink and the other PATH binaries. The in-app uninstall can't delete the bundle it's running from, so the user trashes it afterwards. - Rust: add #[tauri::command] uninstall_maximal(revert_claude, purge), which spawns `maximal uninstall --unattended --keep-app` (plus the per-checkbox flags), awaits .output(), and returns Result so the webview learns success/failure. Registered in invoke_handler! and granted to the loopback webview via the allow-uninstall-maximal permission (mirrors restart_sidecar — without it the command silently no-ops in production). - Webview: tightened card with two in-card option checkboxes (Revert Claude Desktop keys, checked; Delete stored secrets & config, unchecked), a destructive 'Uninstall Maximal…' button, and a quiet terminal fallback. Click → window.confirm summarizing the choices → setBusy → invoke → calm completion state, or a non-blocking inline error on failure. Old copy-uninstall-cmd wiring removed.
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.
What
Replaces the Diagnostics "copy an uninstall command to Terminal" card with a real in-app "Uninstall Maximal…" button that runs the cleanup itself.
src/uninstall.ts): new--keep-appflag — removes the~/.local/bin/maximalsymlink + other PATH binaries but leaves/Applications/maximal.app(the in-app uninstall can't delete the bundle it's running from; the user trashes it afterward).lib.rs): auninstall_maximal(revert_claude, purge)Tauri command that shells out tomaximal uninstall --unattended --keep-app(+ per-checkbox flags) and returns success/failure to the webview. Registered ininvoke_handler!; granted to the loopback webview viaallow-uninstall-maximal(mirrorsrestart_sidecar).window.confirmsummary → busy → invoke → calm completion or a non-blocking inline error, plus a quiet terminal fallback.Provenance
This ports the long-stranded local branch
feat/in-app-uninstall(commitbbace2a, authored 2026-06-17 by @stuffbucket) — it predated the shell rewrite (#135/#146) and had never been pushed. Investigation showed the "rewrite" was additive (parallel React islands); the Settings/Diagnostics page is the same vanilla HTML+TS, so the commit cherry-picks cleanly onto currentmain. The only adaptation: the handler used a bareinvoke(...), but currentmain.tsimports onlysafeInvoke(which can't drive the inline error UI), so one import was added:import { invoke } from "@tauri-apps/api/core".Verification
bun test tests/uninstall.test.ts— 9/9 (the--keep-appinstall-target selection).tsc+ build clean;cargo checkclean (theuninstall_maximalcommand compiles).check:fast0 errors; design-token check clean.--accent-destructivebutton, teal checkboxes, single card / no nesting, all tokenized — design-rule compliant).