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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: show pipes and unaccounted storage in disk usage breakdown
Louis Beaumont1fad6c75e7b4
diff --git a/apps/screenpipe-app-tauri/components/settings/disk-usage-section.tsx b/apps/screenpipe-app-tauri/components/settings/disk-usage-section.tsxindex 6dd8caf21..0d8509fbc 100644--- a/apps/screenpipe-app-tauri/components/settings/disk-usage-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/disk-usage-section.tsx@@ -193,6 +193,16 @@ export function DiskUsageSection() {{diskUsage?.other?.logs_size?.includes("GB") && (<p className="text-[11px] text-destructive mt-1">⚠️ Logs are large. Delete old ones at ~/.screenpipe/*.log</p>)}+ <div className="flex items-center justify-between text-xs">+ <span className="text-muted-foreground">Pipes</span>+ <span className="font-medium">{diskUsage?.other?.pipes_size || "0 KB"}</span>+ </div>+ {diskUsage?.other?.other_size && diskUsage.other.other_size !== "0 B" && (+ <div className="flex items-center justify-between text-xs">+ <span className="text-muted-foreground">Other</span>+ <span className="font-medium">{diskUsage.other.other_size}</span>+ </div>+ )}</div>)}</CardContent>diff --git a/apps/screenpipe-app-tauri/src-tauri/src/disk_usage.rs b/apps/screenpipe-app-tauri/src-tauri/src/disk_usage.rsindex 1919bf48e..380c91a9e 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/disk_usage.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/disk_usage.rs@@ -41,6 +41,8 @@ pub struct DiskUsedByMedia {pub struct DiskUsedByOther {pub database_size: String,pub logs_size: String,+ pub pipes_size: String,+ pub other_size: String,}#[derive(Debug, Serialize, Deserialize, Clone)]@@ -286,6 +288,22 @@ pub async fn disk_usage(}info!("Logs size: {} bytes", logs_size);+ // Calculate pipes size+ let pipes_size: u64 = {+ let pipes_dir = screenpipe_dir.join("pipes");+ if pipes_dir.exists() {+ directory_size(&pipes_dir).map_err(|e| e.to_string())?.unwrap_or(0)+ } else {+ 0+ }+ };+ info!("Pipes size: {} bytes", pipes_size);++ // Calculate "other" — everything not accounted for above+ let accounted = total_media_size_calculated + database_size + logs_size + pipes_size;+ let other_size: u64 = total_data_size_bytes.saturating_sub(accounted);+ info!("Other size: {} bytes (total {} - accounted {})", other_size, total_data_size_bytes, accounted);+// Calculate available spaceinfo!("Calculating available disk space");let available_space = {@@ -345,6 +363,8 @@ pub async fn disk_usage(other: DiskUsedByOther {database_size: readable(database_size),logs_size: readable(logs_size),+ pipes_size: readable(pipes_size),+ other_size: readable(other_size),},total_data_size,total_cache_size,