minutes icon indicating copy to clipboard operation
minutes copied to clipboard

feat: Tauri vault setup with NSOpenPanel (Phase 2)

Open silverstein opened this issue 8 months ago • 0 comments

Context

PR #4 added vault sync with three strategies (symlink, copy, direct) and a CLI wizard. However, the CLI can't create symlinks or copy files into ~/Documents/ without the terminal having Full Disk Access — which most users won't grant.

The Tauri desktop app (Minutes.app) CAN bypass this using NSOpenPanel, which grants scoped file access without FDA.

Scope

Tauri plugin + entitlement

  • Add tauri-plugin-dialog dependency to tauri/src-tauri/Cargo.toml
  • Add com.apple.security.files.user-selected.read-write to entitlements.plist
  • Optionally add tauri-plugin-fs for scoped file operations

New Tauri command: cmd_vault_setup

  • Opens native folder picker (NSOpenPanel) → user selects vault root
  • Gets security-scoped bookmark for the folder
  • Calls vault::create_symlink() or saves config for copy mode
  • Persists the bookmark so the app can access the vault on future launches

Settings UI

  • Add "Vault" section to the settings page
  • Show current vault status (calls vault::check_health())
  • "Set Up Vault" button → triggers folder picker flow
  • "Unlink" button → calls vault::unlink()

Background sync

  • After each recording completes, call vault::sync_file() using the scoped bookmark
  • For copy strategy: the Tauri app can copy to ~/Documents/ because it has the bookmark
  • For symlink strategy: no ongoing action needed (symlink was created at setup)

Capabilities

  • Add dialog:allow-open to capabilities/default.json

Depends on

  • #4 (vault sync core — merged or in progress)

Acceptance criteria

  • [ ] User can click "Set Up Vault" in Minutes.app, pick their Obsidian vault in ~/Documents/, and meetings appear there
  • [ ] No Full Disk Access required
  • [ ] Vault health status visible in settings
  • [ ] Works after app restart (bookmark persisted)

silverstein avatar Mar 21 '26 18:03 silverstein