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: Windows overlay focus stealing, dense text OCR, update delay, exports path

Louis Beaumont665da63af0d3
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 39da7316e..518d22c8e 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9172,7 +9172,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.2.94"
+version = "2.2.95"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/updates.rs b/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
index a6c9547dd..257f81688 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
@@ -427,8 +427,18 @@ impl UpdatesManager {
"auto-update enabled, restarting to apply update v{}",
update.version
);
- // Give user time to read the notification
- tokio::time::sleep(Duration::from_secs(5)).await;
+ // Emit event so the frontend can display a countdown/warning
+ let _ = self.app.emit(
+ "update-restarting",
+ serde_json::json!({
+ "version": update.version,
+ "delay_secs": 30,
+ }),
+ );
+ // Give user 30 seconds to finish what they're doing before restarting.
+ // Previous 5-second delay was too aggressive and interrupted fullscreen
+ // apps (games, presentations) without adequate warning.
+ tokio::time::sleep(Duration::from_secs(30)).await;
if let Err(err) =
stop_screenpipe(self.app.state::<RecordingState>(), self.app.clone()).await
{
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 f654ed43a..9ccc8a9e0 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
@@ -1022,7 +1022,11 @@ impl ShowRewindWindow {
#[cfg(target_os = "windows")]
{
window.show().ok();
- if let Err(e) = crate::windows_overlay::bring_to_front_and_activate(window) {
+ // Overlay mode: bring to front WITHOUT stealing focus.
+ // Using bring_to_front (SWP_NOACTIVATE) instead of
+ // bring_to_front_and_activate (SetForegroundWindow) prevents
+ // the overlay from yanking focus away from fullscreen games.
+ if let Err(e) = crate::windows_overlay::bring_to_front(window) {
error!("Failed to bring window to front: {}", e);
}
let _ = app.emit("window-focused", true);
diff --git a/crates/screenpipe-engine/src/routes/streaming.rs b/crates/screenpipe-engine/src/routes/streaming.rs
index f52a53a72..9ef06c395 100644
--- a/crates/screenpipe-engine/src/routes/streaming.rs
+++ b/crates/screenpipe-engine/src/routes/streaming.rs
@@ -1098,11 +1098,10 @@ pub async fn handle_video_export_post(
.into_response();
}
- // Create exports directory
- let exports_dir = dirs::home_dir()
- .unwrap_or_default()
- .join(".screenpipe")
- .join("exports");
+ // Create exports directory — use the configured data dir (respects --data-dir)
+ // instead of hardcoding dirs::home_dir() which can resolve to a different
+ // drive on Windows, splitting outputs across C: and F: drives.
+ let exports_dir = state.screenpipe_dir.join("exports");
if let Err(e) = tokio::fs::create_dir_all(&exports_dir).await {
return (
StatusCode::INTERNAL_SERVER_ERROR,
diff --git a/crates/screenpipe-screen/src/frame_comparison.rs b/crates/screenpipe-screen/src/frame_comparison.rs
index 1bf0b3b80..64b598709 100644
--- a/crates/screenpipe-screen/src/frame_comparison.rs
+++ b/crates/screenpipe-screen/src/frame_comparison.rs
@@ -78,7 +78,7 @@ impl Default for FrameComparisonConfig {
Self {
hash_early_exit: true,
downscale_comparison: true,
- downscale_factor: 6,
+ downscale_factor: 4,
single_metric: true,
comparison_width: 640,
comparison_height: 360,
@@ -101,11 +101,14 @@ impl FrameComparisonConfig {
}
/// Create a config optimized for maximum CPU savings.
+ /// Uses factor=4 (1920→480px) to balance performance with text-change
+ /// sensitivity. Factor 6 (320px) caused hash collisions on dense text
+ /// pages, making scrolling through log files invisible to the comparer.
pub fn max_performance() -> Self {
Self {
hash_early_exit: true,
downscale_comparison: true,
- downscale_factor: 6,
+ downscale_factor: 4,
single_metric: true,
comparison_width: 480,
comparison_height: 270,
@@ -442,13 +445,13 @@ mod tests {
}
#[test]
- fn test_proportional_downscale_factor6() {
- let config = FrameComparisonConfig::default(); // factor=6
+ fn test_proportional_downscale_default_factor4() {
+ let config = FrameComparisonConfig::default(); // factor=4
let comparer = FrameComparer::new(config);
- assert_eq!(comparer.downscale_dims(1920, 1080), (320, 180));
- assert_eq!(comparer.downscale_dims(5120, 1440), (853, 240));
- assert_eq!(comparer.downscale_dims(3840, 2160), (640, 360));
+ assert_eq!(comparer.downscale_dims(1920, 1080), (480, 270));
+ assert_eq!(comparer.downscale_dims(5120, 1440), (1280, 360));
+ assert_eq!(comparer.downscale_dims(3840, 2160), (960, 540));
}
#[test]
@@ -591,13 +594,13 @@ mod tests {
let default = FrameComparisonConfig::default();
assert!(default.hash_early_exit);
assert!(default.downscale_comparison);
- assert_eq!(default.downscale_factor, 6);
+ assert_eq!(default.downscale_factor, 4);
let no_opt = FrameComparisonConfig::no_optimizations();
assert!(!no_opt.hash_early_exit);
assert!(!no_opt.downscale_comparison);
let max_perf = FrameComparisonConfig::max_performance();
- assert_eq!(max_perf.downscale_factor, 6);
+ assert_eq!(max_perf.downscale_factor, 4);
}
}