Skip to content

Prevent duplicate hotkey instances after closing Voicebox - #1037

Draft
FelixKruger wants to merge 1 commit into
jamiepine:mainfrom
FelixKruger:codex/fix-single-instance-lifecycle
Draft

Prevent duplicate hotkey instances after closing Voicebox#1037
FelixKruger wants to merge 1 commit into
jamiepine:mainfrom
FelixKruger:codex/fix-single-instance-lifecycle

Conversation

@FelixKruger

Copy link
Copy Markdown

Summary

  • register Tauri's official single-instance plugin before every other plugin
  • focus the existing main window when Voicebox is launched again
  • disarm the global hotkey monitor as soon as main-window shutdown starts
  • exit the full Tauri app after frontend cleanup instead of closing only the main webview

Root cause

Voicebox creates the hidden Voicebox Dictate webview up front. The existing close handler only called window.close() on the main webview, so the hidden dictate window and HotkeyMonitor could keep the process alive after the user closed the app. A later manual launch then created another GUI process and another global F8/F9 listener, producing duplicate recording pills and duplicated actions.

The single-instance plugin is pinned to 2.3.7 because the current Voicebox lockfile uses Tauri 2.9.5; plugin 2.4.x requires Tauri 2.10 and would introduce an unrelated framework upgrade.

Related to #697.

Validation

  • cargo check --locked
  • cargo test --locked (including test_system_audio_capture)
  • installed and exercised on Windows 11:
    • launching Voicebox twice left one GUI process and one backend
    • pressing F9 produced exactly one Voicebox Dictate window
    • closing the main window removed the GUI process, backend, hidden dictate window, and hotkey owner

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b0a1c3ff-0f8f-4e48-80a8-25b32772aa2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

2 participants