diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 91288d4f6..56e43d43c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -5,6 +5,7 @@ description = "GUI app and Toolkit for Claude Code" authors = ["mufeedvh", "123vviekr"] license = "AGPL-3.0" edition = "2021" +default-run = "opcode" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index fc93adbcf..d2aaf38bb 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -52,6 +52,22 @@ use tauri::Manager; use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial}; fn main() { + // Apply Linux/Wayland workarounds for WebKitGTK GBM buffer issues (especially on NVIDIA) + // This must be done before any GTK/WebKit initialization + #[cfg(target_os = "linux")] + { + use std::env; + // Only apply fix for Wayland sessions where GBM buffer issues occur + let is_wayland = env::var("WAYLAND_DISPLAY").is_ok() + || env::var("XDG_SESSION_TYPE") + .map(|v| v == "wayland") + .unwrap_or(false); + + if is_wayland && env::var("WEBKIT_DISABLE_DMABUF_RENDERER").is_err() { + env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1"); + } + } + // Initialize logger env_logger::init(); diff --git a/src-tauri/src/process/registry.rs b/src-tauri/src/process/registry.rs index f4f33b5a2..a0b1850ca 100644 --- a/src-tauri/src/process/registry.rs +++ b/src-tauri/src/process/registry.rs @@ -82,6 +82,7 @@ impl ProcessRegistry { } /// Register a new running agent process using sidecar (similar to register_process but for sidecar children) + #[allow(dead_code)] pub fn register_sidecar_process( &self, run_id: i64, diff --git a/src-tauri/src/web_server.rs b/src-tauri/src/web_server.rs index 01a28436f..4b870cc98 100644 --- a/src-tauri/src/web_server.rs +++ b/src-tauri/src/web_server.rs @@ -233,17 +233,17 @@ async fn resume_claude_code() -> Json> { } /// Cancel Claude execution -async fn cancel_claude_execution(Path(sessionId): Path) -> Json> { +async fn cancel_claude_execution(Path(session_id): Path) -> Json> { // In web mode, we don't have a way to cancel the subprocess cleanly // The WebSocket closing should handle cleanup - println!("[TRACE] Cancel request for session: {}", sessionId); + println!("[TRACE] Cancel request for session: {}", session_id); Json(ApiResponse::success(())) } /// Get Claude session output -async fn get_claude_session_output(Path(sessionId): Path) -> Json> { +async fn get_claude_session_output(Path(session_id): Path) -> Json> { // In web mode, output is streamed via WebSocket, not stored - println!("[TRACE] Output request for session: {}", sessionId); + println!("[TRACE] Output request for session: {}", session_id); Json(ApiResponse::success( "Output available via WebSocket only".to_string(), ))