Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(obsidian): Enhance Sync Experience with Progress Bars and Bug Fixes
This pull request significantly improves the content synchronization experience for Obsidian users by fixing a critical bug and introducing new UI elements for better feedback and monitoring.
The previous implementation could fail with
403 Forbiddenerrors when syncing a large number of files due to server-side rate limiting. This update addresses that issue and provides users with clear, real-time feedback on storage usage and sync progress.Key Changes
🐛 Bug Fix: Sync Robustness (Resolves 403 Errors)
The core sync logic in
updateContentIndexhas been refactored. Instead of sending all file updates at once, the process is now chunked. Files are grouped by type (markdown, pdf, image) and uploaded in sequential batches. This respects server rate limits and ensures that large vaults can be indexed reliably without triggering403errors.✨ New Feature: Cloud Storage Usage Bar
A progress bar has been added to the settings page to display cloud storage usage.
is_activeflag returned from the/api/v1/userendpoint, eliminating fragile client-side heuristics.✨ New Feature: Real-time Sync Progress Bar
When a manual sync is triggered via the "Force Sync" button, a second progress bar now appears, providing real-time feedback on the operation.
onProgress) to cleanly communicate progress from the sync logic (utils.ts) to the UI (settings.ts) without coupling them.🔄 UX Improvement: Auto-refresh After Sync
The Cloud Storage Usage bar is now automatically refreshed upon the completion of a "Force Sync". This ensures the user immediately sees the updated storage estimation without needing to reopen the settings panel.
🛠️ DX Improvement: esbuild Development Workflow
The
esbuild.config.mjshas been enhanced to automatically copy the builtmain.jsandmanifest.jsonfiles to a specified Obsidian plugin directory during development, streamlining the testing and iteration cycle.Visuals