Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(macos): chat panel not showing on fullscreen spaces

Louis Beaumont4ed920f4c237
diff --git a/Cargo.lock b/Cargo.lock
index 92d0ebf42..98d0903e7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6642,7 +6642,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"anyhow",
"bytemuck",
@@ -6695,7 +6695,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -6746,7 +6746,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"anyhow",
"chrono",
@@ -6770,7 +6770,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"anyhow",
"chrono",
@@ -6788,7 +6788,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"anyhow",
"image",
@@ -6803,7 +6803,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"anyhow",
"async-trait",
@@ -6874,7 +6874,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.128"
+version = "0.3.129"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index bff6b9dda..1ef5b28a4 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.0.343"
+version = "2.0.344"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 296aa6c28..c37d19786 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -1409,6 +1409,46 @@ async fn main() {
let _ = ShowRewindWindow::Main.show(&app.handle());
}
+ // Pre-create chat panel (hidden) so the shortcut can show an
+ // existing panel on fullscreen Spaces. New windows created in
+ // Regular activation policy can't appear on fullscreen Spaces,
+ // but existing panels with MoveToActiveSpace + level 1001 can.
+ if onboarding_store.is_completed {
+ let app_handle_chat = app.handle().clone();
+ tauri::async_runtime::spawn(async move {
+ // Wait for main window to finish setup
+ tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
+ if app_handle_chat.get_webview_window("chat").is_none() {
+ info!("Pre-creating chat panel for fullscreen Space support");
+ match ShowRewindWindow::Chat.show(&app_handle_chat) {
+ Ok(window) => {
+ // Hide it immediately — shortcut will show it later
+ tokio::time::sleep(tokio::time::Duration::from_millis(200)).await;
+ #[cfg(target_os = "macos")]
+ {
+ use crate::window_api::run_on_main_thread_safe;
+ use tauri_nspanel::ManagerExt as _;
+ let app_clone = app_handle_chat.clone();
+ run_on_main_thread_safe(&app_handle_chat, move || {
+ if let Ok(panel) = app_clone.get_webview_panel("chat") {
+ panel.order_out(None);
+ }
+ });
+ }
+ #[cfg(not(target_os = "macos"))]
+ {
+ let _ = window.hide();
+ }
+ info!("Chat panel pre-created and hidden");
+ }
+ Err(e) => {
+ warn!("Failed to pre-create chat panel: {}", e);
+ }
+ }
+ }
+ });
+ }
+
// Show shortcut reminder overlay on app startup if enabled AND onboarding is completed
// Don't show reminder during first-time onboarding to reduce overwhelm
if store.show_shortcut_overlay && onboarding_store.is_completed {
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
index d24d837da..315b3cc69 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
@@ -14,7 +14,7 @@ use tauri_nspanel::WebviewWindowExt;
/// the process (Rust panics inside `run_on_main_thread` cross the Obj-C FFI
/// boundary in `tao::send_event`, which is `nounwind` → calls `abort()`).
#[cfg(target_os = "macos")]
-fn run_on_main_thread_safe<F: FnOnce() + Send + 'static>(app: &AppHandle, f: F) {
+pub fn run_on_main_thread_safe<F: FnOnce() + Send + 'static>(app: &AppHandle, f: F) {
let _ = app.run_on_main_thread(move || {
if let Err(e) = std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)) {
error!("panic caught in run_on_main_thread: {:?}", e);