Skip to content

Handle SyncState.CONFLICT — surface conflict to user and allow resolution #93

@jmuci

Description

@jmuci

Context

Currently, sync conflicts are resolved silently server-side (last-write-wins or server wins). This is acceptable for v1 but leaves users unaware that their local edits may have been overwritten.

Desired Behavior

When the server rejects a local change due to a conflict:

  1. Mark the recipe as syncState = CONFLICT in Room
  2. Show the user a non-intrusive indicator (e.g. a yellow badge on the recipe card)
  3. Provide a conflict resolution UI: 'Your version' vs 'Server version' with Keep/Overwrite options

Notes

This is acknowledged as future work — implementing the SyncState.CONFLICT DB state is the key first step. The UI resolution flow can follow.

Acceptance Criteria

  • SyncState.CONFLICT is a valid Room-persisted state
  • Sync worker sets this state when server returns a conflict response
  • Recipe list shows a visual indicator for conflicted recipes
  • (Future) Resolution UI allows choosing local vs server version

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions