Fix local model download progress after Notes navigation#1052
Conversation
…el-download-state # Conflicts: # src/types/electron.ts
|
I added two follow-up commits after reviewing and testing the original implementation locally. 1. Preserve local LLM download state across picker remountsThe first commit hardened the original GGUF/local LLM path: 2. Extend persistence to Whisper and Parakeet transcription modelsLocal testing showed that the Notes settings flow I was reproducing used a Parakeet transcription model, while the original fix only covered modelType === "llm". I therefore generalized the solution to the actual Whisper/Parakeet paths: These changes were made because the original approach was correct for local LLMs, but did not cover the transcription model flow that exposed the reported Notes/settings behavior. All focused tests, typecheck, lint, Prettier, and diff checks pass. |
Summary
Why
Fixes #1007.
When a user starts a local model download from the Notes get-started flow, navigates away, and returns, the renderer loses its in-memory progress state even though the main process is still downloading. This makes the download look unavailable or stuck and turns retry clicks into a duplicate in-progress failure instead of showing the existing download.
Tests
npm run lint-> passed. It still emits the existing Node module-type warning forsrc/eslint.config.js.npm run typecheck-> passed.node --test test/helpers/modelManagerBridgeDownloadStatus.test.js-> passed, 1 test.node --check src/helpers/modelManagerBridge.js-> passed.node --check src/helpers/ipcHandlers.js-> passed.node --check test/helpers/modelManagerBridgeDownloadStatus.test.js-> passed.prettier --check src/helpers/ModelManager.ts src/helpers/ipcHandlers.js src/helpers/modelManagerBridge.js src/hooks/useLocalModels.ts src/hooks/useModelDownload.ts src/types/electron.ts test/helpers/modelManagerBridgeDownloadStatus.test.js-> passed.git diff --check-> passed.npm run format:check-> failed on pre-existing unrelated formatting issues insrc/helpers/audioManager.js,src/helpers/speakerEmbeddings.js, andsrc/helpers/textEditMonitor.js.Scope
Caveats