Skip to content

fix(linux): exit app after window close cleanup - #1040

Open
Fulminao wants to merge 1 commit into
jamiepine:mainfrom
Fulminao:fix/linux-window-close
Open

fix(linux): exit app after window close cleanup#1040
Fulminao wants to merge 1 commit into
jamiepine:mainfrom
Fulminao:fix/linux-window-close

Conversation

@Fulminao

@Fulminao Fulminao commented Aug 12, 2026

Copy link
Copy Markdown

On Linux, closing the main window with 'Keep server running' disabled could leave the Tauri process alive even after the backend had stopped. The remaining process kept the Rust speak_monitor task running, which retried /events/speak indefinitely every 30 seconds.

This changes the close flow to exit the Tauri application after frontend cleanup completes, instead of only closing the window. The same behavior is used for the 5-second cleanup timeout fallback.

Tested on LMDE 6 / Debian 12 with Voicebox 0.5.0:

  • backend terminates correctly
  • port 17493 is released
  • no voicebox process remains after closing the window
  • RunEvent::Exit is reached normally
  • CUDA backend operation is unaffected

Summary by CodeRabbit

  • Bug Fixes
    • Improved application shutdown behavior when closing the window.
    • The app now exits reliably after cleanup completes or after a five-second timeout.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ebbc6d42-c0b3-485d-b01e-58d30e56efa9

📥 Commits

Reviewing files that changed from the base of the PR and between 51f49de and 47afd41.

📒 Files selected for processing (1)
  • tauri/src-tauri/src/main.rs

📝 Walkthrough

Walkthrough

The Tauri close handler now exits the application after frontend cleanup completes or after a five-second timeout. It no longer attempts to close the window.

Changes

Close cleanup flow

Layer / File(s) Summary
Exit application after cleanup
tauri/src-tauri/src/main.rs
The close handler replaces window.close() with app_handle().exit(0) after frontend cleanup or timeout. The timeout message is updated.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

  • jamiepine/voicebox#402: Modifies the same Tauri window-close cleanup flow with sentinel-file and watchdog logic.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the Linux fix that exits the application after window-close cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

1 participant