Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
```

<Warning>
The following structure is only received by the backend if the transactions are not mutated in your clients `uploadData` function
The following structure is only received by the backend if the transactions are not mutated in your client's `uploadData` function
</Warning>

**Backend API receives:**
Expand All @@ -101,10 +101,10 @@
"op": "PATCH",
"table": "todos",
"id": "44f21466-d031-11f0-94bd-62f5a66ac26c",
"opData": {

Check warning on line 104 in usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx#L104

Did you really mean 'opData'?
"completed": 1,
"completed_at": "2025-12-03T10:20:04.658Z",

Check warning on line 106 in usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx#L106

Did you really mean 'completed_at'?
"completed_by": "c7b8cc68-41dd-4643-b559-66664ab6c7c5"

Check warning on line 107 in usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx#L107

Did you really mean 'completed_by'?
}
}
]
Expand All @@ -119,7 +119,7 @@

## Implementation Examples

The following examples demonstrate the core logic and patterns for implementing conflict resolution strategies. All client-side code is written for React/Web applications, backend examples use Node.js, and database queries target PostgreSQL. While these examples should work as-is, they're intended as reference implementations, focus on understanding the underlying patterns and adapt them to your specific stack and requirements.
The following examples demonstrate the core logic and patterns for implementing conflict resolution strategies. All client-side code is written for React/Web applications, backend examples use Node.js, and database queries target Postgres. While these examples should work as-is, they're intended as reference implementations, focus on understanding the underlying patterns and adapt them to your specific stack and requirements.

---

Expand Down Expand Up @@ -479,7 +479,7 @@

## Strategy 5: Server-Side Conflict Recording

Sometimes you can’t automatically fix a conflict. Both versions might be valid, and you need a human to choose. In those cases you record the conflict instead of picking a winner. You save both versions in a write_conflicts table and sync that back to the client so the user can decide.

Check warning on line 482 in usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx

View check run for this annotation

Mintlify / Mintlify Validation (powersync) - vale-spellcheck

usage/lifecycle-maintenance/handling-update-conflicts/custom-conflict-resolution.mdx#L482

Did you really mean 'write_conflicts'?

The flow is simple: detect the conflict, store the client and server versions, surface it in the UI, and let the user choose or merge. After they resolve it, you mark the conflict as handled.

Expand Down Expand Up @@ -1168,4 +1168,7 @@
Track how often conflicts occur and why. This data helps you improve UX or adjust resolution strategies.

**Leverage CRDTs for collaborative docs:**
For scenarios with real-time collaboration, consider CRDTs to automatically handle concurrent edits. For information on CRDTs, see [separate guide](/usage/use-case-examples/crdts).
For scenarios with real-time collaboration, consider CRDTs to automatically handle concurrent edits. For information on CRDTs, see [our separate guide](/usage/use-case-examples/crdts).

**Collaborative editing without using CRDTs:**
You can use PowerSync for collaborative text editing without the complexity of CRDTs. See Matthew Weidner's blog post on [collaborative text editing using PowerSync](https://www.powersync.com/blog/collaborative-text-editing-over-powersync).