From 0c58b0c513be0d576288bfe1347744eda661cd10 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 11:07:09 +0000 Subject: [PATCH 1/6] test: reproduce conflict issue reports --- src/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib b/src/lib index 87dc724..be43ca7 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 87dc724c9d74962d63173bf4da3d1aa74fd0c7d4 +Subproject commit be43ca7686a4c820bced87d7a95c4e48604b3a2c From 8046a777af418ae92738c5f6af0a4b9482aeae02 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 11:29:51 +0000 Subject: [PATCH 2/6] fix: refine conflict merge policy --- devs.md | 14 ++++++++++++++ src/lib | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/devs.md b/devs.md index d994d5e..bb74a1c 100644 --- a/devs.md +++ b/devs.md @@ -148,6 +148,20 @@ Hence, the new feature should be implemented as follows: - **Service Hub** (`src/modules/services/`): Central service registry using dependency injection - **Common Library** (`src/lib/`): Platform-independent sync logic, shared with other tools +### Conflict Merge Policy + +Markdown conflict auto-merge should behave like a conservative three-way merge. The guiding rule is to merge changes when they touch non-overlapping regions, and to keep a manual conflict when the edits overlap semantically. + +When in doubt, prefer the safer outcome: preserve data, keep the conflict visible, and ask the user rather than silently discarding content or choosing one side. + +- If one side deletes a line and the other side leaves that same line unchanged, treat it as a safe deletion. The deleted line must not be reintroduced into the merged result. +- If one side inserts new content in a different region while the other side deletes an unchanged old region, preserve the insertion and the deletion. +- If one side deletes a line and the other side modifies that same line, keep the conflict for user resolution. +- If both sides insert different content at the same position, keep both insertions in a deterministic order unless the surrounding deletion context indicates that they are competing replacements. +- Avoid resolving conflicts by simply choosing the newest revision unless the user has explicitly selected that behaviour. + +This policy is intentionally aligned with the conflict checkboxes and compatibility settings: automatic merge should remove avoidable prompts, but it must not silently choose between overlapping user intentions. + ### File Structure Conventions - **Platform-specific code**: Use `.platform.ts` suffix (replaced with `.obsidian.ts` in production builds via esbuild) diff --git a/src/lib b/src/lib index be43ca7..6bba9fd 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit be43ca7686a4c820bced87d7a95c4e48604b3a2c +Subproject commit 6bba9fd237c7008bcf4e58470bbb21a059ca241b From bec767c13fe704553e6949905dd11046ab59506d Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 11:30:36 +0000 Subject: [PATCH 3/6] add notes --- updates.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/updates.md b/updates.md index 5f37ffa..809b906 100644 --- a/updates.md +++ b/updates.md @@ -3,6 +3,18 @@ Since 19th July, 2025 (beta1 in 0.25.0-beta1, 13th July, 2025) The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md). Because 0.25 got a lot of updates, thankfully, compatibility is kept and we do not need breaking changes! In other words, when get enough stabled. The next version will be v1.0.0. Even though it my hope. +## Unreleased + +### Fixed + +- Improved Markdown conflict auto-merge so that non-overlapping edits are merged while overlapping delete-and-edit cases remain visible for manual resolution (#993). + - Behaviour change: + - When one side deletes an unchanged line and the other side edits a different region, the deleted line is no longer reintroduced into the merged result. + - When one side deletes a line and the other side modifies that same line, the conflict is preserved instead of silently choosing one side. +- Fixed an issue where applying a newer database entry to storage could incorrectly preserve an older local file as a conflict (#994). + - Behaviour change: + - Local storage is preserved as a conflict only when it is actually newer than the incoming database entry and is not already represented in the revision history. + ## 0.25.79 29th June, 2026 From 05e031b90b06af55d1f5b4610d7428f566705f48 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 11:31:29 +0000 Subject: [PATCH 4/6] update submodule pointer --- src/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib b/src/lib index 6bba9fd..bb9ed00 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 6bba9fd237c7008bcf4e58470bbb21a059ca241b +Subproject commit bb9ed0047c7444db3a9fbc164fe981aee0208c51 From eed0fca8d369102f41e709e07eabef0d665580b0 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 12:00:24 +0000 Subject: [PATCH 5/6] fix: preserve ambiguous conflict candidates --- src/lib | 2 +- updates.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib b/src/lib index bb9ed00..5ea74b5 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit bb9ed0047c7444db3a9fbc164fe981aee0208c51 +Subproject commit 5ea74b5d877edece5f852794ab4fe82a1978212f diff --git a/updates.md b/updates.md index 809b906..a2da009 100644 --- a/updates.md +++ b/updates.md @@ -13,7 +13,7 @@ The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsid - When one side deletes a line and the other side modifies that same line, the conflict is preserved instead of silently choosing one side. - Fixed an issue where applying a newer database entry to storage could incorrectly preserve an older local file as a conflict (#994). - Behaviour change: - - Local storage is preserved as a conflict only when it is actually newer than the incoming database entry and is not already represented in the revision history. + - Local storage is preserved as a conflict when it may contain unsynchronised changes that are not represented in the revision history. If the incoming database entry is clearly newer, it is applied to storage instead. ## 0.25.79 From dbcbf2c5ca9642b1703703942195342bd547c529 Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Tue, 7 Jul 2026 12:05:40 +0000 Subject: [PATCH 6/6] fix: document safer conflict preservation --- src/lib | 2 +- updates.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib b/src/lib index 5ea74b5..a0efb72 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 5ea74b5d877edece5f852794ab4fe82a1978212f +Subproject commit a0efb7274e15c4ae0f0e0740670a1ad2699031e9 diff --git a/updates.md b/updates.md index a2da009..dd669b5 100644 --- a/updates.md +++ b/updates.md @@ -13,7 +13,7 @@ The head note of 0.25 is now in [updates_old.md](https://github.com/vrtmrz/obsid - When one side deletes a line and the other side modifies that same line, the conflict is preserved instead of silently choosing one side. - Fixed an issue where applying a newer database entry to storage could incorrectly preserve an older local file as a conflict (#994). - Behaviour change: - - Local storage is preserved as a conflict when it may contain unsynchronised changes that are not represented in the revision history. If the incoming database entry is clearly newer, it is applied to storage instead. + - Local storage is preserved as a conflict when it may contain unsynchronised changes that are not represented in the revision history. A newer incoming text entry is applied without creating a conflict only when it clearly extends the existing local text. ## 0.25.79