Commit 63e5fcb
Sync (#149)
* Add encrypted sync via Nostr relay with NIP-CF changes feed
Sync engine (sync.rs) connects to a configured relay via WebSocket,
authenticates with NIP-42, and subscribes to NIP-CF CHANGES feed for
gift-wrapped (NIP-59) events. Notes are encrypted end-to-end — the
relay only sees opaque kind:1059 blobs.
- SyncManager as Tauri managed state with auto-start on app launch
- Note-to-event mapping: notes become kind:30023 rumors, sealed and
gift-wrapped to self with NIP-44 encryption
- Bidirectional sync: local mutations push to relay with 2s debounce,
remote changes upsert locally with last-write-wins resolution
- Echo prevention via recently-pushed event ID tracking
- Exponential backoff reconnection on disconnect
- Sync state reset on relay or identity change
- DB migration adds sync_event_id column for deletion targeting
- Sync status indicator in sidebar (cloud icons for connected/syncing/error/disconnected)
- Seed script updated with stable test keypair and sync_event_id column
* formatting
* fix package issue
* Fix sync deletion to pre-fetch event ID before local delete
The sync_event_id must be read before delete_note_permanently destroys
the row, and the deletion push should only fire after the local delete
succeeds. Pass the pre-fetched ID through the SyncCommand to avoid a
redundant query against a now-missing row.
* Add Apple code signing and notarization to CI builds on master
* Add GitHub release with DMG artifacts on push to master
After the build matrix completes, a release job collects the aarch64
and x86_64 DMGs and publishes them as a GitHub release tagged by
commit SHA.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 48a2902 commit 63e5fcb
1 file changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
0 commit comments