API Reference
resolveUnifiedConflict()
The write side of the universal conflict register — takes a user's decision on one frozen conflict and either discards the local change, overwrites the server, or sends a merged payload. Updates the register instantly, then executes the decision.
Prerequisites
- A conflict frame read from getActiveConflicts() or subscribeToConflicts()
- api/get-active-conflicts for the UnifiedConflictFrame shape this call consumes
1
Basic usage
Call this once per conflict, with the
recordId from the UnifiedConflictFrame you're resolving.typescript
2
Signature
mergedPayload is only required — and only used — when decision is 'apply_merged'.typescript
3
What each decision does
The three decisions map directly onto the same outcomes a per-channel
onConflict callback can return during the handshake itself — this is just the developer-driven equivalent, fired later from your own UI.typescript
4
Order of operations
The register updates before anything else happens — your conflict panel reflects the resolution instantly, even if the follow-up network call takes a moment to complete.
typescript
Conflicting entries stay frozen, never lost, until this is called
A conflicting entry is never deleted from IDB the moment it's detected — it's held exactly as-is until resolveUnifiedConflict() runs, so there's no window where the user's offline change could be silently lost before they've made a choice.
5
Scoped execution
The follow-up replay this triggers for
'proceed' and 'apply_merged' is scoped the same way every other replay call is — resolved from the target store's own registration, not the active session.typescript
6
Bypasses the replay cooldown
Automatic replay triggers are throttled by a 4-second cooldown to avoid hammering the server from stacked events. A manual resolution is explicit user intent, so it skips that cooldown entirely.
typescript
7
Building the resolution UI
A typical panel renders each frame from
getActiveConflicts() or useFlux().activeConflicts, and wires each button directly to a decision.typescript
For reading the conflicts this call resolves, see api/get-active-conflicts. To discard a queued entry outright without going through a conflict decision, see abandonQueueEntry() in core-concepts/offline-queue.