# feat: merge concurrent page edits during reconciliation · clo/snowbound

[View on GitCafe](https://git.cafe/clo/snowbound/commit/2e2f9466aec89c2ab7fc03378e3cbf975ffd7f9d)

Repository: [clo/snowbound](https://git.cafe/clo/snowbound)

Visibility: public

Requested revision: 2e2f9466aec89c2ab7fc03378e3cbf975ffd7f9d

Requested commit: 2e2f9466aec89c2ab7fc03378e3cbf975ffd7f9d

Commit: 2e2f9466aec89c2ab7fc03378e3cbf975ffd7f9d

Tree: 93307229874c363d3309af701541597e23dc46cf

Author: clover caruso

Committer: clover caruso

## Message

```
feat: merge concurrent page edits during reconciliation

When the remote page changed since a save was made, reconcile by a three-way
merge of page models: the remote page keeps everything it changed and the
local changes are re-applied wherever the two sides touched different
objects, fields or text ranges. Same-paragraph edits reuse the banded text
rebase to place the local replacement inside the remote text; a paragraph
removed on one side and edited on the other, overlapping text ranges, both
sides moving an outline, or both sides reordering the same container remain
ContentChanged conflicts for review_page.

Validation: five sync tests (different paragraphs, same paragraph with and
without overlap, local insertion beside a remote deletion, remote deletion
of the edited paragraph, outline moves against remote text edits and moves)
plus a text-merge unit test; Clippy and fmt.

Assisted-by: claude-fable-5.1

```

## Parents

- [59f5163e0c2a80a4addceedf0e3f4bc3b6c235c3](https://git.cafe/clo/snowbound/commit/59f5163e0c2a80a4addceedf0e3f4bc3b6c235c3?format=markdown)

[Source at this commit](https://git.cafe/clo/snowbound/tree/2e2f9466aec89c2ab7fc03378e3cbf975ffd7f9d?format=markdown)
