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: add -mmacosx-version-min=10.15 to CFLAGS/CXXFLAGS

Louis Beaumont74dd9d2966bb
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index f2998d75d..9ebf8e71f 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -543,9 +543,10 @@ jobs:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os_type == 'macos' && '10.15' || '' }}
# Fix i8mm build error - force M1 compatible architecture
# -U__ARM_FEATURE_MATMUL_INT8 undefines i8mm macro
+ # -mmacosx-version-min=10.15 ensures std::filesystem is available
# See: https://github.com/ggml-org/whisper.cpp/issues/3427
- CFLAGS: ${{ matrix.target == 'aarch64-apple-darwin' && '-mcpu=apple-m1 -U__ARM_FEATURE_MATMUL_INT8' || '' }}
- CXXFLAGS: ${{ matrix.target == 'aarch64-apple-darwin' && '-mcpu=apple-m1 -U__ARM_FEATURE_MATMUL_INT8' || '' }}
+ CFLAGS: ${{ matrix.os_type == 'macos' && (matrix.target == 'aarch64-apple-darwin' && '-mmacosx-version-min=10.15 -mcpu=apple-m1 -U__ARM_FEATURE_MATMUL_INT8' || '-mmacosx-version-min=10.15') || '' }}
+ CXXFLAGS: ${{ matrix.os_type == 'macos' && (matrix.target == 'aarch64-apple-darwin' && '-mmacosx-version-min=10.15 -mcpu=apple-m1 -U__ARM_FEATURE_MATMUL_INT8' || '-mmacosx-version-min=10.15') || '' }}
# Optimize for build speed on Windows
CARGO_PROFILE_RELEASE_LTO: ${{ matrix.os_type == 'windows' && 'thin' || 'false' }}
CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ matrix.os_type == 'windows' && '2' || '3' }}
diff --git a/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx b/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx
index f4b85bc5b..dc4e21d8c 100644
--- a/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx
+++ b/screenpipe-app-tauri/components/settings/obsidian-sync-card.tsx
@@ -196,13 +196,51 @@ export function ObsidianSyncCard() {
fetchStatus();
}, []);
- // Save settings to localStorage when they change (only after initial load)
+ // Save settings to localStorage immediately
useEffect(() => {
if (settingsLoaded) {
localStorage.setItem("obsidian-sync-settings", JSON.stringify(settings));
}
}, [settings, settingsLoaded]);
+ // Debounced save to Rust store (just persist, don't restart scheduler)
+ useEffect(() => {
+ if (!settingsLoaded) return;
+
+ const timeoutId = setTimeout(() => {
+ // Save to Rust store for persistence across app restarts
+ invoke("obsidian_save_settings", { settings }).catch((e) => {
+ console.error("Failed to save obsidian settings to store:", e);
+ });
+ }, 1000); // 1 second debounce
+
+ return () => clearTimeout(timeoutId);
+ }, [settings, settingsLoaded]);
+
+ // Only restart scheduler when interval changes (not on every settings change)
+ const prevIntervalRef = React.useRef(settings.syncIntervalMinutes);
+ const prevEnabledRef = React.useRef(settings.enabled);
+
+ useEffect(() => {
+ if (!settingsLoaded) return;
+
+ const intervalChanged = prevIntervalRef.current !== settings.syncIntervalMinutes;
+ const enabledChanged = prevEnabledRef.current !== settings.enabled;
+
+ prevIntervalRef.current = settings.syncIntervalMinutes;
+ prevEnabledRef.current = settings.enabled;
+
+ // Only restart if interval or enabled status changed
+ if ((intervalChanged || enabledChanged) && settings.enabled && isValidVault && settings.syncIntervalMinutes > 0 && appSettings?.user?.token) {
+ invoke("obsidian_start_scheduler", {
+ settings,
+ userToken: appSettings.user.token
+ }).catch((e) => {
+ console.error("Failed to restart scheduler:", e);
+ });
+ }
+ }, [settings.syncIntervalMinutes, settings.enabled, settingsLoaded, isValidVault, appSettings?.user?.token]);
+
// Validate vault path when it changes
useEffect(() => {
if (settings.vaultPath) {
diff --git a/screenpipe-app-tauri/lib/utils/tauri.ts b/screenpipe-app-tauri/lib/utils/tauri.ts
index baa583736..32fa6b518 100644
--- a/screenpipe-app-tauri/lib/utils/tauri.ts
+++ b/screenpipe-app-tauri/lib/utils/tauri.ts
@@ -406,6 +406,17 @@ async opencodeInstall() : Promise<Result<null, string>> {
else return { status: "error", error: e as any };
}
},
+/**
+ * Save obsidian settings to persistent store (called when settings change)
+ */
+async obsidianSaveSettings(settings: ObsidianSyncSettings) : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("obsidian_save_settings", { settings }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
/**
* Validate that a path is a valid Obsidian vault (has .obsidian folder)
*/
diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rs
index 36a4cfb22..a61e028be 100755
--- a/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -727,7 +727,7 @@ async fn main() {
let sentry_guard = if !telemetry_disabled {
Some(sentry::init((
- "https://ee250955c0511823f71188e7cd64cf5f@o4505591122886656.ingest.us.sentry.io/4510761352364032",
+ "https://da4edafe2c8e5e8682505945695ecad7@o4505591122886656.ingest.us.sentry.io/4510761355116544",
sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
@@ -826,6 +826,7 @@ async fn main() {
opencode::opencode_check,
opencode::opencode_install,
// Obsidian Sync commands
+ obsidian_sync::obsidian_save_settings,
obsidian_sync::obsidian_validate_vault,
obsidian_sync::obsidian_get_vault_paths,
obsidian_sync::obsidian_get_sync_status,
@@ -970,6 +971,7 @@ async fn main() {
opencode::opencode_check,
opencode::opencode_install,
// Obsidian Sync commands
+ obsidian_sync::obsidian_save_settings,
obsidian_sync::obsidian_validate_vault,
obsidian_sync::obsidian_get_vault_paths,
obsidian_sync::obsidian_get_sync_status,
diff --git a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
index 496c135cf..2fae5a3e7 100644
--- a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
+++ b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs
@@ -164,6 +164,10 @@ Create/append to the daily log file using this markdown table format:
- Use curl to fetch data from the API
- Write files using the write tool
- Create the subfolder structure if it doesn't exist
+- ONLY create/modify the single daily log file (YYYY-MM-DD.md) - DO NOT create any other files like INDEX.md, TODO.md, QUICK_REF.txt, etc.
+- Each sync should append to or update the existing daily log file, not create new files
+- Use the user's LOCAL timezone for all times displayed in the log (convert UTC timestamps to local time)
+- Detect timezone from the system or use the timestamp offsets in the data
"#;
/// Build the full prompt for opencode
@@ -200,6 +204,26 @@ Output file: {}
prompt
}
+/// Save obsidian settings to persistent store (called when settings change)
+#[tauri::command]
+#[specta::specta]
+pub async fn obsidian_save_settings(
+ app: AppHandle,
+ settings: ObsidianSyncSettings,
+) -> Result<(), String> {
+ let store_settings = ObsidianSettingsStore {
+ enabled: settings.enabled,
+ vault_path: settings.vault_path,
+ notes_path: settings.notes_path,
+ sync_interval_minutes: settings.sync_interval_minutes,
+ custom_prompt: settings.custom_prompt,
+ sync_hours: settings.sync_hours,
+ };
+ store_settings.save(&app)?;
+ info!("Obsidian settings saved to store");
+ Ok(())
+}
+
/// Validate that a path is a valid Obsidian vault (has .obsidian folder)
#[tauri::command]
#[specta::specta]