Add UI to delete downloaded models - #211
Merged
Merged
Conversation
Settings > Models had download/load actions but no way to remove a downloaded model to free disk space, even though ModelManager already had an unused deleteModel implementation. Wires it up: a trash button appears on downloaded, inactive models (not the active one, not one mid-load/download, not OS-managed Apple Speech), behind a confirmation alert. Deletion now runs off the main thread so removing a large model doesn't stall the Settings UI.
Member
|
@Mr-Sunglasses LGTM but there are some merge conflicts that you may need to resolve. |
jatinkrmalik
previously approved these changes
Aug 11, 2026
Member
Author
@jatinkrmalik fixed the merge conflicts, we are good to go 🚀 |
jatinkrmalik
approved these changes
Aug 11, 2026
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.
Demo
Screen.Recording.2026-08-11.at.3.07.39.PM.mov
Summary
ModelManageralready had an unuseddeleteModelimplementation.ModelRow, behind a confirmation alert. Hidden for the active model, a model that's mid-load/download, and OS-managed Apple Speech (nothing on disk to delete).ModelManager.deleteModelis nowasyncso removing a large model doesn't block the Settings UI on the main thread, and it throws instead of silently no-op'ing when a Parakeet/sherpa-onnx catalog lookup misses.AppState.deleteModelrefuses to delete the active model or a model that's currently loading/downloading, surfacing a clear error instead.Test plan
swift buildsucceedsswift test— all 285 tests pass, including new coverage: successful delete, refusing to delete the active model, refusing to delete a loading model, and surfacing an underlying delete error