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
release-app tune health check ph
Louis Beaumontb7d504686c61
diff --git a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx b/screenpipe-app-tauri/lib/hooks/use-health-check.tsxindex 9b83ba4d6..a7e6eaae3 100644--- a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx+++ b/screenpipe-app-tauri/lib/hooks/use-health-check.tsx@@ -64,6 +64,8 @@ export function useHealthCheck() {const [isLoading, setIsLoading] = useState(false);const abortControllerRef = useRef<AbortController | null>(null);const healthRef = useRef(health);+ const previousHealthStatus = useRef<string | null>(null);+ const unhealthyTransitionsRef = useRef<number>(0);const fetchHealth = useCallback(async () => {if (abortControllerRef.current) {@@ -97,16 +99,24 @@ export function useHealthCheck() {if (data.status === "unhealthy" &&- shouldSendPosthogEvent("health_check_unhealthy")+ previousHealthStatus.current === "healthy") {- posthog.capture("health_check_unhealthy", {- frame_status: data.frame_status,- audio_status: data.audio_status,- ui_status: data.ui_status,- message: data.message,- });+ unhealthyTransitionsRef.current += 1;++ if (shouldSendPosthogEvent("health_check_unhealthy")) {+ posthog.capture("health_check_unhealthy", {+ frame_status: data.frame_status,+ audio_status: data.audio_status,+ ui_status: data.ui_status,+ message: data.message,+ transitions_since_last_event: unhealthyTransitionsRef.current,+ });+ unhealthyTransitionsRef.current = 0;+ }}+ previousHealthStatus.current = data.status;+if (isHealthChanged(healthRef.current, data)) {setHealth(data);healthRef.current = data;diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex c3da9d200..07f3ad03c 100644--- a/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "0.31.2"+version = "0.31.3"description = ""authors = ["you"]license = ""