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

release-app improve pipe download ux

Louis Beaumontd24be50be708
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index ae1391144..deb021049 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -37,6 +37,7 @@ import { useUser } from "@/lib/hooks/use-user";
import { PipeStoreMarkdown } from "@/components/pipe-store-markdown";
import { PublishDialog } from "./publish-dialog";
import { invoke } from "@tauri-apps/api/core";
+import { Progress } from "@/components/ui/progress";
export interface Pipe {
enabled: boolean;
@@ -264,11 +265,37 @@ const PipeStore: React.FC = () => {
posthog.capture("download_pipe", {
pipe_id: url,
});
- toast({
+
+ // Create initial toast with progress bar
+ const t = toast({
title: "downloading pipe",
- description: "please wait...",
+ description: (
+ <div className="space-y-2">
+ <Progress value={0} className="h-1" />
+ <p className="text-xs">starting download...</p>
+ </div>
+ ),
+ duration: 100000, // long duration
});
+ let value = 0;
+
+ // Update progress periodically
+ const progressInterval = setInterval(() => {
+ value += 3;
+ t.update({
+ id: t.id,
+ title: "downloading pipe",
+ description: (
+ <div className="space-y-2">
+ <Progress value={value} className="h-1" />
+ <p className="text-xs">installing dependencies...</p>
+ </div>
+ ),
+ duration: 100000,
+ });
+ }, 500);
+
const response = await fetch("http://localhost:3030/pipes/download", {
method: "POST",
headers: {
@@ -278,13 +305,24 @@ const PipeStore: React.FC = () => {
});
const data = await response.json();
+ clearInterval(progressInterval);
+
if (!data.success) {
throw new Error(data.error || "Failed to download pipe");
}
- toast({
+ t.update({
+ id: t.id,
title: "pipe downloaded",
+ description: (
+ <div className="space-y-2">
+ <Progress value={100} className="h-1" />
+ <p className="text-xs">completed successfully</p>
+ </div>
+ ),
+ duration: 2000,
});
+
await fetchInstalledPipes();
} catch (error) {
console.error("Failed to download pipe:", error);
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 28b8f9870..8175cc0e0 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -4966,7 +4966,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "0.17.1"
+version = "0.17.2"
dependencies = [
"anyhow",
"axum",
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index cd76e2aa6..816a87e76 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.17.1"
+version = "0.17.2"
description = ""
authors = ["you"]
license = ""