ossappscollective / ossappscollective/OSS-DocumentScanner

[BUG] Card sync does not work as expected

Open
#657 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
2.4k
Forks
121
Avg merge
1d 58m
Merged PRs (30d)
17

Description

Which app is your issue for

CardWallet

Version

1.12.2

What platform are you using?

iOS

OS Version

26.4.2

What happened?

iOS card sync overwrites remote state
STR:

  1. On Android, create a 2 cards in 1 folder.
  2. Add sync to webdav, then click "sync"
  3. On a fresh iOS device, add webdav and click "sync". Observe both cards being downloaded.
  4. Back on Android, delete one of the cards, click "sync"
  5. Verify that the cards are deleted by opening the sync folder in the webdav client and seeing that there is only one folder (= 1 card data) in the sync folder.
  6. Open iOS app, click "sync"

EXP: Remote changes from Android get pulled in, only 1 card remains
ACT: iOS state overwrites remote state, the card that was deleted gets re-uploaded to the webdav folder.

What I expect is that the priority (local vs remote state) get determined based on 2 timestamp fields: updated_time and sync_time, set on each of the cards both locally and on a remote.
Scenario A (Upload): Device A looks at a card and sees updated_time is newer than its last sync_time. It checks remote, and the remote version hasn't changed (remote sync_time = local sync_time). The Device A simply overwrites the file in the remote.
Scenario B (Download): Device B checks remote and finds a card where the remote updated_time is newer than Device B local sync_time. The Device B downloads it and updates its local database.
In case local updated_time is newer than local sync_time and remote sync_time is newer than local sync_time - a conflict is detected, remote changes are pulled and overwrite local changes, and also a new folder conflicts is created, and the local version of a conflicting card is moved there.
I hope it makes sense.

Code of Conduct
  • I agree to follow this project's Code of Conduct

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.

Research direction

Start by reproducing the six-step Android, WebDAV, and iOS sequence described in the issue and inspect the resulting remote folder state. Use the stated updated_time and sync_time scenarios as the acceptance criteria: remote deletions must remain deleted after iOS sync, and conflicting local cards must be preserved under a conflicts folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios
Domain
distributed-systems, mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.