From 344e10d9673d4c10ba2afdddd3c51a028037007d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 7 Oct 2026 17:22:14 +0200 Subject: [PATCH] Give dev builds their own identifier Since we started opening rad: links in the app, a dev build and an installed release can't run side by side: they share the identifier, so whichever starts second hands over to the first and quits. A separate identifier also keeps dev from sharing window state and logs with the release. --- crates/radicle-tauri/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/radicle-tauri/src/lib.rs b/crates/radicle-tauri/src/lib.rs index f6040aeab..c28257250 100644 --- a/crates/radicle-tauri/src/lib.rs +++ b/crates/radicle-tauri/src/lib.rs @@ -24,6 +24,13 @@ pub fn run() { // survives the pipes that `npm run tauri dev` puts between the app and the // terminal, which `std::io::IsTerminal` on our own stdout would not. let terminal = std::env::var_os("TERM").is_some(); + // A dev build gets its own identifier, so it can run next to an installed + // release without the single-instance plugin handing over to it. + let mut context = tauri::generate_context!(); + if tauri::is_dev() { + let config = context.config_mut(); + config.identifier = format!("{}.dev", config.identifier); + } // A `rad:` link opened while the app runs starts a second instance, which // hands the link to this one and exits; the deep-link plugin delivers it. let builder = tauri::Builder::default() @@ -128,7 +135,7 @@ pub fn run() { thread::create_issue_comment, thread::create_patch_comment, ]) - .run(tauri::generate_context!()) + .run(context) .expect("error while running tauri application"); }