# Merge cloud edits by field on the server · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/692cedf9afadb556b2d6fe8895133ed38408341b)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 692cedf9afadb556b2d6fe8895133ed38408341b

Requested commit: 692cedf9afadb556b2d6fe8895133ed38408341b

Commit: 692cedf9afadb556b2d6fe8895133ed38408341b

Tree: 0f87b318670684adf0e252771a8aa9a003deff34

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Merge cloud edits by field on the server

A patch can now name the fields it changed (merge.fields). The server
writes only those onto the row as it is now, without a revision check, so
two teammates changing different things of one item both land and the
last write to a field wins. Lineup groups merge by item and are checked
as a whole afterwards (merge_invalid). Work that waited offline sends the
base value of each field, and a field a teammate changed meanwhile refuses
the op (field_conflict). A delete with lastWriterWins skips the revision
check. Patches that cannot merge by field (a different payload version, or
a change of what the element is) are applied as whole, revision-checked
writes, and clients that send no merge keep today's behaviour exactly.

docs/collaborative-editing.md describes the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [656ac5e12d1a6d3f7fbbc69198235bf4fae29821](https://git.cafe/dara/icarus/commit/656ac5e12d1a6d3f7fbbc69198235bf4fae29821?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/692cedf9afadb556b2d6fe8895133ed38408341b?format=markdown)
