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 fix loom button and windows build

Louis Beaumontb98897fa53bc
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index fa6ab697f..08e2736c2 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -280,28 +280,16 @@ jobs:
throw "LLVM installation failed"
}
- - name: Run pre_build.js on Windows
+ - name: Install wget on Windows
if: matrix.tauri-args == '--target x86_64-pc-windows-msvc'
shell: powershell
env:
SKIP_SCREENPIPE_SETUP: true
run: |
- # Download wget directly instead of using Chocolatey
- $wgetUrl = "https://eternallybored.org/misc/wget/1.21.4/64/wget.exe"
- $wgetPath = "C:\Windows\System32\wget.exe"
-
- # Create a web client
- $webClient = New-Object System.Net.WebClient
-
- # Download wget
- $webClient.DownloadFile($wgetUrl, $wgetPath)
-
- # Now run the pre_build script
- bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}
- working-directory: ./screenpipe-app-tauri
+ # Install wget using winget
+ winget install --silent GnuWin32.Wget
- - name: Run pre_build.js on non-Windows
- if: matrix.tauri-args != '--target x86_64-pc-windows-msvc'
+ - name: Run pre_build.js
env:
SKIP_SCREENPIPE_SETUP: true
run: bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}
diff --git a/screenpipe-app-tauri/app/providers.tsx b/screenpipe-app-tauri/app/providers.tsx
index c1fd3f199..306bee1af 100644
--- a/screenpipe-app-tauri/app/providers.tsx
+++ b/screenpipe-app-tauri/app/providers.tsx
@@ -6,26 +6,31 @@ import { useEffect } from "react";
import { initOpenTelemetry } from "@/lib/opentelemetry";
import { OnboardingProvider } from "@/lib/hooks/use-onboarding";
import { ChangelogDialogProvider } from "@/lib/hooks/use-changelog-dialog";
+import { forwardRef } from "react";
-export function Providers({ children }: { children: React.ReactNode }) {
- useEffect(() => {
- if (typeof window !== "undefined") {
- const isDebug = process.env.TAURI_ENV_DEBUG === "true";
- if (isDebug) return;
- posthog.init("phc_Bt8GoTBPgkCpDrbaIZzJIEYt0CrJjhBiuLaBck1clce", {
- api_host: "https://eu.i.posthog.com",
- person_profiles: "identified_only",
- capture_pageview: false, // Disable automatic pageview capture, as we capture manually
- });
- initOpenTelemetry("82688", new Date().toISOString());
- }
- }, []);
+export const Providers = forwardRef<HTMLDivElement, { children: React.ReactNode }>(
+ ({ children }, ref) => {
+ useEffect(() => {
+ if (typeof window !== "undefined") {
+ const isDebug = process.env.TAURI_ENV_DEBUG === "true";
+ if (isDebug) return;
+ posthog.init("phc_Bt8GoTBPgkCpDrbaIZzJIEYt0CrJjhBiuLaBck1clce", {
+ api_host: "https://eu.i.posthog.com",
+ person_profiles: "identified_only",
+ capture_pageview: false,
+ });
+ initOpenTelemetry("82688", new Date().toISOString());
+ }
+ }, []);
- return (
- <OnboardingProvider>
- <ChangelogDialogProvider>
- <PostHogProvider client={posthog}>{children}</PostHogProvider>
- </ChangelogDialogProvider>
- </OnboardingProvider>
- );
-}
+ return (
+ <OnboardingProvider>
+ <ChangelogDialogProvider>
+ <PostHogProvider client={posthog}>{children}</PostHogProvider>
+ </ChangelogDialogProvider>
+ </OnboardingProvider>
+ );
+ }
+);
+
+Providers.displayName = "Providers";
diff --git a/screenpipe-app-tauri/components/notification-handler.tsx b/screenpipe-app-tauri/components/notification-handler.tsx
index 8b348fad8..2a923d4f1 100644
--- a/screenpipe-app-tauri/components/notification-handler.tsx
+++ b/screenpipe-app-tauri/components/notification-handler.tsx
@@ -17,7 +17,7 @@ const NotificationHandler: React.FC = () => {
useEffect(() => {
const checkAndRequestPermission = async () => {
let permission = await isPermissionGranted();
- console.log("notification permission", permission);
+ console.log("ission", permission);
if (!permission) {
const result = await requestPermission();
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 469ea895d..6b7d89032 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -250,9 +250,11 @@ const PipeStore: React.FC = () => {
}
};
+
const handleToggleEnabled = async (pipe: Pipe) => {
if (pipe.id === "pipe-for-loom" && !pipe.enabled) {
const hasLoomSubscription = await checkLoomSubscription();
+ setHasLoomSubscription(hasLoomSubscription);
if (!hasLoomSubscription) {
toast({
title: "subscription required",
@@ -599,7 +601,6 @@ const PipeStore: React.FC = () => {
<h3 className="text-lg font-medium">pipe ui</h3>
<Button
variant="outline"
- size="icon"
onClick={() =>
openUrl(`http://localhost:${selectedPipe.config!.port}`)
}
diff --git a/screenpipe-app-tauri/components/stripe-subscription-button.tsx b/screenpipe-app-tauri/components/stripe-subscription-button.tsx
index 661fb9e16..c647b6b9f 100644
--- a/screenpipe-app-tauri/components/stripe-subscription-button.tsx
+++ b/screenpipe-app-tauri/components/stripe-subscription-button.tsx
@@ -14,9 +14,22 @@ interface StripeSubscriptionButtonProps {
export function StripeSubscriptionButton({
onSubscriptionComplete,
}: StripeSubscriptionButtonProps) {
- const { isSignedIn, user } = useUser();
+ const { isSignedIn, user, checkLoomSubscription } = useUser();
const [isSubscribed, setIsSubscribed] = useState(false);
+ useEffect(() => {
+ const checkSubscription = async () => {
+ if (user) {
+ const hasSubscription = await checkLoomSubscription();
+ setIsSubscribed(hasSubscription);
+ if (hasSubscription && onSubscriptionComplete) {
+ onSubscriptionComplete();
+ }
+ }
+ };
+ checkSubscription();
+ }, [user]);
+
const handleSubscribe = async () => {
posthog.capture("subscribe_button_clicked", {
email: user?.email,
@@ -53,14 +66,17 @@ export function StripeSubscriptionButton({
}
};
+ if (isSubscribed) {
+ return null;
+ }
+
return (
<Button
onClick={handleSubscribe}
variant="outline"
className="h-8 min-w-[100px]"
- disabled={isSubscribed}
>
- {isSubscribed ? "subscribed" : "subscribe - $10/month"}
+ subscribe - $10/month
</Button>
);
}
diff --git a/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx b/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx
index 49af0b85c..6d0002282 100644
--- a/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx
+++ b/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx
@@ -17,12 +17,10 @@ export const OnboardingProvider: React.FC<{ children: React.ReactNode }> = ({
useEffect(() => {
const checkFirstTimeUser = async () => {
const isFirstTime = await localforage.getItem<boolean>("isFirstTimeUser");
- console.log("isFirstTime", isFirstTime);
if (isFirstTime === null) {
setShowOnboarding(true);
}
};
- console.log("checkFirstTimeUser");
checkFirstTimeUser();
}, []);
return (
diff --git a/screenpipe-app-tauri/lib/hooks/use-user.ts b/screenpipe-app-tauri/lib/hooks/use-user.ts
index 797102730..b14c81bd6 100644
--- a/screenpipe-app-tauri/lib/hooks/use-user.ts
+++ b/screenpipe-app-tauri/lib/hooks/use-user.ts
@@ -18,14 +18,13 @@ async function initStore() {
const dataDir = await localDataDir();
const storePath = await join(dataDir, "screenpipe", "store.bin");
store = await createStore(storePath);
- const entries = await store.entries();
- console.log("store", entries);
}
async function checkSubscription(email: string): Promise<boolean> {
try {
const isDev = window.location.href.includes("localhost");
- const baseUrl = isDev ? "http://localhost:3001" : "https://screenpi.pe";
+ // const baseUrl = isDev ? "http://localhost:3001" : "https://screenpi.pe";
+ const baseUrl = "https://screenpi.pe";
const response = await fetch(`${baseUrl}/api/stripe-loom`, {
method: "POST",
@@ -42,7 +41,6 @@ async function checkSubscription(email: string): Promise<boolean> {
}
const data = await response.json();
- console.log("subscription data:", data);
return data.hasActiveSubscription;
} catch (error) {
console.error("failed to check subscription:", error);
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index d2c2ceb93..62c5dfce6 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -4713,7 +4713,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "0.14.27"
+version = "0.14.28"
dependencies = [
"anyhow",
"axum",
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index b2a5aafaf..2958c4cd9 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.14.28"
+version = "0.14.29"
description = ""
authors = ["you"]
license = ""