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.554

Louis Beaumont2250a142c165
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
index 5f93303c5..d2deaa5cb 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline.tsx
@@ -1847,6 +1847,8 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {
isSameDay(new Date(f.timestamp), targetDate)
);
if (hasTargetDayFrames) {
+ // Use HTTP JPEG fallback + prevent highlight dismiss during search nav
+ setSearchNavFrame(true);
jumpToTime(targetDate);
pendingNavigationRef.current = null;
setSeekingTimestamp(null);
@@ -1874,6 +1876,8 @@ export default function Timeline({ embedded = false }: { embedded?: boolean }) {
isSameDay(new Date(f.timestamp), targetDate)
);
if (hasTargetDayFrames) {
+ // Use HTTP JPEG fallback + prevent highlight dismiss during search nav
+ setSearchNavFrame(true);
jumpToTime(targetDate);
pendingNavigationRef.current = null;
setSeekingTimestamp(null);
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
index ae5c060b6..07e4c207f 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
@@ -425,21 +425,27 @@ export const TimelineSlider = ({
};
visibleFrames.forEach((frame) => {
- const appName = getFrameAppName(frame);
+ let appName = getFrameAppName(frame);
const allAppsInFrame = getFrameAppNames(frame);
const frameDate = new Date(frame.timestamp);
const dayKey = frameDate.toDateString();
+ // Carry forward previous app for "Unknown" frames (capture missed metadata)
+ if (appName === "Unknown" && currentApp && currentApp !== "Unknown") {
+ appName = currentApp;
+ }
+
// Break group at day boundary OR app change
if ((currentDayKey && dayKey !== currentDayKey) || appName !== currentApp) {
flushGroup();
currentApp = appName;
currentGroup = [frame];
- currentGroupAllApps = new Set(allAppsInFrame);
+ currentGroupAllApps = new Set(allAppsInFrame.filter(n => n !== "Unknown"));
+ if (currentApp !== "Unknown") currentGroupAllApps.add(currentApp);
currentDayKey = dayKey;
} else {
currentGroup.push(frame);
- allAppsInFrame.forEach(app => currentGroupAllApps.add(app));
+ allAppsInFrame.filter(n => n !== "Unknown").forEach(app => currentGroupAllApps.add(app));
if (!currentDayKey) currentDayKey = dayKey;
}
});
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
index 4e07daf38..9097aa7cb 100644
--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx
@@ -367,6 +367,18 @@ function createSettingsStore() {
needsUpdate = true;
}
+ // Always override platform with runtime detection — never trust persisted value.
+ // Platform can be "unknown" if it was saved during SSR or before Tauri was ready.
+ try {
+ const detectedPlatform = platform();
+ if (settings.platform !== detectedPlatform) {
+ settings.platform = detectedPlatform;
+ needsUpdate = true;
+ }
+ } catch {
+ // platform() unavailable (SSR/tests) — keep existing value
+ }
+
// Migration: Default Pro subscribers to cloud transcription (one-time only)
if (settings.user?.cloud_subscribed && !(settings as any)._proCloudMigrationDone) {
// Switch audio transcription to cloud if still on local default
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index a51d98aed..0e6e3a26a 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.552"
+version = "2.0.553"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 1b029bb55..e60c137d2 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.553"
+version = "2.0.554"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
index 655b57981..1061f7b9a 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/embedded_server.rs
@@ -124,6 +124,14 @@ pub async fn start_embedded_server(
.to_audio_manager_builder(data_path.clone(), audio_devices.clone())
.transcription_mode(config.transcription_mode.clone());
+ // When audio is disabled, override transcription engine to Disabled.
+ // This downloads a 40MB tiny placeholder instead of the 834MB default model.
+ // The AudioManager type still requires a model path, but it's never used for inference.
+ if config.disable_audio {
+ audio_manager_builder = audio_manager_builder
+ .transcription_engine(AudioTranscriptionEngine::Disabled);
+ }
+
if let Some(ref detector) = meeting_detector {
audio_manager_builder = audio_manager_builder.meeting_detector(detector.clone());
}
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 2bfb0815d..cb3865570 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -1255,7 +1255,7 @@ async fn main() {
let recording_state = RecordingState {
handle: Arc::new(tokio::sync::Mutex::new(None)),
- is_starting: AtomicBool::new(false),
+ is_starting: Arc::new(AtomicBool::new(false)),
};
let pi_state = pi::PiState(Arc::new(tokio::sync::Mutex::new(None)));
let obsidian_sync_state = obsidian_sync::ObsidianSyncState::new();
@@ -1670,6 +1670,10 @@ async fn main() {
{
let store_for_download = store.clone();
tauri::async_runtime::spawn(async move {
+ if store_for_download.disable_audio {
+ info!("audio disabled — skipping model pre-downloads");
+ return;
+ }
// Determine which whisper model the user's config needs
let engine = match store_for_download.audio_transcription_engine.as_str() {
"deepgram" | "screenpipe-cloud" => None, // Cloud engines don't need local model
@@ -1810,7 +1814,8 @@ async fn main() {
// Mark as starting BEFORE spawning thread — prevents race with frontend spawn_screenpipe
recording_state.is_starting.store(true, std::sync::atomic::Ordering::SeqCst);
let recording_state_inner = recording_state.handle.clone();
-
+ let is_starting_clone = recording_state.is_starting.clone();
+
// Spawn a dedicated thread for the server with its own runtime
// This prevents CPU contention between UI and recording workloads
std::thread::Builder::new()
@@ -1843,7 +1848,7 @@ async fn main() {
if server_running {
info!("Server already running, skipping embedded server start");
- return;
+ return; // is_starting stays true — the running server is fine
}
// Check permissions before starting
@@ -1852,6 +1857,7 @@ async fn main() {
if !permissions_check.screen_recording.permitted() {
warn!("Screen recording permission not granted: {:?}. Server will not start.", permissions_check.screen_recording);
+ is_starting_clone.store(false, std::sync::atomic::Ordering::SeqCst);
return;
}
@@ -1886,6 +1892,7 @@ async fn main() {
}
Err(e) => {
error!("Failed to start embedded server: {}", e);
+ is_starting_clone.store(false, std::sync::atomic::Ordering::SeqCst);
}
}
});
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/recording.rs b/apps/screenpipe-app-tauri/src-tauri/src/recording.rs
index a7acb382b..ba4710dbd 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/recording.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/recording.rs
@@ -17,7 +17,7 @@ use tracing::{debug, error, info, warn};
pub struct RecordingState {
pub handle: Arc<Mutex<Option<EmbeddedServerHandle>>>,
/// True while a server start is in progress (prevents race between main.rs boot and frontend)
- pub is_starting: AtomicBool,
+ pub is_starting: Arc<AtomicBool>,
}
#[derive(Debug, Serialize, Deserialize, Clone, specta::Type)]
@@ -162,7 +162,24 @@ pub async fn spawn_screenpipe(
}
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
}
- warn!("In-flight server start didn't produce healthy server after 15s, proceeding with our own start");
+ warn!("In-flight server start didn't produce healthy server after 15s");
+ {
+ let handle_guard = state.handle.lock().await;
+ if handle_guard.is_some() {
+ // Handle exists — server started but health endpoint is slow (e.g., model download).
+ // Do NOT start a duplicate server.
+ info!("Server handle exists after timeout — not starting duplicate");
+ return Ok(());
+ }
+ }
+ // No handle → the in-flight start failed. Reset flag so we can retry.
+ info!("No server handle after 15s — previous start likely failed, retrying");
+ state.is_starting.store(false, Ordering::SeqCst);
+ // Re-acquire flag atomically for our attempt
+ if state.is_starting.swap(true, Ordering::SeqCst) {
+ // Yet another caller snuck in — defer to them
+ return Ok(());
+ }
}
// Check if we already own a running server
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/suggestions.rs b/apps/screenpipe-app-tauri/src-tauri/src/suggestions.rs
index ae77f95a5..22f87c622 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/suggestions.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/suggestions.rs
@@ -640,8 +640,9 @@ async fn build_activity_context(
// 2. Window titles (~400 chars)
parts.push("Windows:".to_string());
for w in windows.iter().take(6) {
- let title = if w.window_name.len() > 50 {
- format!("{}...", &w.window_name[..47])
+ let title = if w.window_name.chars().count() > 50 {
+ let truncated: String = w.window_name.chars().take(47).collect();
+ format!("{}...", truncated)
} else {
w.window_name.clone()
};
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/voice_training.rs b/apps/screenpipe-app-tauri/src-tauri/src/voice_training.rs
index 064bd70c9..3922e67fb 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/voice_training.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/voice_training.rs
@@ -5,7 +5,6 @@
use std::sync::atomic::{AtomicBool, Ordering};
use tracing::{error, info, warn};
-const API: &str = "http://localhost:3030";
const POLL_INTERVAL_SECS: u64 = 15;
const MAX_ATTEMPTS: u32 = 40; // 40 * 15s = 10 minutes
@@ -17,6 +16,7 @@ static TRAINING_IN_PROGRESS: AtomicBool = AtomicBool::new(false);
#[tauri::command]
#[specta::specta]
pub async fn train_voice(
+ app: tauri::AppHandle,
name: String,
start_time: String,
end_time: String,
@@ -26,6 +26,12 @@ pub async fn train_voice(
return Err("name is required".into());
}
+ let store = crate::store::SettingsStore::get(&app).ok().flatten().unwrap_or_default();
+ if store.disable_audio {
+ return Err("voice training requires audio recording, but audio is disabled in settings".into());
+ }
+ let port = store.port;
+
if TRAINING_IN_PROGRESS.swap(true, Ordering::SeqCst) {
return Err("voice training already in progress".into());
}
@@ -36,7 +42,7 @@ pub async fn train_voice(
);
tokio::spawn(async move {
- let result = poll_and_assign(&name, &start_time, &end_time).await;
+ let result = poll_and_assign(&name, &start_time, &end_time, port).await;
TRAINING_IN_PROGRESS.store(false, Ordering::SeqCst);
match result {
Ok(n) => info!("voice training complete for '{}': assigned {} chunks", name, n),
@@ -50,13 +56,14 @@ pub async fn train_voice(
/// Poll the search API until input-device audio appears in the time window,
/// then reassign those chunks to the given speaker name.
/// Returns the number of chunks assigned.
-async fn poll_and_assign(name: &str, start_time: &str, end_time: &str) -> Result<u32, String> {
+async fn poll_and_assign(name: &str, start_time: &str, end_time: &str, port: u16) -> Result<u32, String> {
let client = reqwest::Client::new();
+ let api = format!("http://localhost:{}", port);
for attempt in 1..=MAX_ATTEMPTS {
tokio::time::sleep(std::time::Duration::from_secs(POLL_INTERVAL_SECS)).await;
- let chunk_ids = match fetch_input_chunks(&client, start_time, end_time).await {
+ let chunk_ids = match fetch_input_chunks(&client, &api, start_time, end_time).await {
Ok(ids) => ids,
Err(e) => {
warn!(
@@ -83,7 +90,7 @@ async fn poll_and_assign(name: &str, start_time: &str, end_time: &str) -> Result
chunk_ids.len()
);
- let assigned = assign_chunks(&client, &chunk_ids, name).await;
+ let assigned = assign_chunks(&client, &api, &chunk_ids, name).await;
return Ok(assigned);
}
@@ -97,12 +104,13 @@ async fn poll_and_assign(name: &str, start_time: &str, end_time: &str) -> Result
/// Fetch input-device audio chunk IDs from the search API for the given time window.
async fn fetch_input_chunks(
client: &reqwest::Client,
+ api: &str,
start_time: &str,
end_time: &str,
) -> Result<Vec<i64>, String> {
let url = format!(
"{}/search?content_type=audio&start_time={}&end_time={}&limit=50",
- API, start_time, end_time
+ api, start_time, end_time
);
let resp = client.get(&url).send().await.map_err(|e| e.to_string())?;
@@ -123,11 +131,11 @@ async fn fetch_input_chunks(
}
/// Reassign audio chunks to the given speaker name. Returns count of successes.
-async fn assign_chunks(client: &reqwest::Client, chunk_ids: &[i64], name: &str) -> u32 {
+async fn assign_chunks(client: &reqwest::Client, api: &str, chunk_ids: &[i64], name: &str) -> u32 {
let mut assigned = 0u32;
for chunk_id in chunk_ids {
let res = client
- .post(format!("{}/speakers/reassign", API))
+ .post(format!("{}/speakers/reassign", api))
.json(&serde_json::json!({
"audio_chunk_id": chunk_id,
"new_speaker_name": name,
@@ -153,16 +161,6 @@ async fn assign_chunks(client: &reqwest::Client, chunk_ids: &[i64], name: &str)
mod tests {
use super::*;
- #[test]
- fn test_empty_name_rejected() {
- let rt = tokio::runtime::Runtime::new().unwrap();
- let result = rt.block_on(train_voice(" ".into(), "t0".into(), "t1".into()));
- assert!(result.is_err());
- assert_eq!(result.unwrap_err(), "name is required");
- // reset for other tests
- TRAINING_IN_PROGRESS.store(false, Ordering::SeqCst);
- }
-
#[test]
fn test_concurrent_training_guard() {
// simulate a training in progress