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(onboarding): skip permission check in dev mode + remember usecase selection

Louis Beaumont889ab084a460
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
index 2e6a818b7..77107e0ae 100644
--- a/screenpipe-app-tauri/components/onboarding/status.tsx
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -171,6 +171,14 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
return;
}
+ // In dev mode, macOS permission APIs are unreliable because the bundle ID/code signature
+ // changes between builds. Skip permission check and proceed directly.
+ if (settings.devMode) {
+ console.log("Dev mode: skipping permission check (unreliable with unsigned builds)");
+ setSetupState("ready");
+ return;
+ }
+
try {
const perms = await commands.doPermissionsCheck(true);
setPermissions(perms);
@@ -194,7 +202,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
checkPermissions();
const interval = setInterval(checkPermissions, 2000);
return () => clearInterval(interval);
- }, [isMacOS]);
+ }, [isMacOS, settings.devMode]);
// Auto-start when ready (only once)
useEffect(() => {
diff --git a/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx
index 1130e73aa..627e14659 100644
--- a/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx
+++ b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, { useState, useEffect } from "react";
import {
Brain,
CircleCheck,
@@ -113,16 +113,52 @@ const OnboardingSelection: React.FC<OnboardingSelectionProps> = ({
handlePrevSlide,
}) => {
const [otherText, setOtherText] = useState("");
+ const [hasSubmitted, setHasSubmitted] = useState(false);
+
+ // Load saved selection and submission status on mount
+ useEffect(() => {
+ const savedOption = localStorage.getItem("onboarding_usecase");
+ const savedOtherText = localStorage.getItem("onboarding_usecase_other");
+ const submitted = localStorage.getItem("onboarding_usecase_submitted");
+
+ if (savedOption && !selectedOption) {
+ handleOptionClick(savedOption);
+ }
+ if (savedOtherText) {
+ setOtherText(savedOtherText);
+ }
+ if (submitted === "true") {
+ setHasSubmitted(true);
+ }
+ }, []);
+
+ // Save selection when it changes
+ useEffect(() => {
+ if (selectedOption) {
+ localStorage.setItem("onboarding_usecase", selectedOption);
+ }
+ }, [selectedOption]);
+
+ // Save other text when it changes
+ useEffect(() => {
+ if (otherText) {
+ localStorage.setItem("onboarding_usecase_other", otherText);
+ }
+ }, [otherText]);
const isOtherSelected = selectedOption === "other";
const canContinue = selectedOption !== null && (selectedOption !== "other" || otherText.trim().length > 0);
const handleNext = () => {
- // Track selected option in Posthog
- posthog.capture("onboarding_usecases_selected", {
- selected_option: selectedOption,
- other_text: isOtherSelected ? otherText.trim() : null,
- });
+ // Only track to PostHog once to avoid spam
+ if (!hasSubmitted) {
+ posthog.capture("onboarding_usecases_selected", {
+ selected_option: selectedOption,
+ other_text: isOtherSelected ? otherText.trim() : null,
+ });
+ localStorage.setItem("onboarding_usecase_submitted", "true");
+ setHasSubmitted(true);
+ }
handleNextSlide();
};