logoalt Hacker News

MegagramEnjoyeryesterday at 2:48 PM2 repliesview on HN

if you mean why I didn't choose a lib like automerge, yjs and instead handrolled it - that's because these libs are geared towards plaintext.

Bramble's sync is built around its own encrypted vault instead. When two devices conflict it just compares timestamps on the encrypted entries and keeps the newer one as-is, without ever unwrapping your per-entry keys to merge. Nothing off the shelf did that against my vault format, so the core is custom. It's a pretty simple implementation tbh


Replies

cickoyesterday at 8:53 PM

This deserves a bit more explanation (sorry, on the phone, can't look at the code in the next couple of days). So, if I change the password and update it on the phone, then add a web site on the desktop, when they sync, the desktop entry will overwrite the new password? Hope it's not that simple.

jjnoakesyesterday at 8:10 PM

Last writer wins may be sufficient for some folks but for me, any potential data loss in an app like this is a deal breaker. I hope you'll consider some kind of merge conflict detection and surfacing that to the user. Even keeping a list of deleted items and showing that can be a good start.