Skip to content

Add model loading failure notifications with i18n support#997

Merged
cjpais merged 6 commits intomainfrom
claude/check-transcription-bug-Gm5bn
Mar 11, 2026
Merged

Add model loading failure notifications with i18n support#997
cjpais merged 6 commits intomainfrom
claude/check-transcription-bug-Gm5bn

Conversation

@cjpais
Copy link
Copy Markdown
Owner

@cjpais cjpais commented Mar 11, 2026

Before Submitting This PR

Please confirm you have done the following:

Human Written Description

fixes #713

This PR adds error handling and user feedback for model loading failures. When a model fails to load, the application now listens for the model-state-changed event with loading_failed type and displays a toast notification to the user with the error details. The error messages are fully internationalized across all 18 supported languages, with a fallback generic message when specific error details aren't available.

Related Issues/Discussions

Fixes #

Testing

The change adds a new event listener in the App component that responds to model loading failures. Testing should verify:

  • Toast notifications appear when model loading fails
  • Error messages display correctly in different languages
  • Fallback generic message appears when no specific error is provided
  • Event listener properly cleans up on component unmount

AI Assistance

  • No AI was used in this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: AI code generation
  • How extensively: Generated the event listener hook structure and i18n string additions across all language files

https://claude.ai/code/session_015VfQgoDkUDV6wk63RHrwEs

@cjpais cjpais merged commit 82297fa into main Mar 11, 2026
4 checks passed
DylanBricar added a commit to DylanBricar/Phonara that referenced this pull request Mar 11, 2026
Implemented PRs:
- cjpais#991: Windows mic permission onboarding (registry + UI)
- cjpais#381: Local file transcription (WAV, file picker, 16kHz resampling)
- cjpais#704: LLM template variables ($time_local, $date, $language)
- cjpais#455: Text replacements (exact find/replace, case-sensitive, 7 tests)
- cjpais#874: Custom recordings directory (folder picker + validation)
- cjpais#768: Custom audio feedback sounds (wav/mp3/ogg/flac)
- cjpais#997: Model loading failure toast notifications (17 locales)
- cjpais#996: Russian translation improvements (48 corrections)

Fixed issues:
- cjpais#199: Whisper initial prompt option (settings + pass-through)
- cjpais#858: Partial downloads (stale cleanup + Content-Range validation)
- cjpais#921: Clipboard images preserved during paste-via-clipboard
- cjpais#502: Clipboard race condition (write-verify-retry + delays)
- cjpais#434: Admin window freeze (Windows SendInput replaces enigo)

Review fixes:
- App.tsx: missing `t` from useTranslation() (runtime crash)
- commands/transcription.rs: State<TranscriptionManager> -> State<Arc<TranscriptionManager>>
- settings.rs: missing #[serde(default)] on external_script_path
- bindings.ts: missing whisper_initial_prompt in AppSettings
- settingsStore.ts: missing settingUpdaters for text_replacements, whisper_initial_prompt
- shortcut/mod.rs: added update_text_replacements, change_whisper_initial_prompt_setting commands
- TextReplacements.tsx: hardcoded "(delete)" -> i18n key
- TranscribeFile.tsx: hardcoded "Audio Files" -> i18n key
- input.rs: fixed warn macro scope, removed duplicate import
- Eliminated all compiler warnings (overlay.rs, signal_handle.rs, shortcut/mod.rs)
- Fixed lazy_close_gen race condition in audio manager

Co-Authored-By: Claude Opus 4.6 <[email protected]>
fxbenard pushed a commit to fxbenard/Parler that referenced this pull request Mar 11, 2026
* fix: show toast notification when model fails to load with ORT error

The model loading failure (e.g. ORT error) was only shown as a small
red dot with truncated text in the footer. Now it also triggers a
toast notification, matching how recording errors are already handled.

https://claude.ai/code/session_015VfQgoDkUDV6wk63RHrwEs

* fix: add missing i18n keys for model load error toast to all locales

https://claude.ai/code/session_015VfQgoDkUDV6wk63RHrwEs

* fix: simplify model load error toast and add proper translations

Remove the unnecessary modelLoadFailed passthrough key that just
forwarded a variable. Use the error string directly with a translated
fallback. Add proper translations for all 16 locales.

https://claude.ai/code/session_015VfQgoDkUDV6wk63RHrwEs

* fix: translate recordingFailed string in all locales

This was previously left untranslated (English) in all non-English
locale files.

https://claude.ai/code/session_015VfQgoDkUDV6wk63RHrwEs

* cleanup

* format

---------

Co-authored-by: Claude <[email protected]>
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] ORT Failure on MacOS not propagated to UI

2 participants