Skip to content

fix: preserve model download progress across settings navigation#664

Open
xAlcahest wants to merge 1 commit intoOpenWhispr:mainfrom
xAlcahest:fix/download-progress-persists-across-navigation
Open

fix: preserve model download progress across settings navigation#664
xAlcahest wants to merge 1 commit intoOpenWhispr:mainfrom
xAlcahest:fix/download-progress-persists-across-navigation

Conversation

@xAlcahest
Copy link
Copy Markdown
Collaborator

Summary

The download progress bar disappeared when switching between Speech-to-Text and Language Models tabs, or when navigating away from the AI Models section entirely. The download kept running in the main process but the UI lost track of it because all progress state was local to the component and the IPC listeners were torn down on unmount.

Two fixes, layered: tab containers now hide inactive content with display: none instead of unmounting it, and the IPC listeners for download progress are registered once at module level with a persistent cache that the hook reads from on mount.

Fixes #648

Changes

  • src/components/SettingsPage.tsx -- SpeechToTextTabs and LlmsTabs toggle visibility instead of conditional rendering, so tab content stays mounted
  • src/hooks/useModelDownload.ts -- moved IPC listener registration from per-component useEffect to a module-level singleton that writes to a persistent cache keyed by model type; the hook restores state from the cache on mount and registers a callback for live updates while mounted; downloadModel and cancelDownload also write to the cache so it stays in sync

@xAlcahest xAlcahest requested a review from gabrielste1n April 28, 2026 07:33
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, /// in settings: model download progress bar will disappear if click away then click back.

1 participant