Sync conflict UI

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
firebase, react-native, sqlite, typescript

Research direction

Start with firestoreSync.ts and the job list/settings screens to trace conflict statuses and the sync_operations audit path. Run the existing 112 tests before making changes, then verify that conflicts are reachable from the home screen, each resolution action is reversible, and conflict handling has appropriate unit coverage if logic is extracted.

Written by the indexing model from the issue text.

Description

enhancement

Problem

firestoreSync.ts can write a conflict sync status when local and remote diverge, but the UI never surfaces it. Workers will silently lose changes to whichever side was overwritten by last-write-wins.

Why

  • Even one-device-per-user doesn't eliminate conflicts (offline edits + cloud edits in another window)
  • A conflict status that's invisible is a footgun
  • Industry standard for sync engines is to surface conflicts clearly

Proposed solution

  1. Add a "Conflicts" section in the job list / settings screen showing any entities with sync_status = 'conflict'
  2. For each conflict, show local vs remote timestamps and offer three actions:
    • Keep local (push local over remote)
    • Keep remote (pull remote over local)
    • Resolve later (default)
  3. Log every conflict resolution into sync_operations for audit
  4. The existing upsertX last-write-wins behavior stays as the default — this issue is purely about UI

Acceptance

  • A user can find any conflict from the home screen within 2 taps
  • Conflict resolution actions are reversible (resolve to "Keep local" then change to "Keep remote")
  • All 112 existing tests still pass
  • New unit tests for the conflict-detection logic if extracted
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Taleef7/JobTrail

All issues in Taleef7/JobTrail

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.