fix(settings): make recommended model one click and prefer on-disk - #781
fix(settings): make recommended model one click and prefer on-disk#781jatinkrmalik wants to merge 3 commits into
Conversation
The Speech Model panel printed a recommended size and specialization as plain text, so applying it meant hunting through two dropdowns. Turning that line into a button sets both at once. Before a download starts, whisper.cpp now checks for a same-size weight already on disk and offers it. The Model Size list also shows weight and a downloaded marker the way Specialization already does. Fixes #778
✅ Deploy Preview for voca-linux canceled.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
| Filename | Overview |
|---|---|
| src/vocalinux/ui/settings_dialog.py | Implements recommendation actions, model-size status labels, and comparable on-disk model selection; two new handlers omit repository-required return annotations. |
| tests/test_recommended_model_action.py | Adds focused unit coverage for the recommendation and on-disk model-selection helpers and UI routing. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects whisper.cpp model] --> B{Requested model downloaded?}
B -- Yes --> F[Apply and save settings]
B -- No --> C{Same-size compatible model on disk?}
C -- No --> D[Begin requested-model download]
C -- Yes --> E{User choice}
E -- Use on-disk --> F
E -- Download --> D
E -- Cancel --> G[Restore saved model UI]
D --> F
Reviews (1): Last reviewed commit: "fix(settings): make recommended model on..." | Re-trigger Greptile
Greptile flagged the two new helpers for missing return types.
Summary
Speech Model showed a recommended model as a dead label. You had to map "Small EN" onto Model Size and Specialization yourself, and it was easy to download a fresh weight when a same-size one was already local.
Test plan
pytest tests/test_recommended_model_action.pyFixes #778
Known limits
Comparable on-disk means the same size bucket only (not a larger leftover like Medium when Small is recommended). English-only leftovers are not offered when the language is not English.