Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(shell): enforce a single app instance and open URLs through the opener plugin (#258)

2 months ago

18ea7ac
Authored
Davy7/26/2026, 10:04:37 AM
Replace two hand-rolled or third-party mechanisms with official first-party
Tauri plugins.

Single-instance guard (tauri-plugin-single-instance): registered as the FIRST
plugin on the Builder so a second launch short-circuits before any state
initializes. The library is a single SQLite writer and the remote-library
outbox/recovery logic assumes one writer, so a second concurrent instance is a
real corruption risk. The callback focuses the existing window: it gets the
"main" webview window and calls show() and set_focus() (errors ignored).

Opener plugin (tauri-plugin-opener): replace the third-party `open` crate with
the official plugin. `open_external_url` now routes through
`tauri_plugin_opener::open_url`, and the `open` crate is dropped as a direct
dependency (it survives transitively under the opener plugin). URL opening is
Rust-side only, so no capability, permission, or JS package is needed. The
command signature and error mapping are unchanged, so the frontend contract is
preserved.

The Flatpak offline Cargo vendor manifest is regenerated to match the new
Cargo.lock entries.

Parent3a60fde

5 files changed
  • packaging/flatpak/generated/cargo-sources.json+429−0
  • src-tauri/Cargo.lock+424−1
  • src-tauri/Cargo.toml+3−2
  • src-tauri/src/lib.rs+12−0
  • src-tauri/src/remote/auth.rs+1−1