Repository navigation
fix: harden scans, rules, Civitai parsing, open_directory, aria2 lifetime - #13
Merged
Merged
Conversation
…time - Workflow and model scans run on a blocking thread instead of the async runtime, and use one walker that still follows symlinks/junctions (common for ComfyUI model folders) but visits each canonical directory once and caps the depth, so link cycles no longer recurse until the stack overflows. - open_directory only accepts directories; a file path would have been opened/executed by explorer/open. - suggest_type: malformed rules JSON is an error, and single rules that don't parse or name an unknown model type are skipped with a warning, instead of unwrap_or_default silently discarding every rule. - Civitai: check the model-version metadata status before parsing (a 401/404 JSON body was treated as metadata). Content-Disposition parsing prefers filename*, is case-insensitive, and no longer percent-decodes plain names. - Start aria2 with --stop-with-process=<app pid> so it exits by itself when the app crashes or is killed (kill_on_drop never runs in that case).
mogurt
pushed a commit
that referenced
this pull request
Sep 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.2](v0.1.1...v0.1.2) (2026-09-29) ### Bug Fixes * clear-all, editable filenames, duplicate rename, dead settings, workflow drop ([#10](#10)) ([ae5f0fc](ae5f0fc)) * harden scans, rules, Civitai parsing, open_directory, aria2 lifetime ([#13](#13)) ([2c643e0](2c643e0)) * path joins with trailing separators, missing translations; add tests ([#14](#14)) ([af4b7ce](af4b7ce)) * search errors, sorting, Civitai paging, HF sizes; keep task progress ([#12](#12)) ([3321d81](3321d81)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
Batch 3 of the review items: backend robustness.
scan_workflow_dirandcheck_models_localnow run on a blocking thread instead of the async runtime.open_directoryonly accepts directories. A file path would have been opened or executed byexplorer/open.suggest_type)unwrap_or_defaultsilently discarded every rule.Content-Dispositionparsing prefersfilename*, is case-insensitive, and no longer percent-decodes plain quoted names.--stop-with-process=<app pid>, so it exits by itself when the app crashes or is killed.kill_on_dropnever runs in that case, and the orphaned process kept file locks.Testing
cargo fmt --checkcargo test: 23 passed on Windows, plus a Unix-only symlink-cycle test that CI's macOS job runs. New tests cover the directory walker, rule parsing andContent-Dispositionvariants.End-to-end on Windows (
tauri devwith a separate identifier and data dir):mklink /Jback to an ancestor, in both the workflows and the models tree):scan_workflow_dirreturnswf.jsonin 4 ms.check_models_localfinds the nested model and reports the missing one, in 3 ms.open_directorywith a file path is rejected with "Not a directory".suggest_typebogusis skipped (warning logged) and the valid rule still applies (lora).{brokenJSON is rejected with an explicit error./api/download/models/9208) still returns the filename, type, size and hash.aria2c(started with--stop-with-process=<pid>) exited on its own within ~2 s.