Sync / Replicated state

The model

server:    A  B  C          committed, in the server's order
pending:            D  E    this device's edits the server has not confirmed
visible:   replay(A, B, C, D, E)

When the server commits something else first, the base moves and the pending edits are replayed on top; when it rejects D, D is dropped and E is replayed. Both are the same move, a rebase. There is no undo function and no separate optimistic store to patch.

An edit passes three milestones. A UI that says "saved" means the second; one that says "shared" means the third.

MilestoneWhereReader
visiblethe Model, at oncethe view
savedthe local outboxonPersistenceFailure says when it is not
committedthe server journalreplica.status.pending, mounted.committed