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 open as app

Louis Beaumont34f5e8025b7f
diff --git a/Cargo.toml b/Cargo.toml
index 136ee95bd..5604bd7cb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ resolver = "2"
[workspace.package]
-version = "0.2.15"
+version = "0.2.16"
authors = ["louis030195 <[email protected]>"]
description = ""
repository = "https://github.com/mediar-ai/screenpipe"
diff --git a/screenpipe-app-tauri/components/pipe-config-form.tsx b/screenpipe-app-tauri/components/pipe-config-form.tsx
index 690203fa7..756b9d1ca 100644
--- a/screenpipe-app-tauri/components/pipe-config-form.tsx
+++ b/screenpipe-app-tauri/components/pipe-config-form.tsx
@@ -47,8 +47,6 @@ export const PipeConfigForm: React.FC<PipeConfigFormProps> = ({
onConfigSave,
}) => {
const [config, setConfig] = useState(pipe.config);
- console.log("pipe", pipe);
- console.log("config", config);
useEffect(() => {
setConfig(pipe.config);
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 01c1ed396..ae1391144 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -15,6 +15,7 @@ import {
Power,
Puzzle,
X,
+ Loader2,
} from "lucide-react";
import { PipeConfigForm } from "./pipe-config-form";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
@@ -44,6 +45,7 @@ export interface Pipe {
fullDescription: string;
config?: Record<string, any>;
author?: string;
+ port?: number;
}
interface CorePipe {
@@ -111,7 +113,8 @@ const corePipes: CorePipe[] = [
{
id: "pipe-search",
name: "search",
- description: "search through your screen recordings and audio transcripts with AI",
+ description:
+ "search through your screen recordings and audio transcripts with AI",
url: "https://github.com/mediar-ai/screenpipe/tree/main/pipes/search",
credits: 0,
paid: false,
@@ -243,7 +246,9 @@ const PipeStore: React.FC = () => {
pipe.fullDescription = "no description available for this pipe.";
}
}
+ console.log("pipes", pipes);
setPipes(pipes);
+ return pipes;
} catch (error) {
console.error("Error fetching installed pipes:", error);
toast({
@@ -319,6 +324,18 @@ const PipeStore: React.FC = () => {
enabled: !pipe.enabled,
});
+ // Then replace the loading toast with this:
+ const t = toast({
+ title: "loading pipe",
+ description: "please wait...",
+ action: (
+ <div className="flex items-center">
+ <Loader2 className="h-4 w-4 animate-spin" />
+ </div>
+ ),
+ duration: 4000,
+ });
+
const endpoint = pipe.enabled ? "disable" : "enable";
const response = await fetch(`http://localhost:3030/pipes/${endpoint}`, {
method: "POST",
@@ -333,24 +350,33 @@ const PipeStore: React.FC = () => {
throw new Error(data.error);
}
- // Immediately update the local state
- setPipes((prevPipes) =>
- prevPipes.map((p) =>
- p.id === pipe.id ? { ...p, enabled: !p.enabled } : p
- )
- );
+ await new Promise((resolve) => setTimeout(resolve, 1000));
- // If we're in the details view, update the selected pipe too
- setSelectedPipe((prev) =>
- prev?.id === pipe.id ? { ...prev, enabled: !prev.enabled } : prev
- );
+ const freshPipes = await fetchInstalledPipes();
+
+ await new Promise((resolve) => setTimeout(resolve, 1000));
+
+ // Immediately update the local state
+ // setPipes((prevPipes) =>
+ // prevPipes.map((p) =>
+ // p.id === pipe.id ? { ...p, enabled: !p.enabled } : p
+ // )
+ // );
+
+ // find the pipe in the list, and set it as selected with the proper enabled state
+ const freshPipe = freshPipes.find((p: Pipe) => p.id === pipe.id);
+ console.log("fresh pipes", freshPipes);
+ console.log("fresh pipe", freshPipe);
+ if (freshPipe) {
+ setSelectedPipe(freshPipe);
+ }
+ console.log("selected pipe", selectedPipe);
toast({
title: `pipe ${endpoint}d`,
});
// Still fetch the latest state from the server to ensure consistency
- await fetchInstalledPipes();
} catch (error) {
console.error(
`Failed to ${pipe.enabled ? "disable" : "enable"} pipe:`,
@@ -675,15 +701,40 @@ const PipeStore: React.FC = () => {
<div>
<div className="flex justify-between items-center mb-4">
<h3 className="text-lg font-medium">pipe ui</h3>
- <Button
- variant="outline"
- onClick={() =>
- openUrl(`http://localhost:${selectedPipe.config!.port}`)
- }
- >
- <ExternalLink className="mr-2 h-3.5 w-3.5" />
- open in browser
- </Button>
+ <div className="flex gap-2">
+ <Button
+ variant="outline"
+ onClick={() =>
+ openUrl(
+ `http://localhost:${selectedPipe.config!.port}`
+ )
+ }
+ >
+ <ExternalLink className="mr-2 h-3.5 w-3.5" />
+ open in browser
+ </Button>
+ <Button
+ variant="default"
+ onClick={async () => {
+ try {
+ await invoke("open_pipe_window", {
+ port: selectedPipe.config!.port,
+ title: selectedPipe.id,
+ });
+ } catch (err) {
+ console.error("failed to open pipe window:", err);
+ toast({
+ title: "error opening pipe window",
+ description: "please try again or check the logs",
+ variant: "destructive",
+ });
+ }
+ }}
+ >
+ <Puzzle className="mr-2 h-3.5 w-3.5" />
+ open as app
+ </Button>
+ </div>
</div>
<div className="rounded-lg border overflow-hidden bg-background">
<iframe
diff --git a/screenpipe-app-tauri/components/video.tsx b/screenpipe-app-tauri/components/video.tsx
index 463185eb8..3fcd9af80 100644
--- a/screenpipe-app-tauri/components/video.tsx
+++ b/screenpipe-app-tauri/components/video.tsx
@@ -120,7 +120,7 @@ export const VideoComponent = memo(function VideoComponent({
</div>
) : (
<video controls className="w-full rounded-md">
- <source src={mediaSrc} type="video/mp4; codecs=hvc1" />
+ <source src={mediaSrc} type="video/mp4" />
Your browser does not support the video tag.
</video>
)}
diff --git a/screenpipe-app-tauri/lib/hooks/use-user.ts b/screenpipe-app-tauri/lib/hooks/use-user.ts
index 2a617e1c1..f2535a004 100644
--- a/screenpipe-app-tauri/lib/hooks/use-user.ts
+++ b/screenpipe-app-tauri/lib/hooks/use-user.ts
@@ -48,7 +48,6 @@ export function useUser() {
try {
const userData = await verifyUserToken(token);
- console.log("userData", userData);
// skip if user data did not change
if (userData.id === user?.id) return;
setUser(userData);
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index b51863804..cd76e2aa6 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.0"
+version = "0.17.1"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rs
index 8bb71f7d4..2f2e5cef9 100644
--- a/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -329,3 +329,20 @@ pub fn show_search(app_handle: tauri::AppHandle<tauri::Wry>) {
.unwrap();
}
}
+
+
+#[tauri::command]
+pub async fn open_pipe_window(app_handle: tauri::AppHandle<tauri::Wry>, port: u16, title: String) -> Result<(), String> {
+ let _window = tauri::WebviewWindowBuilder::new(
+ &app_handle,
+ format!("pipe-{}", port),
+ tauri::WebviewUrl::External(format!("http://localhost:{}", port).parse().unwrap())
+ )
+ .title(title)
+ .inner_size(800.0, 600.0)
+ .build()
+ .map_err(|e| e.to_string())?;
+
+ Ok(())
+}
+
diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rs
index fb7ae3887..acc789593 100755
--- a/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -167,6 +167,7 @@ async fn main() {
commands::show_search,
commands::show_meetings,
commands::show_identify_speakers,
+ commands::open_pipe_window,
])
.setup(|app| {
// Logging setup
diff --git a/screenpipe-vision/bin/ui_monitor-aarch64-apple-darwin b/screenpipe-vision/bin/ui_monitor-aarch64-apple-darwin
index 27dc6d78e..1546bce73 100755
Binary files a/screenpipe-vision/bin/ui_monitor-aarch64-apple-darwin and b/screenpipe-vision/bin/ui_monitor-aarch64-apple-darwin differ
diff --git a/screenpipe-vision/lib/libscreenpipe_arm64.dylib b/screenpipe-vision/lib/libscreenpipe_arm64.dylib
index d936a8fe0..817087c34 100755
Binary files a/screenpipe-vision/lib/libscreenpipe_arm64.dylib and b/screenpipe-vision/lib/libscreenpipe_arm64.dylib differ