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

fix: revert engine to local when cloud subscription expires

Louis Beaumontfadf8c5b06e9
diff --git a/apps/screenpipe-app-tauri/components/settings/sync-settings.tsx b/apps/screenpipe-app-tauri/components/settings/sync-settings.tsx
index f8abeb03a..5212e76e0 100644
--- a/apps/screenpipe-app-tauri/components/settings/sync-settings.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/sync-settings.tsx
@@ -953,8 +953,7 @@ export function SyncSettings() {
const subscriptionStatus = data.subscription?.status;
const hasSubscription = data.hasSubscription ||
subscriptionStatus === "trialing" ||
- subscriptionStatus === "active" ||
- !!settings.user?.cloud_subscribed;
+ subscriptionStatus === "active";
setSubscription({
hasSubscription,
tier: data.subscription?.tier || null,
@@ -974,6 +973,21 @@ export function SyncSettings() {
}
return await initSyncBackend();
} else {
+ // Subscription expired/cancelled — clear cloud flag and revert engine
+ // only if it's still set to cloud (don't touch disabled or other engines)
+ if (settings.user?.cloud_subscribed) {
+ const revertUpdate: Record<string, any> = {
+ user: { ...settings.user, cloud_subscribed: false },
+ };
+ if (settings.audioTranscriptionEngine === "screenpipe-cloud") {
+ const { platform: getPlatform } = await import("@tauri-apps/plugin-os");
+ const os = getPlatform();
+ revertUpdate.audioTranscriptionEngine = os === "macos"
+ ? "whisper-large-v3-turbo-quantized"
+ : "parakeet";
+ }
+ await updateSettings(revertUpdate);
+ }
setStep("onboarding");
return false;
}