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

Bump app to v2.4.49 — calendar_reset_permission + v2.4.48 defaults

Louis Beaumont1b821a8ab979
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index b1eabdc8a..118ae550c 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9726,7 +9726,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.4.45"
+version = "2.4.49"
dependencies = [
"anyhow",
"arboard",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 59276bd5a..4a35d418c 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.4.48"
+version = "2.4.49"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/calendar.rs b/apps/screenpipe-app-tauri/src-tauri/src/calendar.rs
index ec4cffac1..e6a3e249d 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/calendar.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/calendar.rs
@@ -138,6 +138,59 @@ pub async fn calendar_status() -> Result<CalendarStatus, String> {
}
}
+/// Reset TCC (privacy) permission for Calendars on this app's bundle ID.
+///
+/// Why: users (Mike, Jarad, Ruark, Louis's own Mac mini) clicked
+/// "Fix Calendar Permission" → macOS opened the Calendars privacy pane
+/// with an EMPTY app list, so they had no way to grant access. Root cause
+/// is a stale TCC record (dev-build → prod-build reinstall, OS update,
+/// user previously revoked etc.) where macOS silently refuses to re-add
+/// the app on subsequent requestFullAccessToEventsWithCompletion calls.
+///
+/// `tccutil reset Calendars <bundle_id>` clears that stale record. Next
+/// call to requestFullAccessToEventsWithCompletion then shows the native
+/// consent popup again and registers the app in Privacy → Calendars.
+///
+/// Bundle ID is read at runtime from the running app (not hard-coded), so
+/// this works for both `screenpi.pe` (prod) and `screenpi.pe.dev` (dev).
+/// No sudo required — tccutil's per-app user scope is user-writable.
+#[tauri::command]
+#[specta::specta]
+pub async fn calendar_reset_permission(
+ app: tauri::AppHandle,
+) -> Result<String, String> {
+ #[cfg(target_os = "macos")]
+ {
+ use tauri::Manager;
+ let bundle_id = app
+ .config()
+ .identifier
+ .clone();
+ if bundle_id.is_empty() {
+ return Err("no bundle identifier in app config".to_string());
+ }
+ info!(
+ "calendar: resetting TCC Calendars permission for bundle {}",
+ bundle_id
+ );
+ let output = tokio::process::Command::new("tccutil")
+ .args(["reset", "Calendars", &bundle_id])
+ .output()
+ .await
+ .map_err(|e| format!("failed to run tccutil: {}", e))?;
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ return Err(format!("tccutil failed: {}", stderr.trim()));
+ }
+ Ok(format!("reset ok for {}", bundle_id))
+ }
+ #[cfg(not(target_os = "macos"))]
+ {
+ let _ = app;
+ Err("only available on macOS".into())
+ }
+}
+
/// Request Calendar permission (shows one-time macOS popup).
/// Returns "granted", "denied", or an error message.
#[tauri::command]
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 7077b5a34..c16a3b382 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -691,6 +691,7 @@ async fn main() {
// Calendar commands
calendar::calendar_status,
calendar::calendar_authorize,
+ calendar::calendar_reset_permission,
calendar::calendar_get_events,
calendar::calendar_get_current_meeting,
// ICS Calendar commands
@@ -972,6 +973,7 @@ async fn main() {
// Calendar commands
calendar::calendar_status,
calendar::calendar_authorize,
+ calendar::calendar_reset_permission,
calendar::calendar_get_events,
calendar::calendar_get_current_meeting,
// ICS Calendar commands