uttrflow / uttrflow/uttrflow-swift
The speech model download says "Check your connection" for every failure, including a full disk, and never checks free space first
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
`FileSystemSpeechModelStore.install` maps every failure to `SpeechEngineError.modelDownloadFailed(description:)`: the network fetch, a failure to create the staging directory, the weights not arriving, and the final move into place (`Sources/UttrflowSpeech/SpeechModelStore.swift:161-181`, `:203-219`). The user-facing message for all of them is the same:
> "Setup couldn't be completed. Check your connection and try again." (`Sources/UttrflowCore/Errors/SpeechEngineError.swift:21-22`)
Onboarding shows only `failure.userMessage` (`Sources/UttrflowUX/OnboardingFlow.swift:295-297`); the description is dropped. Nothing checks free space before starting a download of about 650 MB (`grep -rn "volumeAvailableCapacity\|NSFileWriteOutOfSpace" Sources/` returns nothing), and staging is kept on failure, so a full disk stays full.
## Why it matters
An 8 GB M1 Air often has the smallest SSD. A user with 400 MB free is told to check a working connection, retries, fails again the same way, and never learns the fix. Dictation cannot be used until the model is installed.
## How to reproduce
On a small disk image or a volume with less than 700 MB free, point the model store at it (see #506 for the dev tool option) or fill the disk, then run onboarding's model step or `uttrflow-dev models install`. Compare the error with a real network failure (turn Wi-Fi off).
## Acceptance criteria
- Before downloading, the store checks available capacity (`URLResourceKey.volumeAvailableCapacityForImportantUsageKey`) against the model size plus a margin and fails with a message that says how much space is needed.
- An out-of-space error during download or move produces that same message, not the connection one.
- A network failure keeps the current wording.
- Tests in `Tests/UttrflowSpeechTests` cover both paths with the store's injected file manager or download closure.
Contributor guide
Research direction
Start in Sources/UttrflowSpeech/SpeechModelStore.swift at install and review how failures reach SpeechEngineError.modelDownloadFailed; check the user-facing path in Sources/UttrflowCore/Errors/SpeechEngineError.swift and Sources/UttrflowUX/OnboardingFlow.swift. Run the Tests/UttrflowSpeechTests suite, using the injected file manager or download closure to cover capacity and network failures. Done means space-related failures explain the required capacity while network failures retain their current wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100