Skip to content

Allow removing stale custom models from picker - #471

Open
nRanzo wants to merge 1 commit into
youssofal:mainfrom
nRanzo:feat/remove-stale-custom-models
Open

Allow removing stale custom models from picker#471
nRanzo wants to merge 1 commit into
youssofal:mainfrom
nRanzo:feat/remove-stale-custom-models

Conversation

@nRanzo

@nRanzo nRanzo commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • Allow stale persisted custom models to be removed from the model picker.
  • Reuse the existing removeCustomModel(id:) configuration API.
  • Keep installed, official, and currently selected models non-removable.
  • Removing a model only unregisters it from the picker; model files on disk are left untouched.
  • Add focused tests for removal behavior and picker eligibility.

Removal eligibility

  • Only persisted custom models that are no longer installed can be removed.
  • Official catalog models are never removable.
  • Installed custom models are not removable.
  • The currently selected model is not removable.
  • Removal only unregisters the model from the picker and does not delete files from disk.

Testing

  • Added unit tests covering stale, installed, official, and current models.
  • Manually verified the model picker in the macOS app: a stale custom model exposes Remove from picker via the row context menu and requires confirmation before removal.
  • git diff --check passes.

@nRanzo
nRanzo requested a review from youssofal as a code owner September 6, 2026 13:33
@youssofal

youssofal commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Thanks, this reads like a finished change. A stale persisted custom model should be removable from the picker without touching files on disk, and the rules you list (official, installed and currently selected models stay put) match how the picker is meant to work. If you have the branch, open a pull request against main and we will review it for the next release. The model picker overlay changed in 2.11.2, so rebase on the tag once it is out.

@nRanzo
nRanzo force-pushed the feat/remove-stale-custom-models branch from 7f51f76 to 3d6a436 Compare September 6, 2026 15:02
@nRanzo

nRanzo commented Sep 6, 2026

Copy link
Copy Markdown
Author

Rebased #471 onto v2.11.2 and re-tested the picker behavior. The stale custom model can still be removed as expected, with the confirmation flow working correctly.

@youssofal

youssofal commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Reviewed the rebased branch (3d6a436) on top of v2.11.2 and the work for the next release: it merges clean, and the app suite passes with it (897 tests, 0 failures), including the eight tests you added and the localization table checks. The four strings the dialog and the context menu use already exist in every language table. The rule (persisted custom, not installed, not selected) and the files-untouched guarantee are exactly right. It is queued for the next release and will be merged under your authorship with it. Thank you for the rebase and the retest.

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