Collaborative form
Two replicas of one form, there to make a single decision visible: which field type you pick determines what happens when two people edit the same thing at once - one value wins for a map entry, both edits survive in a nested text.
Two replicas of one form
Three map entries and one nested text. Edit a field in either replica and watch the other follow.
Opening two replicas…
Map entries and a nested text
Most collaborative features are not documents. They are forms, settings panels and entity editors whose shape is already a C# type. This page is two replicas of one such form, and it exists to make a single decision visible: which field type you pick determines what happens when two people edit the same thing at once.
The three fields at the top are plain map entries. Different fields never conflict - one person can change the title while another changes the owner and both survive, which is already better than the usual save-the-whole-record approach. But two people editing the same map field concurrently resolve last-writer-wins: one value survives, deterministically but arbitrarily, and the other is gone.
The notes field at the bottom is a nested BcrdtText instead. Concurrent edits to
it merge character by character, exactly as on the text page.
form.EnsureText("notes").Insert(0, "..."); // a nested text: both edits merge form.Set("title", "..."); // a map entry: one side wins