Skip to content

v1.0.5 - Fix Initial Sync & Vault Deletion Protection

Choose a tag to compare

@Llewellyn500 Llewellyn500 released this 21 May 01:53
· 16 commits to main since this release

What's Fixed

πŸ› Critical: Vault content now actually uploads to Google Drive on first setup

This was the #1 reported issue. After selecting a Google Drive folder for the first time, Tether would run a pull against the empty remote folder, mark the initial pull as complete, and then stop β€” never actually pushing your vault content to Drive. The folder was created correctly, but your files never made it there.

On the next sync cycle, because the remote folder was still empty, a pull would see zero remote files and delete your entire local vault to match the empty remote. This is now fixed:

  • After the initial pull completes, Tether immediately chains a push to upload all your vault content to the selected Drive folder.
  • This applies to both manual sync (triggered from settings or commands) and background sync.

πŸ›‘οΈ Catastrophic deletion safeguards

Even with the sync flow fixed, we've added an extra safety net to prevent mass data loss:

  • Pull protection: If a pull would delete more than 80% of your tracked local files (when you have 10+ tracked files), Tether aborts all deletions and shows a warning notice instead of wiping your vault.
  • Push protection: Same safeguard for remote deletions β€” if a push would delete more than 80% of tracked remote files, it aborts and warns you.

This ensures that even in edge cases (network issues, API errors, corrupted state), Tether won't silently destroy your data.

πŸ’¬ Better OAuth error messages

When Google returns a redirect_uri_mismatch error during login, Tether now shows the exact redirect URI you need to add in your Google Cloud Console, instead of a generic "Login failed" message:

Redirect URI mismatch. In Google Cloud Console β†’ Credentials β†’ your OAuth client, add this exact Authorized redirect URI: https://llewellyn500.github.io/obsidian-tether/oauth/callback.html


After Updating

  1. Update the plugin to v1.0.5
  2. If you previously selected a folder but nothing synced, go to Tether settings β†’ Step 3 and re-select your folder (or click Push in Step 4)
  3. Your vault content should now upload to Google Drive immediately

Files Changed

  • main.ts β€” Fixed manualSync() and backgroundSync() to chain pullβ†’push on initial setup
  • sync/engine.ts β€” Added deletion threshold safeguards to both pull and push deletion handlers
  • auth/oauth.ts β€” Added redirect_uri_mismatch error detection with actionable message
  • manifest.json / package.json β€” Version bump to 1.0.5

Fixes #1