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: revert health check

Louis Beaumont54e74fa823e3
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index ecf3a239e..a5cead391 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -51,11 +51,11 @@ jobs:
matrix:
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
- args: "--target aarch64-apple-darwin --features metal"
+ args: "--target aarch64-apple-darwin --features metal,beta"
target: aarch64-apple-darwin
tauri-args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
- args: "--target x86_64-apple-darwin --features metal"
+ args: "--target x86_64-apple-darwin --features metal,beta"
target: x86_64-apple-darwin
tauri-args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04" # Ubuntu x86_64
diff --git a/screenpipe-app-tauri/components/screenpipe-status.tsx b/screenpipe-app-tauri/components/screenpipe-status.tsx
index 9bd313fbe..b4088fac4 100644
--- a/screenpipe-app-tauri/components/screenpipe-status.tsx
+++ b/screenpipe-app-tauri/components/screenpipe-status.tsx
@@ -134,7 +134,6 @@ const DevModeSettings = () => {
};
const [isLoading, setIsLoading] = useState(false);
const { toast } = useToast();
- const { forceRestartHealthCheck } = useHealthCheck();
useEffect(() => {
setLocalSettings(settings);
@@ -150,7 +149,6 @@ const DevModeSettings = () => {
try {
await invoke("spawn_screenpipe");
await new Promise((resolve) => setTimeout(resolve, 2000));
- forceRestartHealthCheck(); // Add this line
toastId.update({
id: toastId.id,
title: "screenpipe started",
@@ -182,7 +180,6 @@ const DevModeSettings = () => {
try {
await invoke("kill_all_sreenpipes");
await new Promise((resolve) => setTimeout(resolve, 2000));
- forceRestartHealthCheck(); // Add this line
toastId.update({
id: toastId.id,
title: "screenpipe stopped",
diff --git a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx b/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
index 7539b5266..0355394c1 100644
--- a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
+++ b/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect, useCallback } from "react";
+import { useState, useEffect } from "react";
interface HealthCheckResponse {
status: string;
@@ -15,9 +15,8 @@ export function useHealthCheck() {
const [isServerDown, setIsServerDown] = useState(false);
const baseCheckInterval = 5000; // 5 seconds
const maxCheckInterval = 60000; // 1 minute
- const [restartKey, setRestartKey] = useState(0);
- const fetchHealth = useCallback(async () => {
+ const fetchHealth = async () => {
try {
const response = await fetch("http://localhost:3030/health");
if (!response.ok) {
@@ -47,11 +46,7 @@ export function useHealthCheck() {
});
}
}
- }, [health, isServerDown]);
-
- const forceRestartHealthCheck = useCallback(() => {
- setRestartKey((prevKey) => prevKey + 1);
- }, []);
+ };
useEffect(() => {
fetchHealth();
@@ -63,7 +58,7 @@ export function useHealthCheck() {
);
return () => clearInterval(interval);
- }, [isServerDown, fetchHealth, restartKey]);
+ }, [isServerDown]);
- return { health, isServerDown, forceRestartHealthCheck };
-}
+ return { health, isServerDown };
+}
\ No newline at end of file
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 4a13baf30..50a6ca2db 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.5.96"
+version = "0.5.97"
description = ""
authors = ["you"]
license = ""