Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agentmuxsrv-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agentmuxsrv-rs"
version = "0.32.83"
version = "0.32.84"
edition = "2021"
description = "AgentMux Rust backend (drop-in replacement for Go agentmuxsrv)"

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"productName": "AgentMux",
"description": "Open-Source AI-Native Terminal Built for Seamless Workflows",
"license": "Apache-2.0",
"version": "0.32.83",
"version": "0.32.84",
"homepage": "https://github.com/agentmuxai/agentmux",
"build": {
"appId": "ai.agentmux.app"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agentmux"
version = "0.32.83"
version = "0.32.84"
description = "AgentMux - AI-Native Terminal"
authors = ["AgentMux Corp"]
edition = "2021"
Expand Down
25 changes: 21 additions & 4 deletions src-tauri/src/commands/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,27 @@ pub fn set_window_transparency(
}

#[cfg(target_os = "linux")]
if blur {
// Linux blur is compositor-dependent; CSS backdrop-filter is the primary fallback.
// No reliable cross-compositor API exists.
tracing::info!("Linux blur requested — using CSS fallback (no native API)");
{
if blur {
// Linux blur is compositor-dependent; CSS backdrop-filter is the primary fallback.
// No reliable cross-compositor API exists.
tracing::info!("Linux blur requested — using CSS fallback (no native API)");
}

// Apply window-level opacity via GTK so the compositor composites the window
// at the requested transparency level. Without this the opacity value is ignored
// and the window renders fully opaque regardless of the CSS setting.
use gtk::prelude::*;
window.with_webview(move |webview| {
let gtk_win = webview.inner()
.parent()
.and_then(|p| p.parent())
.and_then(|w| w.dynamic_cast::<gtk::Window>().ok());
if let Some(win) = gtk_win {
win.set_opacity(opacity);
tracing::info!("Linux: set GTK window opacity={}", opacity);
}
}).ok();
}

Ok(())
Expand Down
46 changes: 42 additions & 4 deletions src-tauri/src/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub async fn spawn_backend(app: &tauri::AppHandle) -> Result<BackendSpawnResult,

// 2. Cleanup stale processes/files ------------------------------------
#[cfg(unix)]
cleanup_stale_backends(current_version);
cleanup_stale_backends(current_version, &data_dir);
cleanup_stale_endpoints(&config_dir);

// 3. Ensure directory tree --------------------------------------------
Expand Down Expand Up @@ -261,10 +261,15 @@ pub async fn spawn_backend(app: &tauri::AppHandle) -> Result<BackendSpawnResult,
///
/// When the frontend crashes or is force-killed, the backend process may survive.
/// On the next launch we find all running agentmuxsrv-rs processes, inspect their
/// `--instance` argument, and kill any whose version differs from `current_version`.
/// `--instance` and `--wavedata` arguments, and kill any whose version differs from
/// `current_version` AND whose wavedata path is under our `data_dir`.
///
/// Scoping by `data_dir` prevents dev instances from killing production instances
/// (and vice versa) — each app identifier has its own isolated data directory.
#[cfg(unix)]
fn cleanup_stale_backends(current_version: &str) {
fn cleanup_stale_backends(current_version: &str, data_dir: &std::path::Path) {
let current_instance = format!("v{}", current_version);
let data_dir_str = data_dir.to_string_lossy().to_string();
let my_pid = std::process::id();

tracing::info!(
Expand Down Expand Up @@ -368,7 +373,40 @@ fn cleanup_stale_backends(current_version: &str) {
}
};

// Step 4: Compare versions — skip if it matches the current version
// Step 4a: Check --wavedata — only kill backends sharing our data dir.
// Dev instances use ai.agentmux.app.dev/..., production uses ai.agentmux.app.vX-Y-Z/...
// We must not kill backends belonging to a different app identifier.
let wavedata_path = cmdline
.split_whitespace()
.collect::<Vec<&str>>()
.windows(2)
.find_map(|pair| {
if pair[0] == "--wavedata" {
Some(pair[1].to_string())
} else {
None
}
});

match &wavedata_path {
Some(wavedata) if !wavedata.starts_with(&data_dir_str) => {
tracing::info!(
"cleanup_stale_backends: PID {} has different data dir (wavedata={}), skipping",
pid, wavedata
);
continue;
}
None => {
tracing::info!(
"cleanup_stale_backends: PID {} has no --wavedata arg, skipping",
pid
);
continue;
}
_ => {}
}

// Step 4b: Compare versions — skip if it matches the current version
if instance_version == current_instance {
tracing::info!(
"cleanup_stale_backends: PID {} is current version ({}), keeping",
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
"productName": "AgentMux",
"version": "0.32.83",
"identifier": "ai.agentmux.app.v0-32-83",
"version": "0.32.84",
"identifier": "ai.agentmux.app.v0-32-84",
"build": {
"devUrl": "http://localhost:5173",
"frontendDist": "../dist/frontend",
Expand Down
2 changes: 1 addition & 1 deletion wsh-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wsh-rs"
version = "0.32.83"
version = "0.32.84"
edition = "2021"
description = "Shell integration CLI for AgentMux"

Expand Down