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 bunch of small UI improvement and fixes

Louis Beaumont5687f42bed4e
diff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsx
index f8e0d162a..51faeb106 100644
--- a/screenpipe-app-tauri/app/page.tsx
+++ b/screenpipe-app-tauri/app/page.tsx
@@ -234,7 +234,7 @@ export default function Home() {
) : (
<>
<ChangelogDialog />
- <BreakingChangesInstructionsDialog />
+ {/* <BreakingChangesInstructionsDialog /> */}
<Header />
<div className=" w-full">
<PipeStore />
diff --git a/screenpipe-app-tauri/components/onboarding.tsx b/screenpipe-app-tauri/components/onboarding.tsx
index 33da47f24..f95201f85 100644
--- a/screenpipe-app-tauri/components/onboarding.tsx
+++ b/screenpipe-app-tauri/components/onboarding.tsx
@@ -153,7 +153,6 @@ const Onboarding: React.FC = () => {
const [error, setError] = useState<string | null>(null);
const [isVisible, setIsVisible] = useState(false);
const { showOnboarding, setShowOnboarding } = useOnboarding();
- const { updateSettings } = useSettings();
useEffect(() => {
setIsVisible(true);
diff --git a/screenpipe-app-tauri/components/onboarding/api-setup.tsx b/screenpipe-app-tauri/components/onboarding/api-setup.tsx
index afbe8c5ea..681c12523 100644
--- a/screenpipe-app-tauri/components/onboarding/api-setup.tsx
+++ b/screenpipe-app-tauri/components/onboarding/api-setup.tsx
@@ -87,12 +87,28 @@ const OnboardingAPISetup: React.FC<OnboardingAPISetupProps> = ({
});
} else {
const errorData = await response.json();
- newErrors.openaiApiKey = `invalid api key or model: ${
- errorData.error?.message.toLowerCase() || "unknown error"
- }`;
+ console.log("errorData", errorData);
+
+ if (response.status === 401) {
+ if (aiUrl.includes("worker")) {
+ newErrors.openaiApiKey =
+ "unauthorized: please login or check your subscription";
+ } else {
+ newErrors.openaiApiKey = "unauthorized: invalid api key";
+ }
+ } else {
+ newErrors.openaiApiKey = `invalid api key or model: ${
+ errorData.error?.message?.toLowerCase() || "unknown error"
+ }`;
+ }
}
} catch (error: any) {
- newErrors.openaiApiKey = `failed to validate api key: ${error.message.toLowerCase()}`;
+ if (error.message.includes("Failed to fetch")) {
+ newErrors.openaiApiKey =
+ "connection failed: check your internet or ai provider url";
+ } else {
+ newErrors.openaiApiKey = `failed to validate api key: ${error.message.toLowerCase()}`;
+ }
}
setErrors(newErrors);
diff --git a/screenpipe-app-tauri/components/onboarding/introduction.tsx b/screenpipe-app-tauri/components/onboarding/introduction.tsx
index a5916f536..46100a761 100644
--- a/screenpipe-app-tauri/components/onboarding/introduction.tsx
+++ b/screenpipe-app-tauri/components/onboarding/introduction.tsx
@@ -37,13 +37,7 @@ const OnboardingIntro: React.FC<OnboardingIntroProps> = ({
welcome to screenpipe, excited to have you here
</h2>
</DialogHeader>
- <video
- width="600px"
- className="mt-2 rounded-md"
- autoPlay
- controls
- preload="true"
- >
+ <video width="600px" className="mt-2 rounded-md" controls preload="true">
<source src="/onboarding-screenpipe.mp4" type="video/mp4" />
your browser does not support the video tag.
</video>
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
index 946a96907..2645a9ca4 100644
--- a/screenpipe-app-tauri/components/onboarding/status.tsx
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -274,10 +274,13 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
className={`${className} w-full flex justify-between flex-col items-center`}
>
<DialogHeader className="flex flex-col px-2 justify-center items-center">
- <img className="w-24 h-24 " src="/128x128.png" alt="screenpipe-logo" />
+ <img className="w-24 h-24" src="/128x128.png" alt="screenpipe-logo" />
<DialogTitle className="text-center text-2xl">
setting up screenpipe
</DialogTitle>
+ <p className="text-sm text-muted-foreground mt-2">
+ 100% local-first • your data never leaves your device
+ </p>
</DialogHeader>
{isMacOS && (
@@ -365,7 +368,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
htmlFor="chinese-mirror-toggle"
className="flex items-center space-x-2"
>
- <span>use chinese mirror for model downloads</span>
+ <span>i am currently in mainland china</span>
<TooltipProvider>
<Tooltip>
<TooltipTrigger>
@@ -373,11 +376,9 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
</TooltipTrigger>
<TooltipContent side="right">
<p>
- enable this option to use a chinese mirror for
+ enable this option to use a chinese cloud for
<br />
- downloading hugging face models
- <br />
- (e.g. whisper, embedded llama, etc.)
+ downloading AI models
<br />
which are blocked in mainland china.
</p>
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 72e315e5a..41a20f673 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -42,15 +42,15 @@ export const PipeStore: React.FC = () => {
const [searchQuery, setSearchQuery] = useState("");
const [showInstalledOnly, setShowInstalledOnly] = useState(false);
const [purchaseHistory, setPurchaseHistory] = useState<PurchaseHistoryItem[]>(
- [],
+ []
);
const { checkLogin } = useLoginDialog();
const { open: openStatusDialog } = useStatusDialog();
const [loadingPurchases, setLoadingPurchases] = useState<Set<string>>(
- new Set(),
+ new Set()
);
const [loadingInstalls, setLoadingInstalls] = useState<Set<string>>(
- new Set(),
+ new Set()
);
const filteredPipes = pipes
@@ -58,7 +58,7 @@ export const PipeStore: React.FC = () => {
(pipe) =>
pipe.id.toLowerCase().includes(searchQuery.toLowerCase()) &&
(!showInstalledOnly || pipe.is_installed) &&
- !pipe.is_installing,
+ !pipe.is_installing
)
.sort((a, b) => {
// Sort by downloads count first
@@ -68,7 +68,10 @@ export const PipeStore: React.FC = () => {
return downloadsB - downloadsA;
}
// Then by creation date
- return new Date(b.created_at as string).getTime() - new Date(a.created_at as string).getTime();
+ return (
+ new Date(b.created_at as string).getTime() -
+ new Date(a.created_at as string).getTime()
+ );
});
// Add debounced search tracking
@@ -120,21 +123,21 @@ export const PipeStore: React.FC = () => {
is_installed: !!installedPipe,
installed_config: installedPipe?.config,
has_purchased: purchaseHistory.some(
- (p) => p.plugin_id === plugin.id,
+ (p) => p.plugin_id === plugin.id
),
is_core_pipe: corePipes.includes(plugin.name),
is_enabled: installedPipe?.config?.enabled ?? false,
has_update: false,
};
- }),
+ })
);
const customPipes = installedPipes
.filter(
(p) =>
!plugins.find(
- (plugin) => plugin.name === p.id?.replace("._temp", ""),
- ),
+ (plugin) => plugin.name === p.id?.replace("._temp", "")
+ )
)
.map((p) => {
const pluginName = p.config?.source?.split("/").pop();
@@ -175,7 +178,7 @@ export const PipeStore: React.FC = () => {
const handlePurchasePipe = async (
pipe: PipeWithStatus,
- onComplete?: () => void,
+ onComplete?: () => void
) => {
try {
if (!checkLogin(settings.user)) return;
@@ -302,7 +305,7 @@ export const PipeStore: React.FC = () => {
const handleInstallPipe = async (
pipe: PipeWithStatus,
- onComplete?: () => void,
+ onComplete?: () => void
) => {
try {
if (!checkLogin(settings.user)) return;
@@ -310,8 +313,8 @@ export const PipeStore: React.FC = () => {
// Keep the pipe in its current position by updating its status
setPipes((prevPipes) =>
prevPipes.map((p) =>
- p.id === pipe.id ? { ...p, is_installing: true } : p,
- ),
+ p.id === pipe.id ? { ...p, is_installing: true } : p
+ )
);
setLoadingInstalls((prev) => new Set(prev).add(pipe.id));
@@ -342,7 +345,7 @@ export const PipeStore: React.FC = () => {
pipe_id: pipe.id,
url: response.download_url,
}),
- },
+ }
);
const data = await downloadResponse.json();
@@ -361,8 +364,8 @@ export const PipeStore: React.FC = () => {
is_installed: true,
is_installing: false,
}
- : p,
- ),
+ : p
+ )
);
onComplete?.();
@@ -371,8 +374,8 @@ export const PipeStore: React.FC = () => {
// Reset the pipe's status on error
setPipes((prevPipes) =>
prevPipes.map((p) =>
- p.id === pipe.id ? { ...p, is_installing: false } : p,
- ),
+ p.id === pipe.id ? { ...p, is_installing: false } : p
+ )
);
if ((error as Error).cause === PipeDownloadError.PURCHASE_REQUIRED) {
return toast({
@@ -488,7 +491,7 @@ export const PipeStore: React.FC = () => {
// Filter installed pipes that have updates available
const pipesToUpdate = pipes.filter(
- (pipe) => pipe.is_installed && pipe.has_update,
+ (pipe) => pipe.is_installed && pipe.has_update
);
if (pipesToUpdate.length === 0) {
@@ -572,7 +575,7 @@ export const PipeStore: React.FC = () => {
const handleTogglePipe = async (
pipe: PipeWithStatus,
- onComplete: () => void,
+ onComplete: () => void
) => {
try {
const t = toast({
@@ -629,7 +632,7 @@ export const PipeStore: React.FC = () => {
`Failed to ${
pipe.installed_config?.enabled ? "disable" : "enable"
} pipe:`,
- error,
+ error
);
toast({
title: "error toggling pipe",
@@ -640,7 +643,7 @@ export const PipeStore: React.FC = () => {
};
const handleLoadFromLocalFolder = async (
- setNewRepoUrl: (url: string) => void,
+ setNewRepoUrl: (url: string) => void
) => {
try {
const selectedFolder = await open({
@@ -843,7 +846,7 @@ export const PipeStore: React.FC = () => {
pipe_id: pipe.name,
source: responseDownload.download_url,
}),
- },
+ }
);
const data = await response.json();
@@ -902,8 +905,9 @@ export const PipeStore: React.FC = () => {
return;
}
// Get last check time from local storage
- const lastCheckTime =
- await localforage.getItem<number>("lastUpdateCheck");
+ const lastCheckTime = await localforage.getItem<number>(
+ "lastUpdateCheck"
+ );
const now = Date.now();
// Check if 5 minutes have passed since last check
@@ -920,7 +924,7 @@ export const PipeStore: React.FC = () => {
for (const pipe of installedPipes) {
const update = await storeApi.checkUpdate(
pipe.id,
- pipe.installed_config?.version!,
+ pipe.installed_config?.version!
);
if (update.has_update) {
await handleUpdatePipe(pipe);
@@ -1019,6 +1023,10 @@ export const PipeStore: React.FC = () => {
onDelete={handleDeletePipe}
onRefreshFromDisk={handleRefreshFromDisk}
onUpdate={handleUpdatePipe}
+ onInstall={handleInstallPipe}
+ onPurchase={handlePurchasePipe}
+ isLoadingPurchase={loadingPurchases.has(selectedPipe.id)}
+ isLoadingInstall={loadingInstalls.has(selectedPipe.id)}
/>
);
}
@@ -1072,7 +1080,7 @@ export const PipeStore: React.FC = () => {
className="flex items-center gap-2"
disabled={
!pipes.some(
- (pipe) => pipe.is_installed && pipe.has_update,
+ (pipe) => pipe.is_installed && pipe.has_update
)
}
>
@@ -1097,7 +1105,7 @@ export const PipeStore: React.FC = () => {
setPipe={(updatedPipe) => {
setPipes((prevPipes) => {
return prevPipes.map((p) =>
- p.id === updatedPipe.id ? updatedPipe : p,
+ p.id === updatedPipe.id ? updatedPipe : p
);
});
}}
diff --git a/screenpipe-app-tauri/components/pipe-store/pipe-card.tsx b/screenpipe-app-tauri/components/pipe-store/pipe-card.tsx
index bf02bf7d0..2ad29ad14 100644
--- a/screenpipe-app-tauri/components/pipe-store/pipe-card.tsx
+++ b/screenpipe-app-tauri/components/pipe-store/pipe-card.tsx
@@ -1,8 +1,6 @@
import React, {
useCallback,
useEffect,
- useMemo,
- useRef,
useState,
} from "react";
import { Button } from "@/components/ui/button";
diff --git a/screenpipe-app-tauri/components/pipe-store/pipe-details.tsx b/screenpipe-app-tauri/components/pipe-store/pipe-details.tsx
index ad55b0542..fd4a34d00 100644
--- a/screenpipe-app-tauri/components/pipe-store/pipe-details.tsx
+++ b/screenpipe-app-tauri/components/pipe-store/pipe-details.tsx
@@ -7,6 +7,8 @@ import {
RefreshCw,
Trash2,
X,
+ Download,
+ Loader2,
} from "lucide-react";
import { PipeStoreMarkdown } from "@/components/pipe-store-markdown";
import { PipeWithStatus } from "./types";
@@ -32,6 +34,10 @@ interface PipeDetailsProps {
onUpdate: (pipe: PipeWithStatus, onComplete: () => void) => void;
onDelete: (pipe: PipeWithStatus, onComplete: () => void) => void;
onRefreshFromDisk: (pipe: PipeWithStatus, onComplete: () => void) => void;
+ onInstall: (pipe: PipeWithStatus, onComplete: () => void) => void;
+ onPurchase: (pipe: PipeWithStatus, onComplete: () => void) => void;
+ isLoadingPurchase?: boolean;
+ isLoadingInstall?: boolean;
}
const buildStatusNotAllows = ["in_progress", "not_started"];
@@ -61,6 +67,10 @@ export const PipeDetails: React.FC<PipeDetailsProps> = ({
onUpdate,
onDelete,
onRefreshFromDisk,
+ onInstall,
+ onPurchase,
+ isLoadingPurchase,
+ isLoadingInstall,
}) => {
const [isLoading, setIsLoading] = useState(false);
return (
@@ -137,7 +147,7 @@ export const PipeDetails: React.FC<PipeDetailsProps> = ({
<Button
onClick={() =>
onRefreshFromDisk(pipe, () =>
- setIsLoading(false),
+ setIsLoading(false)
)
}
variant="outline"
@@ -222,9 +232,40 @@ export const PipeDetails: React.FC<PipeDetailsProps> = ({
<main className="flex-1 overflow-y-auto">
<div className="max-w-3xl mx-auto p-8 ">
+ {!pipe.is_installed && (
+ <div className="mb-6">
+ <Button
+ size="sm"
+ variant={pipe.is_paid ? "default" : "outline"}
+ onClick={() => {
+ if (pipe.is_paid && !pipe.has_purchased) {
+ setIsLoading(true);
+ onPurchase(pipe, () => setIsLoading(false));
+ } else {
+ setIsLoading(true);
+ onInstall(pipe, () => setIsLoading(false));
+ }
+ }}
+ className="font-medium"
+ disabled={isLoadingPurchase}
+ >
+ {isLoadingPurchase ? (
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ ) : pipe.is_paid && !pipe.has_purchased ? (
+ `$${pipe.price}`
+ ) : (
+ <>
+ <Download className="h-3.5 w-3.5 mr-2" />
+ get
+ </>
+ )}
+ </Button>
+ </div>
+ )}
+
{pipe.installed_config?.enabled &&
!buildStatusNotAllows.includes(
- getBuildStatus(pipe.installed_config.buildStatus) ?? "",
+ getBuildStatus(pipe.installed_config.buildStatus) ?? ""
) &&
pipe.installed_config?.port && (
<div>
@@ -234,7 +275,7 @@ export const PipeDetails: React.FC<PipeDetailsProps> = ({
variant="outline"
onClick={() =>
openUrl(
- `http://localhost:${pipe.installed_config?.port}`,
+ `http://localhost:${pipe.installed_config?.port}`
)
}
disabled={!pipe.installed_config?.enabled}
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index f0665b816..0239f2a90 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -5289,7 +5289,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "0.36.4"
+version = "0.37.1"
dependencies = [
"anyhow",
"async-stream",
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 39bdbf0fe..dda8ec5c4 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.37.1"
+version = "0.37.2"
description = ""
authors = ["you"]
license = ""