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

feat: add UI toggle for incognito detection and wire through config pipeline

Louis Beaumontd9722bccc2b3
diff --git a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
index cd0cb1a97..099829bc4 100644
--- a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
@@ -197,6 +197,10 @@ export function PrivacySection() {
handleSettingsChange({ usePiiRemoval: checked }, true);
};
+ const handleIncognitoToggle = (checked: boolean) => {
+ handleSettingsChange({ ignoreIncognitoWindows: checked }, true);
+ };
+
const handleAnalyticsToggle = (checked: boolean) => {
handleSettingsChange({ analyticsEnabled: checked }, true);
};
@@ -400,6 +404,31 @@ export function PrivacySection() {
</Card>
</div>
+ {/* Incognito Detection */}
+ <Card className="border-border bg-card">
+ <CardContent className="px-3 py-2.5">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center space-x-2.5">
+ <EyeOff className="h-4 w-4 text-muted-foreground shrink-0" />
+ <div>
+ <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
+ ignore incognito windows
+ <HelpTooltip text="automatically detects and skips private/incognito browser windows in 20+ languages. on macos, uses native browser APIs for chromium browsers (chrome, edge, brave, arc)." />
+ </h3>
+ <p className="text-xs text-muted-foreground">
+ skip all private browsing sessions
+ </p>
+ </div>
+ </div>
+ <Switch
+ id="ignoreIncognitoWindows"
+ checked={settings.ignoreIncognitoWindows ?? true}
+ onCheckedChange={handleIncognitoToggle}
+ />
+ </div>
+ </CardContent>
+ </Card>
+
{/* Window Filtering */}
<div className="space-y-2">
<h2 className="text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1">
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
index 721dec7dd..f5b39c8f1 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
@@ -237,6 +237,12 @@ pub struct SettingsStore {
#[serde(rename = "chatAlwaysOnTop", default = "default_true")]
pub chat_always_on_top: bool,
+ /// Automatically detect and skip incognito / private browsing windows.
+ /// Uses localized title matching (20+ languages) and on macOS, native
+ /// AppleScript detection for Chromium browsers.
+ #[serde(rename = "ignoreIncognitoWindows", default = "default_true")]
+ pub ignore_incognito_windows: bool,
+
/// Catch-all for fields added by the frontend (e.g. chatHistory, deviceId)
/// that the Rust struct doesn't know about. Without this, `save()` would
/// serialize only known fields and silently wipe frontend-only data.
@@ -578,6 +584,7 @@ impl Default for SettingsStore {
show_overlay_in_screen_recording: false,
video_quality: "balanced".to_string(),
chat_always_on_top: true,
+ ignore_incognito_windows: true,
extra: std::collections::HashMap::new(),
}
}
@@ -683,6 +690,7 @@ impl SettingsStore {
ignored_windows: self.ignored_windows.clone(),
included_windows: self.included_windows.clone(),
ignored_urls: self.ignored_urls.clone(),
+ ignore_incognito_windows: self.ignore_incognito_windows,
languages: self
.languages
.iter()
diff --git a/crates/screenpipe-a11y/src/tree/linux.rs b/crates/screenpipe-a11y/src/tree/linux.rs
index 96bfcbb7e..afd23e544 100644
--- a/crates/screenpipe-a11y/src/tree/linux.rs
+++ b/crates/screenpipe-a11y/src/tree/linux.rs
@@ -864,7 +864,9 @@ impl TreeWalkerPlatform for LinuxTreeWalker {
};
// Skip incognito / private browsing windows (localized title check)
- if crate::incognito::is_title_private(&window_title) {
+ if self.config.ignore_incognito_windows
+ && crate::incognito::is_title_private(&window_title)
+ {
return Ok(None);
}
diff --git a/crates/screenpipe-a11y/src/tree/macos.rs b/crates/screenpipe-a11y/src/tree/macos.rs
index b19b940ea..3396275bc 100644
--- a/crates/screenpipe-a11y/src/tree/macos.rs
+++ b/crates/screenpipe-a11y/src/tree/macos.rs
@@ -257,7 +257,9 @@ impl MacosTreeWalker {
// On macOS Chromium browsers, the full AppleScript-based detection
// happens in the capture pipeline; here we only do the cheap title
// check to avoid recording sensitive content in the a11y tree.
- if crate::incognito::is_title_private(&window_name) {
+ if self.config.ignore_incognito_windows
+ && crate::incognito::is_title_private(&window_name)
+ {
return Ok(None);
}
diff --git a/crates/screenpipe-a11y/src/tree/mod.rs b/crates/screenpipe-a11y/src/tree/mod.rs
index 84cb75d11..63ed4eafb 100644
--- a/crates/screenpipe-a11y/src/tree/mod.rs
+++ b/crates/screenpipe-a11y/src/tree/mod.rs
@@ -161,6 +161,8 @@ pub struct TreeWalkerConfig {
pub monitor_width: f64,
/// Monitor height in screen points.
pub monitor_height: f64,
+ /// Automatically detect and skip incognito / private browsing windows.
+ pub ignore_incognito_windows: bool,
}
impl Default for TreeWalkerConfig {
@@ -178,6 +180,7 @@ impl Default for TreeWalkerConfig {
monitor_y: 0.0,
monitor_width: 0.0,
monitor_height: 0.0,
+ ignore_incognito_windows: true,
}
}
}
diff --git a/crates/screenpipe-a11y/src/tree/windows.rs b/crates/screenpipe-a11y/src/tree/windows.rs
index ea3baf62c..204eb6b91 100644
--- a/crates/screenpipe-a11y/src/tree/windows.rs
+++ b/crates/screenpipe-a11y/src/tree/windows.rs
@@ -196,7 +196,9 @@ impl TreeWalkerPlatform for WindowsTreeWalker {
};
// Skip incognito / private browsing windows (localized title check)
- if crate::incognito::is_title_private(&window_name) {
+ if self.config.ignore_incognito_windows
+ && crate::incognito::is_title_private(&window_name)
+ {
return Ok(None);
}
diff --git a/crates/screenpipe-engine/src/cli/mod.rs b/crates/screenpipe-engine/src/cli/mod.rs
index 0e41ef9ef..8bef48ea7 100644
--- a/crates/screenpipe-engine/src/cli/mod.rs
+++ b/crates/screenpipe-engine/src/cli/mod.rs
@@ -359,6 +359,7 @@ impl RecordArgs {
analytics_enabled: !self.disable_telemetry,
analytics_id: String::new(),
vocabulary: vec![],
+ ignore_incognito_windows: true,
}
}
}
diff --git a/crates/screenpipe-engine/src/recording_config.rs b/crates/screenpipe-engine/src/recording_config.rs
index b1087a8e6..318ae6bfe 100644
--- a/crates/screenpipe-engine/src/recording_config.rs
+++ b/crates/screenpipe-engine/src/recording_config.rs
@@ -47,6 +47,8 @@ pub struct RecordingConfig {
pub ignored_windows: Vec<String>,
pub included_windows: Vec<String>,
pub ignored_urls: Vec<String>,
+ /// Automatically detect and skip incognito / private browsing windows.
+ pub ignore_incognito_windows: bool,
pub languages: Vec<Language>,
// Cloud/auth
@@ -128,6 +130,7 @@ impl RecordingConfig {
use_pii_removal: self.use_pii_removal,
monitor_ids: self.monitor_ids.clone(),
use_all_monitors: self.use_all_monitors,
+ ignore_incognito_windows: self.ignore_incognito_windows,
}
}
}
diff --git a/crates/screenpipe-engine/src/vision_manager/manager.rs b/crates/screenpipe-engine/src/vision_manager/manager.rs
index 2024b9794..b127ad5fb 100644
--- a/crates/screenpipe-engine/src/vision_manager/manager.rs
+++ b/crates/screenpipe-engine/src/vision_manager/manager.rs
@@ -33,6 +33,8 @@ pub struct VisionManagerConfig {
pub monitor_ids: Vec<String>,
/// When true, record every connected monitor regardless of `monitor_ids`.
pub use_all_monitors: bool,
+ /// Automatically detect and skip incognito / private browsing windows.
+ pub ignore_incognito_windows: bool,
}
/// Status of the VisionManager
@@ -254,6 +256,7 @@ impl VisionManager {
monitor_y: monitor.y() as f64,
monitor_width: monitor.width() as f64,
monitor_height: monitor.height() as f64,
+ ignore_incognito_windows: self.config.ignore_incognito_windows,
..TreeWalkerConfig::default()
};