feat: introduce Obsidian vault sync plugin#1286
Conversation
…mprove UI components
…es and enhanced settings management
…anagement and API stability
…proved concurrency handling
…chemas, and UI components for cleaner integration
…handling, and streamlined device management
…ing inclusion/exclusion settings and a status modal for real-time updates
…lugin for improved reconciliation and performance
…que index for improved upsert handling
…ing vault fingerprinting and enhance connector management
…connectors to prevent errors during upgrades
…ion, minimum app version, and license details; enhance queue management with debouncing and refactor status modal for clarity
…andling in SurfSense settings
…_INTERNAL_URL` for both next.js rewrite and docker network issues
…tent messaging for 500 status codes
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 2b6c39a..f98803a
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (49)
• .github/workflows/obsidian-plugin-lint.yml
• .github/workflows/release-obsidian-plugin.yml
• docker/.env.example
• docker/docker-compose.yml
• manifest.json
• surfsense_backend/alembic/versions/129_obsidian_plugin_vault_identity.py
• surfsense_backend/app/app.py
• surfsense_backend/app/db.py
• surfsense_backend/app/routes/__init__.py
• surfsense_backend/app/schemas/obsidian_plugin.py
• surfsense_backend/app/services/obsidian_plugin_indexer.py
• surfsense_backend/tests/integration/test_obsidian_plugin_routes.py
• surfsense_obsidian/.editorconfig
• surfsense_obsidian/.gitignore
• surfsense_obsidian/.npmrc
• surfsense_obsidian/AGENTS.md
• surfsense_obsidian/LICENSE
• surfsense_obsidian/README.md
• surfsense_obsidian/esbuild.config.mjs
• surfsense_obsidian/eslint.config.mts
• surfsense_obsidian/manifest.json
• surfsense_obsidian/package.json
• surfsense_obsidian/src/api-client.ts
• surfsense_obsidian/src/excludes.ts
• surfsense_obsidian/src/folder-suggest-modal.ts
• surfsense_obsidian/src/main.ts
• surfsense_obsidian/src/payload.ts
• surfsense_obsidian/src/queue.ts
• surfsense_obsidian/src/settings.ts
• surfsense_obsidian/src/status-bar.ts
• surfsense_obsidian/src/status-modal.ts
• surfsense_obsidian/src/sync-engine.ts
• surfsense_obsidian/src/types.ts
• surfsense_obsidian/src/vault-identity.ts
• surfsense_obsidian/styles.css
• surfsense_obsidian/tsconfig.json
• surfsense_obsidian/version-bump.mjs
• surfsense_obsidian/versions.json
• surfsense_web/.env.example
• surfsense_web/app/api/zero/query/route.ts
• surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsx
• surfsense_web/components/assistant-ui/connector-popup/connect-forms/connector-benefits.ts
• surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsx
• surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsx
• surfsense_web/components/assistant-ui/connector-popup/constants/connector-constants.ts
• surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts
• surfsense_web/lib/apis/connectors-api.service.ts
• surfsense_web/next.config.ts
• versions.json
⏭️ Files skipped (1)
| Locations |
|---|
surfsense_obsidian/package-lock.json |
… legacy obsidian connector
…ions files for SurfSense plugin
…e connection indicator styling in SurfSense plugin
- Added functionality to create and update notifications during the Obsidian sync process. - Improved handling of sync completion and failure notifications. - Updated connector naming convention in various locations for consistency.
…AT installation method
…ian plugin - Added a new Celery task for indexing non-markdown attachments. - Enhanced the Obsidian plugin schema to support binary attachments. - Updated routes to enqueue binary attachments for background processing. - Improved metadata handling for binary attachments during indexing. - Added tests for binary attachment processing and validation.
…port panels - Updated styling for toggle buttons in DocumentsFilters for improved visual feedback. - Added toolbar actions prop to PdfViewer for customizable actions in the zoom toolbar. - Introduced download functionality in ReportPanel with a new Download icon. - Refactored ReportCard to remove word count and display version labels for better clarity. - Enhanced GenerateResume component to fetch and display version information for resumes.
…ng for improved UI consistency
- Changed plugin ID from "surfsense" to "surfsense-obsidian" for clarity. - Updated version from "0.1.1" to "0.1.0" in manifest and versions files. - Modified author URL to point to the official SurfSense website. - Adjusted GitHub release workflow to ensure compatibility with Obsidian and BRAT.
…ugin - Introduced an authentication block mechanism to prevent repeated invalid token submissions. - Updated notification logic to provide clearer feedback on API token status. - Refactored status visuals for better clarity and consistency in the user interface. - Improved connection handling in the sync engine to ensure robust error management.
…logic - Introduced a new `status-visuals.ts` file to centralize status icons and labels for consistency across the plugin. - Updated connection indicator logic in the settings tab to utilize the new centralized visuals. - Removed deprecated connection visual methods to streamline the codebase. - Enhanced error handling in the status bar to reflect the new status visuals structure.
…ugin - Changed initial status to "needs-setup" to prompt user configuration. - Added a refreshStatus method to SyncEngine for immediate status updates after settings changes. - Enhanced connection indicator logic in the settings tab to reflect the new status. - Introduced "needs-setup" status visual for improved user feedback on configuration requirements.
- Added refreshStatus method to update connection status immediately after settings changes. - Enhanced error reporting with reportAuthError method for better authentication feedback. - Updated status visuals in the status modal to reflect the new centralized structure. - Improved connection handling in the settings tab to ensure accurate status representation.
… handling - Included server_time_utc in the connect response schema for better synchronization. - Updated obsidian_connect function to set server_time_utc during connection handling. - Enhanced integration tests to verify the presence of server_time_utc in responses. - Improved connectivity status recovery in the sync engine for better error management.
…s components - Updated icon imports and usages in AssistantMessage, CommentItem, CommentSheet, CommentThread, and InboxSidebar components. - Enhanced visual consistency by standardizing the reply icon throughout the chat-related UI elements.
Description
surfsense_obsidian/) with native vault sync support.vault_idandvault_fingerprintwith DB-level uniqueness constraints..md.pdf,.png,.jpg,.jpeg,.gif,.webp,.svg,.txtMotivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR introduces a native Obsidian vault sync plugin that replaces the legacy server-side file scanner. The plugin runs inside Obsidian on desktop and mobile, pushing vault changes over HTTPS to the SurfSense backend via new
/api/v1/obsidian/*endpoints. It implements realtime sync with persistent queues, fingerprint-based cross-device deduplication, adaptive reconciliation backoff, and tombstone tracking for delete events. The backend adds partial unique indexes onvault_idandvault_fingerprint, deactivates pre-plugin connectors via an Alembic migration, and exposes manifest/stats endpoints for the plugin's diffing logic. The web UI is updated to guide users through plugin installation instead of prompting for vault paths, with separate views for legacy and plugin-driven connectors.⏱️ Estimated Review Time: 3+ hours
💡 Review Order Suggestion
manifest.jsonversions.jsonsurfsense_obsidian/manifest.jsonsurfsense_obsidian/versions.jsonsurfsense_obsidian/README.mdsurfsense_obsidian/package.jsonsurfsense_obsidian/tsconfig.jsonsurfsense_obsidian/eslint.config.mtssurfsense_obsidian/esbuild.config.mjssurfsense_backend/app/schemas/obsidian_plugin.pysurfsense_backend/app/routes/obsidian_plugin_routes.pysurfsense_backend/app/services/obsidian_plugin_indexer.pysurfsense_backend/alembic/versions/129_obsidian_plugin_vault_identity.pysurfsense_backend/app/db.pysurfsense_backend/app/app.pysurfsense_backend/app/routes/__init__.pysurfsense_obsidian/src/types.tssurfsense_obsidian/src/api-client.tssurfsense_obsidian/src/queue.tssurfsense_obsidian/src/vault-identity.tssurfsense_obsidian/src/excludes.tssurfsense_obsidian/src/payload.tssurfsense_obsidian/src/sync-engine.tssurfsense_obsidian/src/main.tssurfsense_obsidian/src/settings.tssurfsense_obsidian/src/status-bar.tssurfsense_obsidian/src/status-modal.tssurfsense_obsidian/src/folder-suggest-modal.tssurfsense_obsidian/styles.csssurfsense_backend/tests/integration/test_obsidian_plugin_routes.py.github/workflows/obsidian-plugin-lint.yml.github/workflows/release-obsidian-plugin.ymlsurfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsxsurfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsxsurfsense_web/components/assistant-ui/connector-popup/connector-benefits.tssurfsense_web/components/assistant-ui/connector-popup/constants/connector-constants.tssurfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.tssurfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsxsurfsense_web/lib/apis/connectors-api.service.tssurfsense_web/.env.examplesurfsense_web/app/api/zero/query/route.tssurfsense_web/next.config.tsdocker/.env.exampledocker/docker-compose.ymlsurfsense_obsidian/LICENSEsurfsense_obsidian/AGENTS.mdsurfsense_obsidian/.editorconfigsurfsense_obsidian/.gitignoresurfsense_obsidian/.npmrcsurfsense_obsidian/version-bump.mjs