Improve FunASR download failure guidance - #392
Conversation
|
Current-head validation update for
I did not rerun |
|
@LauraGPT Pulled this locally for review. test:engines (658 passed) and check:i18n both pass here, and the hint copy matches the actual UI: the popover's copy button does resolve to the model page URL, the button label matches importFromFolder, and the file list matches requiredFiles in funasrModelCatalog.ts. One behavior issue to fix before merge: Cancelling a download now triggers the failure toast with the manual-import guidance. Clicking cancel aborts the downloader, the pending downloadFunasrModel call rejects with Download cancelled, and the IPC handler wraps that into { success: false, error: 'Error: Download cancelled' } — so a deliberate cancel now shows an 8s "download failed" toast telling the user to import manually. The old code had the same wart (it showed the raw error), but this PR makes it noticeably more misleading. Either special-case it in handleDownload the way anotherDownloadInProgress is handled, or better, return { success: false, canceled: true } from the main handler (same semantics as importModel) and early-return on it in the renderer. Non-blocking: The \n between the raw error and the hint won't render as a line break — sonner descriptions don't preserve newlines. Add whitespace-pre-line to the description classNames in ui/sonner.tsx, or just join with a space. REQUIRED_FILES duplicates requiredFiles from main/helpers/funasrModelCatalog.ts. Fine since these specs are frozen, but add a comment pointing at the source of truth so they don't drift silently. FunasrModelId is now defined in three places; FunasrModelSection.tsx could import the type from the new lib instead of keeping its own copy. Qwen/FireRed panels have the same pre-existing cancel-toast issue — out of scope here, fine to clean up separately. |
|
Thanks for the precise repro. Fixed the cancel path in the latest head What changed:
Validation: This should address the remaining behavior issue you flagged: clicking cancel no longer produces the manual-import failure guidance toast. |
|
@LauraGPT Pulled 2165d79 locally and re-ran against latest main: One thing still blocks merge: Either fix works for me:
Minor: The non-blocking items from last round (the |
|
Fixed the remaining cancellation-classification blocker in head
Red/green evidence: |
Summary
model.int8.onnx,tokens.txt) so users can self-check SenseVoice/Paraformer folders before importingRoot cause
When HF/hf-mirror downloads are blocked, timed out, or return a low-level error, the UI already has the right manual import workflow but the failure toast does not connect the error to that workflow. Users can interpret the model path as deleted even when the model repository still exists.
Validation
corepack yarn test:engines->engine unit tests: 658 passed, 0 failedcorepack yarn check:i18n-> zh/en key parity OKgit diff --checkNote: this checkout has both
package-lock.jsonandyarn.lock;npm ciis blocked because the npm lock is out of sync withpackage.json, so I used the existing Yarn lockfile for validation.