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 close button to shortcut reminder overlay to permanently hide it

Louis Beaumontb12ba61fca3e
diff --git a/screenpipe-app-tauri/app/shortcut-reminder/page.tsx b/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
index a7675a8b7..55e010c28 100644
--- a/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
+++ b/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
@@ -6,6 +6,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
import posthog from "posthog-js";
import { usePlatform } from "@/lib/hooks/use-platform";
import { getStore } from "@/lib/hooks/use-settings";
+import { X } from "lucide-react";
export default function ShortcutReminderPage() {
const { isMac, isLoading } = usePlatform();
@@ -86,6 +87,22 @@ export default function ShortcutReminderPage() {
}
}, []);
+ // Handle close button - hide overlay permanently
+ const handleClose = useCallback(async () => {
+ try {
+ const store = await getStore();
+ const settings = await store.get<Record<string, unknown>>("settings") || {};
+ await store.set("settings", { ...settings, showShortcutOverlay: false });
+ await store.save();
+ posthog.capture("shortcut_reminder_dismissed");
+ await getCurrentWindow().hide();
+ } catch (e) {
+ console.error("Failed to save setting:", e);
+ // Still try to hide the window
+ await getCurrentWindow().hide();
+ }
+ }, []);
+
return (
<div
className="w-full h-full flex items-center justify-center"
@@ -141,7 +158,7 @@ export default function ShortcutReminderPage() {
</div>
{/* Chat shortcut */}
- <div className="flex items-center gap-1.5 px-2 py-1">
+ <div className="flex items-center gap-1.5 px-2 py-1 border-r border-white/20">
<svg
width="10"
height="10"
@@ -157,6 +174,16 @@ export default function ShortcutReminderPage() {
{chatShortcut ?? "..."}
</span>
</div>
+
+ {/* Close button */}
+ <button
+ onClick={handleClose}
+ onMouseDown={(e) => e.stopPropagation()}
+ className="flex items-center justify-center px-1.5 py-1 hover:bg-white/10 transition-colors"
+ title="Hide shortcut reminder"
+ >
+ <X className="h-2.5 w-2.5 text-white/40 hover:text-white/80" />
+ </button>
</div>
</div>
</div>
diff --git a/screenpipe-app-tauri/lib/hooks/use-changelog-dialog.tsx b/screenpipe-app-tauri/lib/hooks/use-changelog-dialog.tsx
index 8108455f3..6313a12fd 100644
--- a/screenpipe-app-tauri/lib/hooks/use-changelog-dialog.tsx
+++ b/screenpipe-app-tauri/lib/hooks/use-changelog-dialog.tsx
@@ -2,11 +2,8 @@ import React, {
createContext,
useContext,
useState,
- useEffect,
ReactNode,
} from "react";
-import localforage from "localforage";
-import { useAppVersion } from "./use-app-version";
interface ChangelogDialogContextType {
showChangelogDialog: boolean;
@@ -20,23 +17,7 @@ const ChangelogDialogContext = createContext<
export const ChangelogDialogProvider: React.FC<{ children: ReactNode }> = ({
children,
}) => {
- const [showChangelogDialog, setShowChangelogDialog] = useState(true);
- const version = useAppVersion();
-
- useEffect(() => {
- const checkChangelogStatus = async () => {
- const versionSeen = await localforage.getItem<string>("versionSeen");
-
- if (version && (!versionSeen || versionSeen !== version)) {
- setShowChangelogDialog(true);
- await localforage.setItem("versionSeen", version);
- } else {
- setShowChangelogDialog(false);
- }
- };
-
- checkChangelogStatus();
- }, [version]);
+ const [showChangelogDialog, setShowChangelogDialog] = useState(false);
return (
<ChangelogDialogContext.Provider
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 6b6ac9d1e..88a55b281 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8612,7 +8612,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.219"
+version = "2.0.220"
dependencies = [
"anyhow",
"async-stream",
@@ -8692,7 +8692,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"anyhow",
"bytemuck",
@@ -8740,7 +8740,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -8791,7 +8791,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"anyhow",
"chrono",
@@ -8815,7 +8815,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"anyhow",
"chrono",
@@ -8831,7 +8831,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"anyhow",
"image 0.25.5",
@@ -8846,7 +8846,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"anyhow",
"async-trait",
@@ -8910,7 +8910,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.13"
+version = "0.3.14"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
index 2746c9f59..5bc42fa8c 100644
--- a/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
+++ b/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
@@ -14,7 +14,8 @@ use screenpipe_core::Language;
use screenpipe_db::DatabaseManager;
use screenpipe_server::{
PipeManager, ResourceMonitor, SCServer, start_continuous_recording, start_ui_recording,
- UiRecorderConfig, VisionManager, VisionManagerConfig, start_monitor_watcher, stop_monitor_watcher
+ UiRecorderConfig,
+ vision_manager::{VisionManager, VisionManagerConfig, start_monitor_watcher, stop_monitor_watcher},
};
use screenpipe_vision::OcrEngine;
use tokio::sync::broadcast;
@@ -262,20 +263,6 @@ pub async fn start_embedded_server(
let (shutdown_tx, _) = broadcast::channel::<()>(1);
let shutdown_tx_clone = shutdown_tx.clone();
- // Get monitor IDs
- let monitor_ids: Vec<u32> = if config.monitor_ids.is_empty()
- || config.monitor_ids.contains(&"default".to_string())
- {
- let monitors = screenpipe_vision::monitor::list_monitors().await;
- monitors.iter().map(|m| m.id()).collect()
- } else {
- config
- .monitor_ids
- .iter()
- .filter_map(|s| s.parse().ok())
- .collect()
- };
-
// Parse OCR engine
let ocr_engine: OcrEngine = match config.ocr_engine.as_str() {
"tesseract" => OcrEngine::Tesseract,
@@ -294,55 +281,127 @@ pub async fn start_embedded_server(
// Create a runtime handle for vision tasks
let vision_handle = tokio::runtime::Handle::current();
- // Start continuous recording
+ // Start vision recording
if !config.disable_vision {
let db_clone = db.clone();
- let output_path = Arc::new(data_path.to_string_lossy().into_owned());
+ let output_path = data_path.to_string_lossy().into_owned();
let fps = config.fps;
let video_chunk_duration = Duration::from_secs(config.video_chunk_duration);
let ocr_engine = Arc::new(ocr_engine);
let use_pii_removal = config.use_pii_removal;
let ignored_windows = config.ignored_windows.clone();
let included_windows = config.included_windows.clone();
- let languages = languages.clone();
+ let languages_clone = languages.clone();
+
+ if config.use_all_monitors {
+ // Use VisionManager for dynamic monitor detection (handles connect/disconnect)
+ info!("Using dynamic monitor detection (use_all_monitors=true)");
+
+ let vision_config = VisionManagerConfig {
+ output_path,
+ fps,
+ video_chunk_duration,
+ ocr_engine,
+ use_pii_removal,
+ ignored_windows,
+ included_windows,
+ ignored_urls: vec![],
+ languages: languages_clone,
+ capture_unfocused_windows: false,
+ realtime_vision: false,
+ activity_feed: None,
+ };
+
+ let vision_manager = Arc::new(VisionManager::new(
+ vision_config,
+ db_clone,
+ vision_handle.clone(),
+ ));
+
+ let vm_clone = vision_manager.clone();
+ let shutdown_rx = shutdown_tx_clone.subscribe();
+
+ tokio::spawn(async move {
+ let mut shutdown_rx = shutdown_rx;
+
+ // Start VisionManager
+ if let Err(e) = vm_clone.start().await {
+ error!("Failed to start VisionManager: {:?}", e);
+ return;
+ }
+ info!("VisionManager started successfully");
+
+ // Start MonitorWatcher for dynamic detection
+ if let Err(e) = start_monitor_watcher(vm_clone.clone()).await {
+ error!("Failed to start monitor watcher: {:?}", e);
+ }
+ info!("Monitor watcher started - will detect connect/disconnect");
- let shutdown_rx = shutdown_tx_clone.subscribe();
+ // Wait for shutdown signal
+ let _ = shutdown_rx.recv().await;
+ info!("Received shutdown signal for VisionManager");
- tokio::spawn(async move {
- let mut shutdown_rx = shutdown_rx;
- loop {
- let recording_future = start_continuous_recording(
- db_clone.clone(),
- output_path.clone(),
- fps,
- video_chunk_duration,
- ocr_engine.clone(),
- monitor_ids.clone(),
- use_pii_removal,
- false,
- &vision_handle,
- &ignored_windows,
- &included_windows,
- &[],
- languages.clone(),
- false,
- false,
- None,
- );
-
- tokio::select! {
- result = recording_future => {
- if let Err(e) = result {
- error!("Continuous recording error: {:?}", e);
+ // Stop monitor watcher and VisionManager
+ let _ = stop_monitor_watcher().await;
+ if let Err(e) = vm_clone.shutdown().await {
+ error!("Error shutting down VisionManager: {:?}", e);
+ }
+ });
+ } else {
+ // Use static monitor list (legacy behavior)
+ let monitor_ids: Vec<u32> = if config.monitor_ids.is_empty()
+ || config.monitor_ids.contains(&"default".to_string())
+ {
+ let monitors = screenpipe_vision::monitor::list_monitors().await;
+ monitors.iter().map(|m| m.id()).collect()
+ } else {
+ config
+ .monitor_ids
+ .iter()
+ .filter_map(|s| s.parse().ok())
+ .collect()
+ };
+
+ info!("Using static monitor list: {:?}", monitor_ids);
+ let output_path = Arc::new(output_path);
+ let shutdown_rx = shutdown_tx_clone.subscribe();
+
+ tokio::spawn(async move {
+ let mut shutdown_rx = shutdown_rx;
+ loop {
+ let recording_future = start_continuous_recording(
+ db_clone.clone(),
+ output_path.clone(),
+ fps,
+ video_chunk_duration,
+ ocr_engine.clone(),
+ monitor_ids.clone(),
+ use_pii_removal,
+ false,
+ &vision_handle,
+ &ignored_windows,
+ &included_windows,
+ &[],
+ languages_clone.clone(),
+ false,
+ false,
+ None,
+ );
+
+ tokio::select! {
+ result = recording_future => {
+ if let Err(e) = result {
+ error!("Continuous recording error: {:?}", e);
+ }
+ }
+ _ = shutdown_rx.recv() => {
+ info!("Received shutdown signal for vision recording");
+ break;
}
- }
- _ = shutdown_rx.recv() => {
- info!("Received shutdown signal for vision recording");
- break;
}
}
- }
- });
+ });
+ }
}
// Start audio recording
diff --git a/screenpipe-app-tauri/src-tauri/src/store.rs b/screenpipe-app-tauri/src-tauri/src/store.rs
index dd411e1e6..bbd369b1e 100644
--- a/screenpipe-app-tauri/src-tauri/src/store.rs
+++ b/screenpipe-app-tauri/src-tauri/src/store.rs
@@ -477,7 +477,7 @@ impl Default for SettingsStore {
enable_realtime_audio_transcription: false,
realtime_audio_transcription_engine: "deepgram".to_string(),
disable_vision: false,
- use_all_monitors: false,
+ use_all_monitors: true, // Match CLI default - dynamic monitor detection
enable_realtime_vision: true,
show_shortcut_overlay: true,
device_id: uuid::Uuid::new_v4().to_string(),