* Handle microphone start failures without aborting
Return recorder init errors instead of panicking/aborting in the worker thread and reset UI state when recording start fails.
Refs #436
* prop errors to ui
* format
* Add missing recording error translation keys
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* Remove filler words that conflict with European languages
Removed three filler words from the transcription filter that are actual
words in European languages:
- 'um' - Portuguese/Spanish indefinite article meaning 'a/an' (masculine)
Example: Portuguese 'Isto é um teste' (This is a test)
Removing this was breaking Portuguese transcriptions
- 'ha' - Spanish/Italian/Norwegian/Swedish auxiliary verb meaning 'has/have'
Example: Spanish 'Él ha comido' (He has eaten)
This is a very common verb form in Romance and Scandinavian languages
- 'eh' - Italian interjection and Canadian English discourse marker
While less critical, this can appear in legitimate Italian speech
The remaining filler words are primarily English
vocalized hesitations that don't conflict with common words in other
European languages.
Updated tests to use 'uhm' instead of 'um' where needed.
Fixes#941
* customize list
---------
Co-authored-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
* ci: add temporary test workflow for portable ZIP validation
* ci: fix mock setup in test workflow
* ci: remove temporary test workflow
* feat: add portable mode option to NSIS installer
Custom NSIS template based on tauri-v2.9.1 upstream with 6 targeted
modifications for portable mode support:
- New PortableMode variable and /PORTABLE CLI flag for silent installs
- Install type selection page with Normal/Portable radio buttons
- Conditional default directory (Desktop for portable, LocalAppData for normal)
- Skip registry writes, file associations, deep links, and uninstaller for portable
- Skip Start Menu and desktop shortcuts for portable installs
- Create portable marker file and Data/ directory on portable install
The existing portable.rs runtime detection is unchanged — it looks for the
same marker file this installer creates.
Usage:
GUI: select "Portable Installation" on the install type page
Silent: Handy_setup.exe /S /PORTABLE /D=C:\path\to\Handy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: implement true portable mode via source code path override
Detect a `portable` marker file next to the executable at startup.
When present, redirect all data paths (settings, models, recordings,
database, logs) to a local `Data/` directory instead of %APPDATA%.
This approach works because it intercepts path resolution at the Rust
level, bypassing Tauri/Windows Shell API limitations that made the
previous environment-variable and junction approaches unreliable.
Changes:
- Add src-tauri/src/portable.rs with OnceLock-based detection
- Replace all app.path().app_data_dir() calls with portable helper
- Configure tauri-plugin-log to use Folder target when portable
- Configure tauri-plugin-store with absolute path when portable
- Simplify build.yml portable ZIP (exe + resources + marker file)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add missing Manager trait import in portable.rs
The .path() method on AppHandle requires `tauri::Manager` in scope.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: redirect WebView2 cache to portable Data dir
Move main window creation from tauri.conf.json to setup closure so
we can set data_directory when in portable mode. This prevents
WebView2 from creating %LOCALAPPDATA%\com.pais.handy.
Also set data_directory on the recording overlay window.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: auto-detect portable mode during updates
When the Tauri updater runs the installer with /UPDATE, the install type
page is skipped and /PORTABLE is not passed. Detect the existing portable
marker file in .onInit so updates preserve portable mode automatically.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: fix prettier formatting in portable.rs and lib.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: add GigaAM v3 model for Russian speech recognition
Add GigaAM v3 e2e_ctc as a new transcription engine using
transcribe-rs 0.2.7 gigaam feature. Russian speech recognition
with punctuation, Latin characters and digit support.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: cargo fmt formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Keep the file name of the model download the same as the file on the
blob website.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* fix: upgrade tauri-plugin-updater to v2.10.0 to fix duplicate registry entries (#873)
Upgrade tauri and tauri-plugin-updater to get bundle-specific target
resolution, which prevents NSIS-installed users from receiving MSI
updates via OTA and creating duplicate registry entries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* move to my branch
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
The tray locale lookup truncated "zh-TW" to "zh", always hitting
Simplified Chinese. Now tries full locale first, then language prefix,
then English.
Follow-up fix for #796.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: add CLI parameters for Linux (--start-hidden, --no-tray, --toggle-transcription, --debug)
Add command-line interface using clap for better Linux desktop integration:
- --start-hidden: launch without showing the main window
- --no-tray: launch without system tray icon (closing window quits app)
- --toggle-transcription: toggle recording on/off on a running instance
via tauri_plugin_single_instance
- --debug: enable debug mode with Trace-level logging (runtime-only)
Extract toggle_transcription() from signal_handle.rs into a reusable
function shared between SIGUSR2 handler and CLI single-instance callback.
Update CLAUDE.md and README.md with CLI documentation including setup
instructions for GNOME, KDE Plasma, Sway/i3, and Hyprland.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* add cancel and post processs
* cleanup
* format
* docs
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: implement structured outputs for Cerebras, OpenRouter, OpenAI, and Apple Intelligence
- Add structured output support with JSON schema in llm_client.rs
- Update actions.rs to use system prompt + user content approach
- Remove legacy ${output} variable substitution for supported providers
- Update Apple Intelligence Swift code to accept system prompts
- All providers now use consistent structured output format
- Remove duplicate check_apple_intelligence_availability function
* wip changes
* fix(structured-outputs): address PR #706 review comments
- Add settings migration to sync supports_structured_output field for existing providers
- Fix fallback behavior: structured output failures now fall through to legacy mode
- Clone api_key to prevent ownership issues in fallback path
- Clean up build_system_prompt(): remove placeholder entirely
(instead of replacing with 'the user's message' which reads awkwardly)
- Add warn import from log crate
* refactor(structured-outputs): apply best practice improvements
- Optimize settings migration: use single match instead of double iteration
- Add TRANSCRIPTION_FIELD constant to replace magic strings
- Keep Apple Intelligence behavior unchanged (no API fallback for privacy)
Addresses code review feedback on PR #706:
1. More efficient provider lookup in ensure_post_process_defaults()
2. Eliminates hardcoded 'transcription' string in JSON parsing
3. Maintains privacy-first approach for Apple Intelligence
* fix groq output
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat(linux): add SIGUSR1 signal for transcribe_with_post_process
Register SIGUSR1 alongside SIGUSR2 in the signal handler so Linux
users can trigger transcription with post-processing via system
signals (e.g. `pkill -SIGUSR1 -x handy`). This mirrors the existing
SIGUSR2 toggle pattern and maps to the `transcribe_with_post_process`
action already present in ACTION_MAP.
Closes#758
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* readme
* format
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* fix: add TranscriptionState to prevent race conditions & add debounce
* refactor(transcription): replace state machine with actor coordinator
* some cleanup
* format
* minor cleanup
* format
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat(i18n): add Traditional Chinese (zh-TW) locale
* style(i18n): clarify zh as Simplified Chinese and format languages.ts
* tweak
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
The previous implementation only applied the workaround on X11 sessions,
leaving Wayland users affected by WebkitGTK DMABUF crashes. This affects
various GPU configurations (at least Intel and NVIDIA) on both X11 and Wayland.
This change applies the workaround unconditionally on Linux, ensuring
the app doesn't crash on affected systems while having minimal performance
impact.
Related: https://github.com/tauri-apps/tauri/issues/9394
Co-authored-by: suuuehgi <>
* feat(linux): Add option to select typing tool
- Added a Linux-only typing tool setting shown for direct paste, with a new dropdown in advanced settings.
- Wired new typing tool setting through settings store, bindings, and Tauri commands.
- Added typing tool enum/defaults and selection handling in Linux clipboard direct typing.
- Added translations for the new typing tool setting across locales.
* fix compilation on macos
* format
* only list available tools
* format
---------
Co-authored-by: Thinh Vu <phuocthinhvu@gmail.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: add configurable auto-submit after transcription paste
Add an Advanced output setting that can send Enter, Ctrl+Enter, or Cmd+Enter after text insertion so Handy works smoothly with different editor and agent submit shortcuts. This keeps the behavior opt-in, persists it in settings, and adds focused Rust tests for defaults and paste auto-submit decision logic.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: simplify auto submit configuration UX
Replace the auto-submit toggle and key dropdown with a single dropdown that includes an Off state, so output behavior is clearer and faster to configure. Clarify Meta-key behavior by showing Cmd+Enter on macOS and Super+Enter on Windows/Linux, with matching localized copy.
Co-authored-by: Cursor <cursoragent@cursor.com>
* use bindings generated on macos
* and translations.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat: add show tray icon setting
Allow hiding system tray icon via Settings > Advanced.
When hidden, closing window quits app instead of hiding.
* i8n
---------
Co-authored-by: CJ Pais <cj@cjpais.com>
* feat(models): auto-discover custom Whisper models in models directory
Enable automatic discovery of custom GGML-format Whisper models (.bin files)
placed in the models directory, so users don't need to modify source code
to use their own fine-tuned models.
Backend changes:
- Add discover_custom_whisper_models() to scan for .bin files
- Generate display names from filenames (e.g., "my-model" → "My Model")
- Skip predefined model filenames to avoid duplicates
- Add 3 unit tests for discovery logic
Frontend changes:
- Split model dropdown into 3 sections: Custom, Downloaded, Downloadable
- Add collapsible section for downloadable models to reduce clutter
- Add max-height with scroll for long model lists
- Add "Custom" badge for user-provided models
* feat(models): make custom Whisper model discovery opt-in
[why] Address maintainer concern about support burden from community
models. Custom models should be a power-user feature, not enabled by
default.
[how] Add custom_models_enabled setting (default: false) in Debug
settings. Discovery only runs when enabled. Models show "Not officially
supported" messaging. Documentation updated with enable steps.
* feat(models): add is_custom field and integrate custom models with new UI
[why]
PR review requested an explicit is_custom field instead of inferring
custom status from url === null. Custom models also need proper
integration with the new models settings page from PR #478.
[how]
- Add is_custom: bool to ModelInfo struct, set true on discovered models
- Change discover_custom_whisper_models signature from &PathBuf to &Path
- Use 0.0 sentinel scores so UI hides score bars for custom models
- Add "Custom Models" section to ModelsSettings with 3-way model split
- Show "Custom" badge in ModelCard and ModelDropdown
- Hide language/translation tags when supported_languages is empty
- Remove custom models from available_models on delete instead of
just marking as not downloaded (they have no re-download URL)
- Update tests with new fields and assertions
* chore(i18n): add custom model translation keys to all locales
[why]
Custom model feature introduces 5 new translation keys that need
to be present in all 15 non-English locales for CI to pass.
[how]
Add English placeholder values for: customModelDescription,
modelSelector.custom, settings.models.customModels,
settings.debug.customModels.label, settings.debug.customModels.description
* fix(models): keep language filter visible when no models match
[why]
The language filter was inside a conditionally rendered section
that disappeared when no downloaded models matched the selected
language, leaving the user stuck with no way to change the filter.
[how]
Always render the "Your Models" header row with the language filter,
only conditionally render the model cards below it.
* docs: fix custom models section reference in README
Model selector → Models settings page.
* fix(models): apply custom models toggle immediately without restart
[why]
Two bugs reported in PR review: (1) app breaks on restart when a
custom model was selected and the toggle is disabled — selected_model
still points to the missing model, causing "Model not found" error.
(2) Custom models remain visible in the UI after toggle-off because
the in-memory model list is never updated and no event is emitted.
[how]
- Add remove_custom_models() and add_custom_models() to ModelManager
for runtime mutation of the available_models mutex
- On disable: reset selected_model to empty if it's a custom model,
then remove custom models from the in-memory list
- On enable: run discover_custom_whisper_models against the mutex
- Emit model-state-changed event so the frontend refreshes immediately
* chore(i18n): remove "restart required" from custom model descriptions
Toggle now takes effect immediately, so the restart sentence
is inaccurate. Updated all 16 locales and README instructions.
* fix(models): clear stale model selection on startup
[why]
If a custom model file is deleted from disk while it's the selected
model, the app gets stuck on "Loading..." forever on next launch
because the model ID is not in available_models but
auto_select_model_if_needed only checked for empty string.
[how]
Validate that selected_model exists in available_models before
accepting it. If not found, clear the selection so auto-select
picks a valid downloaded model.
* remove toggle and clean up
* format
---------
Co-authored-by: CJ Pais <cj@cjpais.com>