WarUI

Server persistence adapter with conflict handling

GRID-A21-F17P1baselinePlanned

Provides a reference HTTP adapter that saves state to an application server, with optimistic concurrency based on ETags or revision numbers, retry with backoff, and offline queueing. The adapter is transport-agnostic through a user-supplied fetch function and carries no hidden telemetry.

Planned. This page shows the specification from issue #201. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid using a mock server with simulated latency and a server log panel.

Expected behavior

Changes are saved after the debounce interval, with the revision shown in the log. Simulating a concurrent edit causes the next save to receive a 409-style conflict, which is resolved according to the chosen strategy. In prompt mode, a dialog offers 'keep mine' or 'use theirs'. Changes made while offline are queued and sent on reconnect.

Planned API surface

createServerAdapter({fetcher, endpoint, headers, revisionField})onStateConflictconflictStrategy:'server-wins'|'client-wins'|'prompt'offlineQueue

Acceptance criteria

  • Each save includes the last known revision, and the server's response updates it. (pending)
  • Conflicts invoke onStateConflict with both the local and remote state. (pending)
  • Offline saves collapse into a single pending save that is sent on reconnect. (pending)
  • The adapter never sends data to any endpoint other than the configured one. (pending)
  • Adapter requests can be cancelled when the grid is destroyed. (pending)