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 improve the flow when screenpipe is down
Louis Beaumontccfcb227b837
diff --git a/screenpipe-app-tauri/bun.lockb b/screenpipe-app-tauri/bun.lockbindex a9bf0ff80..25dc0d1dc 100755Binary files a/screenpipe-app-tauri/bun.lockb and b/screenpipe-app-tauri/bun.lockb differdiff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsxindex e0f684e69..f1b45b82c 100644--- a/screenpipe-app-tauri/components/pipe-store.tsx+++ b/screenpipe-app-tauri/components/pipe-store.tsx@@ -42,6 +42,7 @@ import { Progress } from "@/components/ui/progress";import supabase from "@/lib/supabase/client";import { CreditPurchaseDialog } from "./store/credit-purchase-dialog";import localforage from "localforage";+import { useStatusDialog } from "@/lib/hooks/use-status-dialog";export interface Pipe {enabled: boolean;@@ -296,6 +297,7 @@ const PipeStore: React.FC = () => {const [brokenPipes, setBrokenPipes] = useState<BrokenPipe[]>([]);const MAX_STARTUP_ATTEMPTS = 20; // Will give up after ~20 seconds (20 attempts * 2 second interval)const [coreReadmes, setCoreReadmes] = useState<Record<string, string>>({});+ const { open: openStatusDialog } = useStatusDialog();useEffect(() => {fetchInstalledPipes();@@ -1462,11 +1464,19 @@ const PipeStore: React.FC = () => {const renderEmptyState = () => {return (<div className="flex flex-col items-center justify-center h-screen p-4 space-y-4">- <div className="text-center space-y-2">- <h3 className="text-lg font-medium">screenpipe is not running</h3>+ <div className="text-center space-y-4">+ <h3 className="text-lg font-medium">screenpipe is not recording</h3><p className="text-sm text-muted-foreground">please start the screenpipe service to browse and manage pipes</p>+ <Button+ variant="outline"+ onClick={openStatusDialog}+ className="gap-2"+ >+ <Power className="h-4 w-4" />+ check service status+ </Button></div></div>);diff --git a/screenpipe-app-tauri/components/screenpipe-status.tsx b/screenpipe-app-tauri/components/screenpipe-status.tsxindex 2c187d172..ea7defed3 100644--- a/screenpipe-app-tauri/components/screenpipe-status.tsx+++ b/screenpipe-app-tauri/components/screenpipe-status.tsx@@ -6,28 +6,22 @@ import {DialogHeader,DialogTitle,} from "@/components/ui/dialog";-import { platform } from "@tauri-apps/plugin-os";import { Badge } from "./ui/badge";import { invoke } from "@tauri-apps/api/core";-import { toast, useToast } from "./ui/use-toast";+import { toast } from "./ui/use-toast";import { Button } from "./ui/button";import { Separator } from "./ui/separator";import { useHealthCheck } from "@/lib/hooks/use-health-check";-import { Lock, Folder, Activity } from "lucide-react";-import { open } from "@tauri-apps/plugin-shell";-import LogViewer from "./log-viewer-v2";-import {- Collapsible,- CollapsibleContent,- CollapsibleTrigger,-} from "@/components/ui/collapsible";+import { Lock, Folder, Activity, Power } from "lucide-react";+import { open as openUrl } from "@tauri-apps/plugin-shell";+import { LogFileButton } from "./log-file-button";import { DevModeSettings } from "./dev-mode-settings";-import { Loader2 } from "lucide-react";import { cn } from "@/lib/utils";import { Check, X } from "lucide-react";import { useSettings } from "@/lib/hooks/use-settings";+import { useStatusDialog } from "@/lib/hooks/use-status-dialog";type PermissionsStatus = {screenRecording: string;@@ -36,21 +30,14 @@ type PermissionsStatus = {};const HealthStatus = ({ className }: { className?: string }) => {- const { health, debouncedFetchHealth } = useHealthCheck();- const [isDialogOpen, setIsDialogOpen] = useState(false);- const [isMac, setIsMac] = useState(false);+ const { health } = useHealthCheck();+ const { isOpen, open, close } = useStatusDialog();const { settings, getDataDir } = useSettings();const [localDataDir, setLocalDataDir] = useState("");- const [isLogOpen, setIsLogOpen] = useState(false);- const [isDialogLoading, setIsDialogLoading] = useState(false);const [permissions, setPermissions] = useState<PermissionsStatus | null>(null);- useEffect(() => {- setIsMac(platform() === "macos");- }, []);-useEffect(() => {const checkPermissions = async () => {try {@@ -73,7 +60,7 @@ const HealthStatus = ({ className }: { className?: string }) => {const handleOpenDataDir = async () => {try {const dataDir = await getDataDir();- await open(dataDir);+ await openUrl(dataDir);} catch (error) {console.error("failed to open data directory:", error);toast({@@ -148,10 +135,9 @@ const HealthStatus = ({ className }: { className?: string }) => {const handleOpenStatusDialog = async () => {try {- setIsDialogLoading(true);const dir = await getDataDir();setLocalDataDir(dir);- setIsDialogOpen(true);+ open();} catch (error) {console.error("failed to open status dialog:", error);toast({@@ -160,8 +146,6 @@ const HealthStatus = ({ className }: { className?: string }) => {variant: "destructive",duration: 3000,});- } finally {- setIsDialogLoading(false);}};@@ -232,14 +216,15 @@ const HealthStatus = ({ className }: { className?: string }) => {)}onClick={handleOpenStatusDialog}>- <Activity className="mr-2 h-4 w-4" />+ {/* <Activity className="mr-2 h-4 w-4" /> */}+ <Power className="mr-2 h-4 w-4" /><spanclassName={`ml-1 w-2 h-2 rounded-full ${statusColor} inline-block ${statusColor === "bg-red-500" ? "animate-pulse" : ""}`}/></Badge>- <Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>+ <Dialog open={isOpen} onOpenChange={close}><DialogContentclassName="max-w-4xl max-h-[90vh] flex flex-col p-8"aria-describedby="status-dialog-description"diff --git a/screenpipe-app-tauri/lib/hooks/use-status-dialog.tsx b/screenpipe-app-tauri/lib/hooks/use-status-dialog.tsxnew file mode 100644index 000000000..d5cffe03d--- /dev/null+++ b/screenpipe-app-tauri/lib/hooks/use-status-dialog.tsx@@ -0,0 +1,15 @@+import { create } from "zustand";++type StatusDialogStore = {+ isOpen: boolean;+ open: () => void;+ close: () => void;+ toggle: () => void;+};++export const useStatusDialog = create<StatusDialogStore>((set) => ({+ isOpen: false,+ open: () => set({ isOpen: true }),+ close: () => set({ isOpen: false }),+ toggle: () => set((state) => ({ isOpen: !state.isOpen })),+}));diff --git a/screenpipe-app-tauri/package.json b/screenpipe-app-tauri/package.jsonindex 471e4c7f2..c30698710 100644--- a/screenpipe-app-tauri/package.json+++ b/screenpipe-app-tauri/package.json@@ -72,7 +72,8 @@"tailwindcss-animate": "^1.0.7","tauri-plugin-store-api": "^0.0.0","use-debounce": "^10.0.4",- "use-immer": "^0.11.0"+ "use-immer": "^0.11.0",+ "zustand": "^5.0.3"},"devDependencies": {"@tailwindcss/typography": "^0.5.13",diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 61801884f..c178252a1 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.26.1"+version = "0.26.2"description = ""authors = ["you"]license = ""