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: compact overlay actually resizes the window instead of covering screen

Louis Beaumont3816053dd533
diff --git a/Cargo.lock b/Cargo.lock
index 65006bea6..60cd0cd2e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6628,7 +6628,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"anyhow",
"bytemuck",
@@ -6681,7 +6681,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -6732,7 +6732,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"anyhow",
"chrono",
@@ -6756,7 +6756,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"anyhow",
"chrono",
@@ -6774,7 +6774,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"anyhow",
"image",
@@ -6789,7 +6789,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"anyhow",
"async-trait",
@@ -6858,7 +6858,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.57"
+version = "0.3.60"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
index 35bb8e20f..f44e51c83 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
@@ -871,6 +871,13 @@ export default function Timeline() {
// Compact mode: thin bottom bar with timeline + thumbnail
const isCompact = isCompactDefault && !isExpanded;
+ const COMPACT_BAR_HEIGHT = 80;
+
+ // Resize the actual window when toggling compact ↔ expanded
+ useEffect(() => {
+ if (!isCompactDefault) return; // fullscreen mode — don't touch window size
+ commands.setOverlayCompact(isCompact, COMPACT_BAR_HEIGHT);
+ }, [isCompact, isCompactDefault]);
const compactThumbnailUrl = currentFrame?.devices?.[0]?.frame_id
? `http://localhost:3030/frames/${currentFrame.devices[0].frame_id}`
@@ -885,101 +892,93 @@ export default function Timeline() {
<TimelineProvider>
<div
ref={containerRef}
- className="inset-0 flex flex-col relative"
+ className="flex flex-col text-foreground bg-card"
style={{
- height: "100vh",
+ height: `${COMPACT_BAR_HEIGHT}px`,
WebkitUserSelect: "none",
userSelect: "none",
}}
>
- {/* Transparent area — click to dismiss */}
- <div
- className="flex-1"
- onClick={() => commands.closeWindow("Main")}
- />
+ {/* Compact bottom bar — fills the entire small window */}
+ <div className="flex items-center gap-3 px-4 h-full border-t border-border">
+ {/* Thumbnail */}
+ <button
+ onClick={() => setIsExpanded(true)}
+ className="relative flex-shrink-0 w-[88px] h-[52px] rounded-md overflow-hidden border border-border/50 hover:border-primary/50 transition-colors group cursor-pointer bg-muted"
+ title="Expand (Enter)"
+ >
+ {compactThumbnailUrl ? (
+ <img
+ src={compactThumbnailUrl}
+ alt="Current frame"
+ className="w-full h-full object-cover"
+ />
+ ) : (
+ <div className="w-full h-full flex items-center justify-center">
+ <Loader2 className="w-4 h-4 animate-spin text-muted-foreground" />
+ </div>
+ )}
+ <div className="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center">
+ <Maximize2 className="w-4 h-4 text-white opacity-0 group-hover:opacity-100 transition-opacity" />
+ </div>
+ </button>
- {/* Compact bottom bar */}
- <div className="relative z-40 bg-card/95 backdrop-blur-xl border-t border-border shadow-2xl">
- <div className="flex items-center gap-3 px-4 py-2 h-[72px]">
- {/* Thumbnail */}
+ {/* Timestamp */}
+ <span className="text-xs font-mono text-muted-foreground flex-shrink-0 w-12 text-center">
+ {compactTimestamp}
+ </span>
+
+ {/* Timeline slider — fills remaining space */}
+ <div className="flex-1 min-w-0">
+ {frames.length > 0 ? (
+ <TimelineSlider
+ frames={frames}
+ currentIndex={currentIndex}
+ onFrameChange={(index) => {
+ setCurrentIndex(index);
+ if (frames[index]) {
+ setCurrentFrame(frames[index]);
+ }
+ }}
+ fetchNextDayData={fetchNextDayData}
+ currentDate={currentDate}
+ startAndEndDates={startAndEndDates}
+ newFramesCount={newFramesCount}
+ lastFlushTimestamp={lastFlushTimestamp}
+ isSearchModalOpen={showSearchModal}
+ />
+ ) : (
+ <div className="text-xs text-muted-foreground text-center">
+ {isLoading ? "Loading..." : "No frames"}
+ </div>
+ )}
+ </div>
+
+ {/* Action buttons */}
+ <div className="flex items-center gap-1 flex-shrink-0">
+ <button
+ onClick={() => setShowSearchModal(true)}
+ className="p-2 hover:bg-muted rounded-md transition-colors"
+ title="Search (/)"
+ >
+ <svg className="w-4 h-4 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24">
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
+ </svg>
+ </button>
<button
onClick={() => setIsExpanded(true)}
- className="relative flex-shrink-0 w-[88px] h-[52px] rounded-md overflow-hidden border border-border/50 hover:border-primary/50 transition-colors group cursor-pointer bg-muted"
+ className="p-2 hover:bg-muted rounded-md transition-colors"
title="Expand (Enter)"
>
- {compactThumbnailUrl ? (
- <img
- src={compactThumbnailUrl}
- alt="Current frame"
- className="w-full h-full object-cover"
- />
- ) : (
- <div className="w-full h-full flex items-center justify-center">
- <Loader2 className="w-4 h-4 animate-spin text-muted-foreground" />
- </div>
- )}
- <div className="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center">
- <Maximize2 className="w-4 h-4 text-white opacity-0 group-hover:opacity-100 transition-opacity" />
- </div>
+ <Maximize2 className="w-4 h-4 text-muted-foreground" />
+ </button>
+ <button
+ onClick={() => commands.closeWindow("Main")}
+ className="p-2 hover:bg-muted rounded-md transition-colors"
+ title="Close (Esc)"
+ >
+ <X className="w-4 h-4 text-muted-foreground" />
</button>
-
- {/* Timestamp */}
- <span className="text-xs font-mono text-muted-foreground flex-shrink-0 w-12 text-center">
- {compactTimestamp}
- </span>
-
- {/* Timeline slider — fills remaining space */}
- <div className="flex-1 min-w-0">
- {frames.length > 0 ? (
- <TimelineSlider
- frames={frames}
- currentIndex={currentIndex}
- onFrameChange={(index) => {
- setCurrentIndex(index);
- if (frames[index]) {
- setCurrentFrame(frames[index]);
- }
- }}
- fetchNextDayData={fetchNextDayData}
- currentDate={currentDate}
- startAndEndDates={startAndEndDates}
- newFramesCount={newFramesCount}
- lastFlushTimestamp={lastFlushTimestamp}
- isSearchModalOpen={showSearchModal}
- />
- ) : (
- <div className="text-xs text-muted-foreground text-center">
- {isLoading ? "Loading..." : "No frames"}
- </div>
- )}
- </div>
-
- {/* Action buttons */}
- <div className="flex items-center gap-1 flex-shrink-0">
- <button
- onClick={() => setShowSearchModal(true)}
- className="p-2 hover:bg-muted rounded-md transition-colors"
- title="Search (/)"
- >
- <svg className="w-4 h-4 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24">
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
- </svg>
- </button>
- <button
- onClick={() => setIsExpanded(true)}
- className="p-2 hover:bg-muted rounded-md transition-colors"
- title="Expand (Enter)"
- >
- <Maximize2 className="w-4 h-4 text-muted-foreground" />
- </button>
- <button
- onClick={() => commands.closeWindow("Main")}
- className="p-2 hover:bg-muted rounded-md transition-colors"
- title="Close (Esc)"
- >
- <X className="w-4 h-4 text-muted-foreground" />
- </button>
- </div>
</div>
</div>
diff --git a/apps/screenpipe-app-tauri/lib/utils/tauri.ts b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
index cb9b94033..2b10c8ee0 100644
--- a/apps/screenpipe-app-tauri/lib/utils/tauri.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
@@ -231,6 +231,19 @@ async unregisterWindowShortcuts() : Promise<Result<null, string>> {
else return { status: "error", error: e as any };
}
},
+/**
+ * Resize the main overlay panel to a compact bottom bar or back to fullscreen.
+ * `compact = true` → thin strip at bottom of current screen.
+ * `compact = false` → full screen (same as initial overlay).
+ */
+async setOverlayCompact(compact: boolean, barHeight: number) : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("set_overlay_compact", { compact, barHeight }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
async setTrayUnhealthIcon() : Promise<void> {
await TAURI_INVOKE("set_tray_unhealth_icon");
},
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index d65abaf8d..2f268d342 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9007,7 +9007,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.265"
+version = "2.0.266"
dependencies = [
"anyhow",
"async-stream",
@@ -9089,7 +9089,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"anyhow",
"bytemuck",
@@ -9137,7 +9137,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -9188,7 +9188,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"anyhow",
"chrono",
@@ -9212,7 +9212,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"anyhow",
"chrono",
@@ -9228,7 +9228,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"anyhow",
"image 0.25.9",
@@ -9243,7 +9243,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"anyhow",
"async-trait",
@@ -9307,7 +9307,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.58"
+version = "0.3.60"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
index 7eb7b4bed..26c5b36a6 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -127,6 +127,86 @@ pub fn is_overlay_click_through(_app_handle: tauri::AppHandle) -> bool {
false
}
+/// Resize the main overlay panel to a compact bottom bar or back to fullscreen.
+/// `compact = true` → thin strip at bottom of current screen.
+/// `compact = false` → full screen (same as initial overlay).
+#[tauri::command]
+#[specta::specta]
+pub fn set_overlay_compact(app_handle: tauri::AppHandle, compact: bool, bar_height: f64) -> Result<(), String> {
+ #[cfg(target_os = "macos")]
+ {
+ use tauri_nspanel::ManagerExt;
+ use tauri_nspanel::cocoa::appkit::{NSEvent, NSScreen};
+ use tauri_nspanel::cocoa::base::{id, nil};
+ use tauri_nspanel::cocoa::foundation::{NSArray, NSPoint, NSRect};
+ use objc::{msg_send, sel, sel_impl};
+
+ let label = crate::window_api::RewindWindowId::Main.label();
+ let panel = app_handle.get_webview_panel(label)
+ .map_err(|e| format!("no panel: {:?}", e))?;
+
+ app_handle.run_on_main_thread(move || {
+ unsafe {
+ let mouse_location: NSPoint = NSEvent::mouseLocation(nil);
+ let screens: id = NSScreen::screens(nil);
+ let count: u64 = NSArray::count(screens);
+
+ for i in 0..count {
+ let screen: id = NSArray::objectAtIndex(screens, i);
+ let frame: NSRect = NSScreen::frame(screen);
+ if mouse_location.x >= frame.origin.x
+ && mouse_location.x < frame.origin.x + frame.size.width
+ && mouse_location.y >= frame.origin.y
+ && mouse_location.y < frame.origin.y + frame.size.height
+ {
+ let new_frame = if compact {
+ // Bottom strip: same x, y=screen origin, full width, bar_height
+ NSRect::new(
+ NSPoint::new(frame.origin.x, frame.origin.y),
+ tauri_nspanel::cocoa::foundation::NSSize::new(frame.size.width, bar_height),
+ )
+ } else {
+ // Full screen
+ frame
+ };
+ let _: () = msg_send![&*panel, setFrame:new_frame display:true animate:true];
+ break;
+ }
+ }
+ }
+ }).map_err(|e| format!("main thread: {:?}", e))?;
+ }
+
+ #[cfg(not(target_os = "macos"))]
+ {
+ // On Windows/Linux, use Tauri window API
+ if let Some(window) = app_handle.get_webview_window("main") {
+ if let Ok(Some(monitor)) = window.current_monitor() {
+ let scale = monitor.scale_factor();
+ let size = monitor.size();
+ let pos = monitor.position();
+ let logical_w = size.width as f64 / scale;
+ let logical_h = size.height as f64 / scale;
+ if compact {
+ let _ = window.set_size(tauri::LogicalSize::new(logical_w, bar_height));
+ let _ = window.set_position(tauri::LogicalPosition::new(
+ pos.x as f64 / scale,
+ pos.y as f64 / scale + logical_h - bar_height,
+ ));
+ } else {
+ let _ = window.set_size(tauri::LogicalSize::new(logical_w, logical_h));
+ let _ = window.set_position(tauri::LogicalPosition::new(
+ pos.x as f64 / scale,
+ pos.y as f64 / scale,
+ ));
+ }
+ }
+ }
+ }
+
+ Ok(())
+}
+
#[cfg(target_os = "windows")]
const DEFAULT_SHORTCUT: &str = "Alt+S";
#[cfg(not(target_os = "windows"))]
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 247b2b7ab..db573e36b 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -959,6 +959,7 @@ async fn main() {
// Window-specific shortcut commands (dynamic registration)
commands::register_window_shortcuts,
commands::unregister_window_shortcuts,
+ commands::set_overlay_compact,
// Commands from tray.rs
set_tray_unhealth_icon,
set_tray_health_icon,
@@ -1100,10 +1101,11 @@ async fn main() {
// Window-specific shortcut commands (dynamic registration)
commands::register_window_shortcuts,
commands::unregister_window_shortcuts,
- // Overlay commands (Windows)
+ // Overlay commands
commands::enable_overlay_click_through,
commands::disable_overlay_click_through,
commands::is_overlay_click_through,
+ commands::set_overlay_compact,
get_log_files,
get_media_file,
upload_file_to_s3,