Skip to content

fix: recover gracefully when model files are deleted outside Handy - #1918

Open
DhruvN102 wants to merge 3 commits into
cjpais:mainfrom
DhruvN102:first-contribution-workflow
Open

fix: recover gracefully when model files are deleted outside Handy#1918
DhruvN102 wants to merge 3 commits into
cjpais:mainfrom
DhruvN102:first-contribution-workflow

Conversation

@DhruvN102

Copy link
Copy Markdown

Fixes #1893

Problem

If a model's files are removed from disk outside Handy, Handy kept checking its cached state instead of checking reality, therefore, Delete and Rescan couldn't clear the stale entry, so there was no way out of the UI short of touching app data directly.

Changes

  • Recover gracefully when model files are deleted outside Handy — model
    listing (and Rescan) now verifies a model's files actually exist on disk
    instead of trusting the cached is_downloaded state. A stale entry pointing
    at a missing path moves back to "Available to Download" instead of staying
    listed as present.
  • Emit loading_failed for get_model_path errors too — the
    loading_failed event emitter is now defined before the model path
    lookup instead of after, so a failure in get_model_path (e.g. the file no
    longer exists) also emits a terminal loading_failed event instead of
    leaving the frontend stuck on "Loading …" with no feedback.

@cjpais

cjpais commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Thanks I'll take a look soon!

@DhruvN102 DhruvN102 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Thanks!

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.

[BUG] Models deleted outside the app stay listed as Downloaded; Delete and Rescan don't recover, app hangs on "Loading <model>…"

2 participants