Files
buzz/desktop/src-tauri
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger 1747d2ec56 feat(desktop): publish persona create/edit/delete to the relay
Persona create, edit, and delete now reach the relay so personas persist
across reboots and reflect in other Buzz clients. #939 built the local
retention primitives but left them inert; this wires every persona writer
to a single publish path.

pending_sync is the seam: each writer (UI create/edit, delete tombstone,
launch reconcile) retains a signed event locally with pending_sync = 1 while
holding the managed-agents store lock, and one background flush loop is the
sole relay publisher. Delete purges the persona's retention row inside the
lock-held command body (closing the same-second resurrect race) and enqueues
a NIP-09 a-tag-only kind:5 tombstone for the flush loop to publish out of
band. mark_synced is compare-and-clear on created_at+content so an edit
landing mid-flush is never falsely cleared. Ownership is intrinsic to the
signing key, so the only skip anywhere is is_builtin.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-06-18 16:27:19 -04:00
..
2026-06-11 15:06:24 +00:00