mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 12:06:57 +02:00
Address review feedback on the concurrent-edit merge change: - When no base snapshot is available (e.g. a metadata-only change bumped the version without creating a snapshot, or the base was pruned), mergeContentUpdate now keeps the incoming edit instead of discarding it in favour of the server copy, and logs a warning. Dropping it silently lost the user's offline edits. - Unify getBaseContent into one shared helper in versions-service and drop sync's "fall back to the latest snapshot" branch: a base newer than what the client actually saw made the 3-way merge treat other users' lines as deletions and silently remove them. - Remove the now-dead mergeContentTwoWay helper. - Add coverage: null-base keeps incoming (unit), a metadata-bump concurrent edit is preserved (integration), and getBaseContent returns null rather than a newer snapshot. Verified the null-base cases fail against the old drop-incoming behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>