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

Bump app to v2.0.537

Louis Beaumontcbfc393b723b
diff --git a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
index 085bb8a86..efe7bf12f 100644
--- a/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
+++ b/apps/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
@@ -137,6 +137,7 @@ export default function ShortcutReminderPage() {
style={{
background: "rgba(0, 0, 0, 0.75)",
gridTemplateColumns: "1fr 1fr auto",
+ maxWidth: 160,
}}
>
{/* Row 1, Col 1: Overlay shortcut (clickable) */}
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index c7136b379..6044e057d 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8097,7 +8097,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.534"
+version = "2.0.537"
dependencies = [
"anyhow",
"arboard",
@@ -8192,7 +8192,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"anyhow",
"bytemuck",
@@ -8243,7 +8243,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -8284,7 +8284,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"anyhow",
"chrono",
@@ -8309,7 +8309,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"anyhow",
"chrono",
@@ -8325,7 +8325,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"anyhow",
"chrono",
@@ -8345,7 +8345,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"anyhow",
"async-trait",
@@ -8400,7 +8400,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.153"
+version = "0.3.154"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -8410,7 +8410,6 @@ dependencies = [
"base64 0.22.1",
"chrono",
"cidre 0.14.1",
- "clap",
"core-foundation 0.10.1",
"core-graphics 0.24.0",
"image 0.25.9",
@@ -8428,7 +8427,6 @@ dependencies = [
"serde_json",
"tokio",
"tracing",
- "tracing-subscriber",
"uiautomation",
"url",
"windows 0.58.0",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 580034e0b..6b7e471a6 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.536"
+version = "2.0.537"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
index fa45902a0..6675b452c 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
@@ -327,11 +327,45 @@ impl AnalyticsManager {
&& (audio_status == "ok" || audio_status == "disabled")
&& (ui_status == "ok" || ui_status == "disabled");
+ // Extract pipeline quality metrics (no private data — only counts/rates/latencies)
+ let pipeline = &health["pipeline"];
+ let audio_pipeline = &health["audio_pipeline"];
+
Ok(json!({
"is_healthy": is_healthy,
"frame_status": frame_status,
"audio_status": audio_status,
- "ui_status": ui_status
+ "ui_status": ui_status,
+ // Vision pipeline quality
+ "pipeline_uptime_secs": pipeline["uptime_secs"].as_f64(),
+ "pipeline_frames_captured": pipeline["frames_captured"].as_u64(),
+ "pipeline_frames_dropped": pipeline["frames_dropped"].as_u64(),
+ "pipeline_frame_drop_rate": pipeline["frame_drop_rate"].as_f64(),
+ "pipeline_capture_fps": pipeline["capture_fps_actual"].as_f64(),
+ "pipeline_avg_ocr_latency_ms": pipeline["avg_ocr_latency_ms"].as_f64(),
+ "pipeline_avg_db_latency_ms": pipeline["avg_db_latency_ms"].as_f64(),
+ "pipeline_stall_count": pipeline["pipeline_stall_count"].as_u64(),
+ "pipeline_ocr_cache_hit_rate": pipeline["ocr_cache_hit_rate"].as_f64(),
+ // Audio pipeline quality
+ "audio_chunks_sent": audio_pipeline["chunks_sent"].as_u64(),
+ "audio_vad_passed": audio_pipeline["vad_passed"].as_u64(),
+ "audio_vad_rejected": audio_pipeline["vad_rejected"].as_u64(),
+ "audio_vad_passthrough_rate": audio_pipeline["vad_passthrough_rate"].as_f64(),
+ "audio_transcriptions_completed": audio_pipeline["transcriptions_completed"].as_u64(),
+ "audio_transcription_errors": audio_pipeline["transcription_errors"].as_u64(),
+ "audio_total_words": audio_pipeline["total_words"].as_u64(),
+ "audio_words_per_minute": audio_pipeline["words_per_minute"].as_f64(),
+ // Accessibility tree walker quality
+ "ax_walks_total": health["accessibility"]["walks_total"].as_u64(),
+ "ax_walks_stored": health["accessibility"]["walks_stored"].as_u64(),
+ "ax_walks_deduped": health["accessibility"]["walks_deduped"].as_u64(),
+ "ax_walks_truncated": health["accessibility"]["walks_truncated"].as_u64(),
+ "ax_truncation_rate": health["accessibility"]["truncation_rate"].as_f64(),
+ "ax_truncated_timeout": health["accessibility"]["walks_truncated_timeout"].as_u64(),
+ "ax_truncated_max_nodes": health["accessibility"]["walks_truncated_max_nodes"].as_u64(),
+ "ax_avg_walk_duration_ms": health["accessibility"]["avg_walk_duration_ms"].as_u64(),
+ "ax_avg_nodes_per_walk": health["accessibility"]["avg_nodes_per_walk"].as_u64(),
+ "ax_max_depth_reached": health["accessibility"]["max_depth_reached"].as_u64(),
}))
}
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
index f9e0b9a78..59c95c212 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -584,7 +584,8 @@ pub async fn show_shortcut_reminder(
info!("show_shortcut_reminder called");
// Window dimensions: 2-row layout (shortcuts + activity visualization)
- let window_width = 220.0;
+ // Keep tight — content is ~150px wide; extra space causes visible gap on some displays.
+ let window_width = 170.0;
let window_height = 40.0;
// Position at top center of the screen where the cursor is
@@ -685,14 +686,6 @@ pub async fn show_shortcut_reminder(
.shadow(false)
.resizable(false);
- // Hide title bar on macOS
- #[cfg(target_os = "macos")]
- {
- builder = builder
- .hidden_title(true)
- .title_bar_style(tauri::TitleBarStyle::Overlay);
- }
-
let window = builder
.build()
.map_err(|e| format!("Failed to create shortcut reminder window: {}", e))?;
diff --git a/crates/screenpipe-accessibility/src/tree/cache.rs b/crates/screenpipe-accessibility/src/tree/cache.rs
index 27237d3df..0b078f1bf 100644
--- a/crates/screenpipe-accessibility/src/tree/cache.rs
+++ b/crates/screenpipe-accessibility/src/tree/cache.rs
@@ -9,7 +9,7 @@
use std::collections::HashMap;
use std::time::{Duration, Instant};
-use super::{hamming_distance, TreeSnapshot};
+use super::{hamming_distance, TreeSnapshot, TruncationReason};
const MAX_ENTRIES: usize = 100;
const DEFAULT_TTL: Duration = Duration::from_secs(60);
@@ -106,6 +106,9 @@ mod tests {
walk_duration: Duration::from_millis(10),
content_hash: TreeSnapshot::compute_hash(text),
simhash: TreeSnapshot::compute_simhash(text),
+ truncated: false,
+ truncation_reason: TruncationReason::None,
+ max_depth_reached: 0,
}
}
diff --git a/crates/screenpipe-accessibility/src/tree/macos.rs b/crates/screenpipe-accessibility/src/tree/macos.rs
index 2f9c70e8b..ad5032c15 100644
--- a/crates/screenpipe-accessibility/src/tree/macos.rs
+++ b/crates/screenpipe-accessibility/src/tree/macos.rs
@@ -299,6 +299,9 @@ impl TreeWalkerPlatform for MacosTreeWalker {
walk_duration,
content_hash,
simhash,
+ truncated: state.truncated,
+ truncation_reason: state.truncation_reason,
+ max_depth_reached: state.max_depth_reached,
}))
}
}
@@ -313,6 +316,9 @@ struct WalkState {
walk_timeout: std::time::Duration,
element_timeout_secs: f32,
start: Instant,
+ truncated: bool,
+ truncation_reason: super::TruncationReason,
+ max_depth_reached: usize,
}
impl WalkState {
@@ -326,11 +332,28 @@ impl WalkState {
walk_timeout: config.walk_timeout,
element_timeout_secs: config.element_timeout_secs,
start,
+ truncated: false,
+ truncation_reason: super::TruncationReason::None,
+ max_depth_reached: 0,
}
}
- fn should_stop(&self) -> bool {
- self.node_count >= self.max_nodes || self.start.elapsed() >= self.walk_timeout
+ fn should_stop(&mut self) -> bool {
+ if self.node_count >= self.max_nodes {
+ if !self.truncated {
+ self.truncated = true;
+ self.truncation_reason = super::TruncationReason::MaxNodes;
+ }
+ return true;
+ }
+ if self.start.elapsed() >= self.walk_timeout {
+ if !self.truncated {
+ self.truncated = true;
+ self.truncation_reason = super::TruncationReason::Timeout;
+ }
+ return true;
+ }
+ false
}
}
@@ -383,6 +406,9 @@ fn walk_element(elem: &ax::UiElement, depth: usize, state: &mut WalkState) {
}
state.node_count += 1;
+ if depth > state.max_depth_reached {
+ state.max_depth_reached = depth;
+ }
// Set a per-element timeout to prevent IPC hangs
let _ = elem.set_messaging_timeout_secs(state.element_timeout_secs);
diff --git a/crates/screenpipe-accessibility/src/tree/mod.rs b/crates/screenpipe-accessibility/src/tree/mod.rs
index b9f96cccc..13b4861f3 100644
--- a/crates/screenpipe-accessibility/src/tree/mod.rs
+++ b/crates/screenpipe-accessibility/src/tree/mod.rs
@@ -27,6 +27,17 @@ pub struct AccessibilityTreeNode {
pub depth: u8,
}
+/// Why the tree walk stopped early (if it did).
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum TruncationReason {
+ /// Walk completed naturally — visited all reachable nodes.
+ None,
+ /// Hit the wall-clock timeout (`walk_timeout`).
+ Timeout,
+ /// Hit the maximum node count (`max_nodes`).
+ MaxNodes,
+}
+
/// A snapshot of all visible text from the focused window's accessibility tree.
#[derive(Debug, Clone)]
pub struct TreeSnapshot {
@@ -42,6 +53,12 @@ pub struct TreeSnapshot {
pub content_hash: u64,
/// Locality-sensitive hash for fuzzy dedup (similar text → small hamming distance).
pub simhash: u64,
+ /// Whether the walk was truncated before visiting all nodes.
+ pub truncated: bool,
+ /// Why the walk stopped (timeout, max_nodes, or completed naturally).
+ pub truncation_reason: TruncationReason,
+ /// Deepest depth reached during the walk.
+ pub max_depth_reached: usize,
}
impl TreeSnapshot {
@@ -106,7 +123,7 @@ pub struct TreeWalkerConfig {
pub max_depth: usize,
/// Maximum number of AX elements to visit per walk (default: 5000).
pub max_nodes: usize,
- /// Maximum wall-clock time for a single walk (default: 100ms).
+ /// Maximum wall-clock time for a single walk (default: 250ms).
pub walk_timeout: Duration,
/// Maximum text length to accumulate (default: 50_000 chars).
pub max_text_length: usize,
@@ -124,7 +141,7 @@ impl Default for TreeWalkerConfig {
walk_interval: Duration::from_secs(3),
max_depth: 30,
max_nodes: 5000,
- walk_timeout: Duration::from_millis(100),
+ walk_timeout: Duration::from_millis(250),
max_text_length: 50_000,
element_timeout_secs: 0.2,
ignored_windows: Vec::new(),
@@ -191,7 +208,7 @@ mod tests {
assert_eq!(config.walk_interval, Duration::from_secs(3));
assert_eq!(config.max_depth, 30);
assert_eq!(config.max_nodes, 5000);
- assert_eq!(config.walk_timeout, Duration::from_millis(100));
+ assert_eq!(config.walk_timeout, Duration::from_millis(250));
assert_eq!(config.max_text_length, 50_000);
}
diff --git a/crates/screenpipe-accessibility/src/tree/windows.rs b/crates/screenpipe-accessibility/src/tree/windows.rs
index 2e1bc3213..3de94b6fc 100644
--- a/crates/screenpipe-accessibility/src/tree/windows.rs
+++ b/crates/screenpipe-accessibility/src/tree/windows.rs
@@ -241,6 +241,7 @@ impl TreeWalkerPlatform for WindowsTreeWalker {
walk_duration
);
+ // Windows walker doesn't have timeout-based truncation yet — report as complete
Ok(Some(TreeSnapshot {
app_name,
window_name,
@@ -252,6 +253,9 @@ impl TreeWalkerPlatform for WindowsTreeWalker {
walk_duration,
content_hash,
simhash,
+ truncated: false,
+ truncation_reason: super::TruncationReason::None,
+ max_depth_reached: 0,
}))
}
}
diff --git a/crates/screenpipe-server/src/routes/health.rs b/crates/screenpipe-server/src/routes/health.rs
index 897b704c6..ecebb7efe 100644
--- a/crates/screenpipe-server/src/routes/health.rs
+++ b/crates/screenpipe-server/src/routes/health.rs
@@ -14,6 +14,7 @@ use std::time::Duration;
use tracing::{debug, warn};
use crate::server::AppState;
+use crate::ui_recorder::{tree_walker_snapshot, TreeWalkerSnapshot};
use screenpipe_vision::monitor::{
get_cached_monitor_descriptions, get_monitor_by_id, list_monitors, list_monitors_detailed,
@@ -47,6 +48,8 @@ pub struct HealthCheckResponse {
pub pipeline: Option<PipelineHealthInfo>,
#[serde(skip_serializing_if = "Option::is_none")]
pub audio_pipeline: Option<AudioPipelineHealthInfo>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub accessibility: Option<TreeWalkerSnapshot>,
}
#[derive(Serialize, OaSchema, Deserialize)]
@@ -380,6 +383,14 @@ pub async fn health_check(State(state): State<Arc<AppState>>) -> JsonResponse<He
device_status_details,
monitors,
pipeline,
+ accessibility: {
+ let snap = tree_walker_snapshot();
+ if snap.walks_total > 0 {
+ Some(snap)
+ } else {
+ None
+ }
+ },
audio_pipeline: if !state.audio_disabled {
let is_paused = state
.audio_manager
diff --git a/crates/screenpipe-server/src/ui_recorder.rs b/crates/screenpipe-server/src/ui_recorder.rs
index bbfb38ac6..1158a6584 100644
--- a/crates/screenpipe-server/src/ui_recorder.rs
+++ b/crates/screenpipe-server/src/ui_recorder.rs
@@ -9,7 +9,9 @@
#[cfg(feature = "ui-events")]
use anyhow::Result;
#[cfg(feature = "ui-events")]
-use screenpipe_accessibility::tree::{cache::TreeCache, create_tree_walker, TreeWalkerConfig};
+use screenpipe_accessibility::tree::{
+ cache::TreeCache, create_tree_walker, TreeWalkerConfig, TruncationReason,
+};
#[cfg(feature = "ui-events")]
use screenpipe_accessibility::{UiCaptureConfig, UiRecorder};
#[cfg(feature = "ui-events")]
@@ -136,6 +138,39 @@ impl UiRecorderConfig {
}
}
+/// Point-in-time snapshot of tree walker health metrics (no private data).
+#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize, oasgen::OaSchema)]
+pub struct TreeWalkerSnapshot {
+ pub walks_total: u64,
+ pub walks_stored: u64,
+ pub walks_deduped: u64,
+ pub walks_empty: u64,
+ pub walks_error: u64,
+ pub walks_truncated: u64,
+ pub walks_truncated_timeout: u64,
+ pub walks_truncated_max_nodes: u64,
+ pub truncation_rate: f64,
+ pub avg_walk_duration_ms: u64,
+ pub max_walk_duration_ms: u64,
+ pub avg_nodes_per_walk: u64,
+ pub max_depth_reached: u64,
+ pub total_text_chars: u64,
+}
+
+/// Global shared tree walker metrics — updated every 60s by the walker thread,
+/// readable from the health endpoint. Uses the same global-static pattern as
+/// `LAST_AUDIO_CAPTURE` in screenpipe-audio.
+static TREE_WALKER_METRICS: std::sync::LazyLock<std::sync::Mutex<TreeWalkerSnapshot>> =
+ std::sync::LazyLock::new(|| std::sync::Mutex::new(TreeWalkerSnapshot::default()));
+
+/// Read the latest tree walker metrics snapshot.
+pub fn tree_walker_snapshot() -> TreeWalkerSnapshot {
+ TREE_WALKER_METRICS
+ .lock()
+ .map(|g| g.clone())
+ .unwrap_or_default()
+}
+
/// Handle for managing the UI recorder
#[cfg(feature = "ui-events")]
pub struct UiRecorderHandle {
@@ -425,9 +460,14 @@ struct TreeWalkerMetrics {
walks_empty: u64,
walks_error: u64,
walks_immediate: u64,
+ walks_truncated: u64,
+ walks_truncated_timeout: u64,
+ walks_truncated_max_nodes: u64,
total_walk_duration_ms: u64,
max_walk_duration_ms: u64,
total_text_chars: u64,
+ total_nodes: u64,
+ max_depth_reached: u64,
last_report: std::time::Instant,
}
@@ -441,9 +481,14 @@ impl TreeWalkerMetrics {
walks_empty: 0,
walks_error: 0,
walks_immediate: 0,
+ walks_truncated: 0,
+ walks_truncated_timeout: 0,
+ walks_truncated_max_nodes: 0,
total_walk_duration_ms: 0,
max_walk_duration_ms: 0,
total_text_chars: 0,
+ total_nodes: 0,
+ max_depth_reached: 0,
last_report: std::time::Instant::now(),
}
}
@@ -451,12 +496,38 @@ impl TreeWalkerMetrics {
fn report_if_due(&mut self) {
if self.last_report.elapsed() >= Duration::from_secs(60) && self.walks_total > 0 {
let avg_ms = self.total_walk_duration_ms / self.walks_total.max(1);
+ let avg_nodes = self.total_nodes / self.walks_total.max(1);
+ let truncation_rate = self.walks_truncated as f64 / self.walks_total as f64;
+ let truncation_pct = (truncation_rate * 100.0) as u64;
info!(
- "tree walker stats (last 60s): walks={}, stored={}, deduped={}, empty={}, errors={}, immediate={}, avg_walk={}ms, max_walk={}ms, total_chars={}",
+ "tree walker stats (last 60s): walks={}, stored={}, deduped={}, empty={}, errors={}, immediate={}, avg_walk={}ms, max_walk={}ms, total_chars={}, avg_nodes={}, max_depth={}, truncated={}% ({} timeout, {} max_nodes)",
self.walks_total, self.walks_stored, self.walks_deduped,
self.walks_empty, self.walks_error, self.walks_immediate,
- avg_ms, self.max_walk_duration_ms, self.total_text_chars
+ avg_ms, self.max_walk_duration_ms, self.total_text_chars,
+ avg_nodes, self.max_depth_reached, truncation_pct,
+ self.walks_truncated_timeout, self.walks_truncated_max_nodes
);
+
+ // Publish snapshot to global for health endpoint / PostHog
+ if let Ok(mut snap) = TREE_WALKER_METRICS.lock() {
+ *snap = TreeWalkerSnapshot {
+ walks_total: self.walks_total,
+ walks_stored: self.walks_stored,
+ walks_deduped: self.walks_deduped,
+ walks_empty: self.walks_empty,
+ walks_error: self.walks_error,
+ walks_truncated: self.walks_truncated,
+ walks_truncated_timeout: self.walks_truncated_timeout,
+ walks_truncated_max_nodes: self.walks_truncated_max_nodes,
+ truncation_rate,
+ avg_walk_duration_ms: avg_ms,
+ max_walk_duration_ms: self.max_walk_duration_ms,
+ avg_nodes_per_walk: avg_nodes,
+ max_depth_reached: self.max_depth_reached,
+ total_text_chars: self.total_text_chars,
+ };
+ }
+
*self = Self::new();
}
}
@@ -511,6 +582,18 @@ fn run_tree_walker(
let walk_ms = snap.walk_duration.as_millis() as u64;
metrics.total_walk_duration_ms += walk_ms;
metrics.max_walk_duration_ms = metrics.max_walk_duration_ms.max(walk_ms);
+ metrics.total_nodes += snap.node_count as u64;
+ if snap.max_depth_reached as u64 > metrics.max_depth_reached {
+ metrics.max_depth_reached = snap.max_depth_reached as u64;
+ }
+ if snap.truncated {
+ metrics.walks_truncated += 1;
+ match snap.truncation_reason {
+ TruncationReason::Timeout => metrics.walks_truncated_timeout += 1,
+ TruncationReason::MaxNodes => metrics.walks_truncated_max_nodes += 1,
+ TruncationReason::None => {}
+ }
+ }
if cache.should_store(&snap) {
metrics.total_text_chars += snap.text_content.len() as u64;