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 don't show permission on windows/linux

Louis Beaumontb3ef6780ed54
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
index a5e970ab3..fffb348ac 100644
--- a/screenpipe-app-tauri/components/onboarding/status.tsx
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -2,7 +2,6 @@ import React, { useState, useEffect } from "react";
import { Check, HelpCircle, Lock, Video, X } from "lucide-react";
import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
import OnboardingNavigation from "@/components/onboarding/navigation";
-import { Command } from "@tauri-apps/plugin-shell";
import { Button } from "../ui/button";
import { Switch } from "../ui/switch";
import {
@@ -55,6 +54,7 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
screenshots: number;
audioSeconds: number;
} | null>(null);
+ const [isMacOS, setIsMacOS] = useState(false);
useEffect(() => {
const checkRestartStatus = async () => {
@@ -141,6 +141,14 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
return () => clearInterval(interval);
}, []);
+ useEffect(() => {
+ const checkPlatform = () => {
+ const currentPlatform = platform();
+ setIsMacOS(currentPlatform === "macos");
+ };
+ checkPlatform();
+ }, []);
+
const handlePermissionButton = async (
type: "screen" | "audio" | "accessibility"
) => {
@@ -272,76 +280,78 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
</DialogTitle>
</DialogHeader>
- <div className="w-3/4 space-y-4 mt-4 flex flex-col items-center">
- <div className="flex items-center justify-between mx-auto w-full">
- <div className="flex items-right gap-2">
- {permissions && (
- <span>
- {permissions.screenRecording.toLowerCase() === "granted" ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <span className="text-sm">screen recording permission</span>
+ {isMacOS && (
+ <div className="w-3/4 space-y-4 mt-4 flex flex-col items-center">
+ <div className="flex items-center justify-between mx-auto w-full">
+ <div className="flex items-right gap-2">
+ {permissions && (
+ <span>
+ {permissions.screenRecording.toLowerCase() === "granted" ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <span className="text-sm">screen recording permission</span>
+ </div>
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("screen")}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant screen permission
+ </Button>
</div>
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("screen")}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant screen permission
- </Button>
- </div>
- <div className="flex items-center justify-between mx-auto w-full">
- <div className="flex items-center gap-2">
- {permissions && (
- <span>
- {permissions.microphone.toLowerCase() === "granted" ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <span className="text-sm">audio recording permission</span>
+ <div className="flex items-center justify-between mx-auto w-full">
+ <div className="flex items-center gap-2">
+ {permissions && (
+ <span>
+ {permissions.microphone.toLowerCase() === "granted" ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <span className="text-sm">audio recording permission</span>
+ </div>
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("audio")}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant audio permission
+ </Button>
</div>
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("audio")}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant audio permission
- </Button>
- </div>
- <div className="flex items-center justify-between mx-auto w-full">
- <div className="flex items-center gap-2">
- {permissions && (
- <span>
- {permissions.accessibility.toLowerCase() === "granted" ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <span className="text-sm">accessibility permission</span>
+ <div className="flex items-center justify-between mx-auto w-full">
+ <div className="flex items-center gap-2">
+ {permissions && (
+ <span>
+ {permissions.accessibility.toLowerCase() === "granted" ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <span className="text-sm">accessibility permission</span>
+ </div>
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("accessibility")}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant accessibility permission
+ </Button>
</div>
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("accessibility")}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant accessibility permission
- </Button>
</div>
- </div>
+ )}
<Separator className="w-full my-2" />
diff --git a/screenpipe-app-tauri/components/screenpipe-status.tsx b/screenpipe-app-tauri/components/screenpipe-status.tsx
index ea7defed3..23886ffd5 100644
--- a/screenpipe-app-tauri/components/screenpipe-status.tsx
+++ b/screenpipe-app-tauri/components/screenpipe-status.tsx
@@ -22,6 +22,7 @@ import { cn } from "@/lib/utils";
import { Check, X } from "lucide-react";
import { useSettings } from "@/lib/hooks/use-settings";
import { useStatusDialog } from "@/lib/hooks/use-status-dialog";
+import { platform } from "@tauri-apps/plugin-os";
type PermissionsStatus = {
screenRecording: string;
@@ -37,6 +38,7 @@ const HealthStatus = ({ className }: { className?: string }) => {
const [permissions, setPermissions] = useState<PermissionsStatus | null>(
null
);
+ const [isMacOS, setIsMacOS] = useState(false);
useEffect(() => {
const checkPermissions = async () => {
@@ -57,6 +59,14 @@ const HealthStatus = ({ className }: { className?: string }) => {
checkPermissions();
}, []);
+ useEffect(() => {
+ const checkPlatform = () => {
+ const currentPlatform = platform();
+ setIsMacOS(currentPlatform === "macos");
+ };
+ checkPlatform();
+ }, []);
+
const handleOpenDataDir = async () => {
try {
const dataDir = await getDataDir();
@@ -264,25 +274,27 @@ const HealthStatus = ({ className }: { className?: string }) => {
{formatTimestamp(health?.last_frame_timestamp ?? null)}
</span>
</div>
- <div className="flex items-center gap-2">
- {permissions && (
- <span>
- {permissions.screenRecording ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("screen")}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant screen permission
- </Button>
- </div>
+ {isMacOS && (
+ <div className="flex items-center gap-2">
+ {permissions && (
+ <span>
+ {permissions.screenRecording ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("screen")}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant screen permission
+ </Button>
+ </div>
+ )}
</div>
{/* Audio Recording Status */}
@@ -311,26 +323,28 @@ const HealthStatus = ({ className }: { className?: string }) => {
: formatTimestamp(health?.last_audio_timestamp ?? null)}
</span>
</div>
- <div className="flex items-center gap-2">
- {permissions && (
- <span>
- {permissions.microphone ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("audio")}
- disabled={settings.disableAudio}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant audio permission
- </Button>
- </div>
+ {isMacOS && (
+ <div className="flex items-center gap-2">
+ {permissions && (
+ <span>
+ {permissions.microphone ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("audio")}
+ disabled={settings.disableAudio}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant audio permission
+ </Button>
+ </div>
+ )}
</div>
{/* UI Monitoring Status */}
@@ -352,25 +366,27 @@ const HealthStatus = ({ className }: { className?: string }) => {
)}
</span>
</div>
- <div className="flex items-center gap-2">
- {permissions && (
- <span>
- {permissions.accessibility ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <X className="h-4 w-4 text-red-500" />
- )}
- </span>
- )}
- <Button
- variant="outline"
- className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton("accessibility")}
- >
- <Lock className="h-4 w-4 mr-2" />
- grant accessibility permission
- </Button>
- </div>
+ {isMacOS && (
+ <div className="flex items-center gap-2">
+ {permissions && (
+ <span>
+ {permissions.accessibility ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
+ </span>
+ )}
+ <Button
+ variant="outline"
+ className="w-[260px] text-sm justify-start"
+ onClick={() => handlePermissionButton("accessibility")}
+ >
+ <Lock className="h-4 w-4 mr-2" />
+ grant accessibility permission
+ </Button>
+ </div>
+ )}
</div>
)}
</div>
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index ae1e5ab0f..8f6d453ea 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.30.9"
+version = "0.30.10"
description = ""
authors = ["you"]
license = ""