feat: improve sync responsiveness (v1.3.0) - #5
Conversation
- Lower RescanIntervalS default from 3600 to 60 (matches Syncthing's own default) and migrate existing folders that still carry the legacy value. - Auto-trigger a foreground rescan when the app returns to .active after being backgrounded ≥5 seconds — covers cases where the iOS sandbox prevents FSWatcher from seeing Obsidian edits. - Add pull-to-refresh on the main vault list for an explicit user-initiated sync without adding a dedicated button to the home screen. Closes #4
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
📝 WalkthroughWalkthroughThis PR addresses unresponsive sync when editing in third-party apps (e.g., Obsidian) on iOS by reducing the fallback rescan interval from 60 minutes to 60 seconds and triggering responsive foreground rescans. The Go bridge normalizes folder configurations and adds a startup migration, while iOS detects background transitions and optionally rescans with a 5-second debounce threshold. ChangesGo Bridge Rescan Interval Normalization
iOS Foreground Sync Trigger
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Closes #4.
Summary
RescanIntervalSfrom 3600 s to 60 s (Syncthing's own default). Existing folders carrying the legacy 3600 are migrated on bridge start; user-customised values are preserved..activeafter the app was backgrounded for ≥5 s, so edits made in Obsidian on iOS show up without the close-and-reopen workaround.Addresses the issue surfaced on Reddit by u/wet_tank. Cloud Relay does not cover the iPhone → desktop direction (notify lives on the desktop), so the fix lives entirely on the iOS / bridge side.
Test plan
rescan_migration_test.go): default = 60, legacy 3600 → migrated to 60, custom 120 preserved.ForegroundRescanDebounceTests): predicate fires above threshold, skips below, handles nil, fires at exact boundary.RescanIntervalSis 60.This PR improves iPhone → desktop sync responsiveness by reducing fallback rescan latency, adding a foreground rescan when the app returns from background, and exposing a manual pull-to-refresh.
User-visible sync behavior
Implementation highlights
Privacy / security impact
Background execution impact
Test coverage and outstanding verification
Closes #4.