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(app): request screen recording permission last (#5031)

Ezra Ellette864e37ec8e2f
diff --git a/apps/screenpipe-app-tauri/app/permission-recovery/page.tsx b/apps/screenpipe-app-tauri/app/permission-recovery/page.tsx
index a8b34f068..b29303f8c 100644
--- a/apps/screenpipe-app-tauri/app/permission-recovery/page.tsx
+++ b/apps/screenpipe-app-tauri/app/permission-recovery/page.tsx
@@ -199,14 +199,6 @@ export default function PermissionRecoveryPage() {
</div>
<div className="space-y-2">
- <PermissionRow
- icon={<Monitor className="w-4 h-4" strokeWidth={1.5} />}
- label="screen"
- description="capture display"
- status={screenStatus}
- onFix={() => handleFix("screenRecording")}
- testId="permission-row-screen"
- />
<PermissionRow
icon={<Mic className="w-4 h-4" strokeWidth={1.5} />}
label="microphone"
@@ -225,6 +217,14 @@ export default function PermissionRecoveryPage() {
testId="permission-row-accessibility"
/>
)}
+ <PermissionRow
+ icon={<Monitor className="w-4 h-4" strokeWidth={1.5} />}
+ label="screen"
+ description="capture display"
+ status={screenStatus}
+ onFix={() => handleFix("screenRecording")}
+ testId="permission-row-screen"
+ />
{isMacOS && keychainStatus === "denied" && (
<PermissionRow
icon={<Lock className="w-4 h-4" strokeWidth={1.5} />}
diff --git a/apps/screenpipe-app-tauri/components/onboarding/permissions-step.tsx b/apps/screenpipe-app-tauri/components/onboarding/permissions-step.tsx
index d1bc475bc..5419caaaa 100644
--- a/apps/screenpipe-app-tauri/components/onboarding/permissions-step.tsx
+++ b/apps/screenpipe-app-tauri/components/onboarding/permissions-step.tsx
@@ -98,14 +98,6 @@ export default function PermissionsStep({
const mountTimeRef = useRef(Date.now());
const permissions: PermissionDef[] = [
- {
- id: "screen",
- icon: <Monitor className="w-3.5 h-3.5" strokeWidth={1.5} />,
- title: "Capture your screen",
- subtitle: "Lets Screenpipe index what's on your screen — windows, docs, chats, code",
- check: () => commands.checkScreenRecordingPermission(),
- request: () => requestPermissionWithFlow("screenRecording"),
- },
{
id: "mic",
icon: <Mic className="w-3.5 h-3.5" strokeWidth={1.5} />,
@@ -123,6 +115,16 @@ export default function PermissionsStep({
request: () => requestPermissionWithFlow("accessibility"),
macOnly: true,
},
+ {
+ id: "screen",
+ icon: <Monitor className="w-3.5 h-3.5" strokeWidth={1.5} />,
+ title: "Capture your screen",
+ subtitle: "Lets Screenpipe index what's on your screen — windows, docs, chats, code",
+ // requested last: granting this requires an app restart to take effect,
+ // so asking earlier just sends the user back into settings again mid-flow
+ check: () => commands.checkScreenRecordingPermission(),
+ request: () => requestPermissionWithFlow("screenRecording"),
+ },
{
id: "browsers",
icon: <Globe className="w-3.5 h-3.5" strokeWidth={1.5} />,
diff --git a/apps/screenpipe-app-tauri/components/status/permission-banner.tsx b/apps/screenpipe-app-tauri/components/status/permission-banner.tsx
index 507769942..40c6adef6 100644
--- a/apps/screenpipe-app-tauri/components/status/permission-banner.tsx
+++ b/apps/screenpipe-app-tauri/components/status/permission-banner.tsx
@@ -85,14 +85,14 @@ export function PermissionBanner() {
// (e.g. mic prompt, accessibility prompt). If the permission was already
// denied, it falls back to opening System Settings internally.
try {
- if (!permissions.screenOk) await requestPermissionWithFlow("screenRecording");
- else if (!permissions.micOk) await commands.requestPermission("microphone");
+ if (!permissions.micOk) await commands.requestPermission("microphone");
else if (!permissions.accessibilityOk) await requestPermissionWithFlow("accessibility");
+ else if (!permissions.screenOk) await requestPermissionWithFlow("screenRecording");
} catch {
// fallback to opening settings directly
- if (!permissions.screenOk) await openPermissionSettingsWithFlow("screenRecording");
- else if (!permissions.micOk) await commands.openPermissionSettings("microphone");
+ if (!permissions.micOk) await openPermissionSettingsWithFlow("microphone");
else if (!permissions.accessibilityOk) await openPermissionSettingsWithFlow("accessibility");
+ else if (!permissions.screenOk) await openPermissionSettingsWithFlow("screenRecording");
}
}}
>