diff --git a/packages/desktop/src-tauri/Cargo.lock b/packages/desktop/src-tauri/Cargo.lock index e1cecea2..de21265b 100644 --- a/packages/desktop/src-tauri/Cargo.lock +++ b/packages/desktop/src-tauri/Cargo.lock @@ -2644,7 +2644,6 @@ dependencies = [ "tauri-plugin-updater", "tokio", "url", - "window-vibrancy 0.7.1", ] [[package]] @@ -4462,7 +4461,7 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "window-vibrancy 0.6.0", + "window-vibrancy", "windows", ] @@ -5679,21 +5678,6 @@ dependencies = [ "windows-version", ] -[[package]] -name = "window-vibrancy" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "010797bd7c40396fbc59d3105089fed0885fe267a0ef4a0a4646df54e28647f6" -dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "raw-window-handle", - "windows-sys 0.60.2", - "windows-version", -] - [[package]] name = "windows" version = "0.61.3" diff --git a/packages/desktop/src-tauri/Cargo.toml b/packages/desktop/src-tauri/Cargo.toml index 949d3690..f85dc0f2 100644 --- a/packages/desktop/src-tauri/Cargo.toml +++ b/packages/desktop/src-tauri/Cargo.toml @@ -39,4 +39,3 @@ strip = true [target.'cfg(target_os = "macos")'.dependencies] objc2 = "0.6" objc2-web-kit = "0.3" -window-vibrancy = "0.7.1" diff --git a/packages/desktop/src-tauri/src/main.rs b/packages/desktop/src-tauri/src/main.rs index 84630b07..8acccaa8 100644 --- a/packages/desktop/src-tauri/src/main.rs +++ b/packages/desktop/src-tauri/src/main.rs @@ -23,10 +23,6 @@ use std::{ time::Duration, }; use tauri::{Emitter, Manager, WebviewUrl, WebviewWindowBuilder}; -#[cfg(target_os = "macos")] -use window_vibrancy::{ - apply_vibrancy, clear_vibrancy, NSVisualEffectMaterial, -}; /// Disable pinch-to-zoom / magnification gestures on macOS to avoid accidental /// zoom and the continuous gesture event processing overhead. @@ -2496,91 +2492,12 @@ fn read_desktop_theme_override() -> Option { parse_theme_override(theme_mode, theme_variant) } -fn read_desktop_vibrancy_enabled() -> bool { - let raw = fs::read_to_string(settings_file_path()).ok(); - let parsed = raw - .as_deref() - .and_then(|s| serde_json::from_str::(s).ok()); - parsed - .as_ref() - .and_then(|v| v.get("desktopVibrancy")) - .and_then(|v| v.as_bool()) - .unwrap_or(true) // enabled by default -} - -fn write_desktop_vibrancy_to_disk(enabled: bool) -> Result<()> { - let path = settings_file_path(); - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - let mut root: serde_json::Value = if let Ok(raw) = fs::read_to_string(&path) { - serde_json::from_str(&raw).unwrap_or(serde_json::json!({})) - } else { - serde_json::json!({}) - }; - if !root.is_object() { - root = serde_json::json!({}); - } - root["desktopVibrancy"] = serde_json::Value::Bool(enabled); - fs::write(&path, serde_json::to_string_pretty(&root)?)?; - Ok(()) -} - -#[cfg(target_os = "macos")] -fn apply_macos_window_vibrancy(window: &tauri::WebviewWindow) { - if !read_desktop_vibrancy_enabled() { - let _ = clear_vibrancy(window); - return; - } - - if let Err(error) = apply_vibrancy( - window, - NSVisualEffectMaterial::Sidebar, - None, - None, - ) { - log::warn!("[desktop:vibrancy] Failed to apply macOS vibrancy: {error}"); - } -} - -#[cfg(not(target_os = "macos"))] -fn apply_macos_window_vibrancy(_window: &tauri::WebviewWindow) {} - -#[tauri::command] -fn desktop_set_vibrancy(app: tauri::AppHandle, enabled: bool) -> Result<(), String> { - write_desktop_vibrancy_to_disk(enabled).map_err(|e| e.to_string())?; - - #[cfg(target_os = "macos")] - { - for window in app.webview_windows().values() { - if enabled { - if let Err(error) = apply_vibrancy( - window, - NSVisualEffectMaterial::Sidebar, - None, - None, - ) { - log::warn!("[desktop:vibrancy] Failed to apply vibrancy: {error}"); - } - } else { - let _ = clear_vibrancy(window); - } - } - } - - #[cfg(not(target_os = "macos"))] - let _ = app; - - Ok(()) -} - /// Apply platform-specific window builder configuration. fn apply_platform_window_config>( builder: WebviewWindowBuilder<'_, tauri::Wry, M>, ) -> WebviewWindowBuilder<'_, tauri::Wry, M> { #[cfg(target_os = "macos")] let builder = builder - .transparent(read_desktop_vibrancy_enabled()) .hidden_title(true) .title_bar_style(tauri::TitleBarStyle::Overlay) .traffic_light_position(tauri::Position::Logical(tauri::LogicalPosition { @@ -2776,7 +2693,6 @@ fn create_window( let window = builder.build()?; let _ = window.set_theme(read_desktop_theme_override()); - apply_macos_window_vibrancy(&window); disable_pinch_zoom(&window); if let Some(state) = restored_state.as_ref().filter(|_| apply_restored_state) { @@ -2829,7 +2745,6 @@ fn create_startup_window(app: &tauri::AppHandle, restore_geometry: bool) -> Resu let window = builder.build()?; let _ = window.set_theme(read_desktop_theme_override()); - apply_macos_window_vibrancy(&window); disable_pinch_zoom(&window); if let Some(state) = restored_state.as_ref().filter(|_| apply_restored_state) { @@ -3290,7 +3205,6 @@ fn main() { desktop_hosts_set, desktop_host_probe, desktop_set_window_theme, - desktop_set_vibrancy, remote_ssh::desktop_ssh_instances_get, remote_ssh::desktop_ssh_instances_set, remote_ssh::desktop_ssh_import_hosts, diff --git a/packages/desktop/src-tauri/tauri.conf.json b/packages/desktop/src-tauri/tauri.conf.json index a1e258bd..a27f4799 100644 --- a/packages/desktop/src-tauri/tauri.conf.json +++ b/packages/desktop/src-tauri/tauri.conf.json @@ -15,7 +15,6 @@ "label": "main", "create": false, "title": "OpenChamber", - "transparent": true, "width": 1280, "height": 800, "resizable": true, diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx index 01ecfbf5..6563214a 100644 --- a/packages/ui/src/App.tsx +++ b/packages/ui/src/App.tsx @@ -575,7 +575,7 @@ function App({ apis }: AppProps) { if (showCliOnboarding) { return ( -
+
@@ -652,7 +652,7 @@ function App({ apis }: AppProps) { -
+
diff --git a/packages/ui/src/components/chat/ChatContainer.tsx b/packages/ui/src/components/chat/ChatContainer.tsx index d7bffc48..4c17a00b 100644 --- a/packages/ui/src/components/chat/ChatContainer.tsx +++ b/packages/ui/src/components/chat/ChatContainer.tsx @@ -664,7 +664,7 @@ export const ChatContainer: React.FC = () => { 'relative z-10', isDesktopExpandedInput ? 'flex-1 min-h-0 bg-background' - : 'bg-background/95 supports-[backdrop-filter]:bg-background/80' + : 'bg-background' )} > @@ -727,7 +727,7 @@ export const ChatContainer: React.FC = () => { 'relative z-10', isDesktopExpandedInput ? 'flex-1 min-h-0 bg-background' - : 'bg-background/95 supports-[backdrop-filter]:bg-background/80' + : 'bg-background' )} > @@ -763,7 +763,7 @@ export const ChatContainer: React.FC = () => { 'relative z-10', isDesktopExpandedInput ? 'flex-1 min-h-0 bg-background' - : 'bg-background/95 supports-[backdrop-filter]:bg-background/80' + : 'bg-background' )} > @@ -808,7 +808,7 @@ export const ChatContainer: React.FC = () => { 'relative z-10', isDesktopExpandedInput ? 'flex-1 min-h-0 bg-background' - : 'bg-background/95 supports-[backdrop-filter]:bg-background/80' + : 'bg-background' )} > {!isDesktopExpandedInput && sessionMessages.length > 0 && ( diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index d40b050d..d17fbfd2 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -3387,7 +3387,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo onDrop={handleDrop} > {isDragging && ( -
+