Skip to content

fix(upload-list): handle conflict actions#16819

Merged
alperozturk96 merged 10 commits intomasterfrom
fix/upload-list-conflict-handling
Apr 15, 2026
Merged

fix(upload-list): handle conflict actions#16819
alperozturk96 merged 10 commits intomasterfrom
fix/upload-list-conflict-handling

Conversation

@alperozturk96
Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 commented Apr 9, 2026

Issue

On Android, we are showing conflicts based on the stored last upload result, but this is wrong because the server can change at any moment. As a result, we may display an incorrect status, and the user might try to open the conflict resolution dialog even though it’s unnecessary, perhaps the file no longer exists on the remote server or has been moved.

Flow

First check remote path from OCUpload via ReadFileOperation -> if file not there remove conflict error and allow user to retry upload

If file exists on remote and same -> if file not there remove conflict error and allow user to retry upload

If file exists and different -> show conflict resolve dialog

Changes

  • Extracts isSame logic since its necessary for this PR as well.
  • Implements UploadListAdapterHelper, UploadListAdapterAction since needed for handling conflicts and not bloating the adapter logic. Also we need to implement other actions as well in future.
  • Adds correct messages that reflects current state of the upload and action.
  • Adds UploadFileOperationFactory since huge constructor needs to be repeated for each file

Demo - if conflict exists

Screen_recording_20260409_150419.webm

Demo - if conflict not exists anymore (e.g. file moved or removed from server)

Screen_recording_20260409_150442.webm

@alperozturk96 alperozturk96 added this to the Nextcloud App 33.1.0 milestone Apr 9, 2026
@alperozturk96 alperozturk96 added the ux-enhancement Improvements that refine user interactions, accessibility, or overall usability label Apr 9, 2026
@alperozturk96
Copy link
Copy Markdown
Collaborator Author

/backport to stable-33.1.0

<string name="upload_local_storage_full">Local storage full</string>
<string name="upload_old_android">Encryption is only possible with &gt;= Android 5.0</string>
<string name="upload_sync_conflict">Sync conflict, please resolve manually</string>
<string name="upload_sync_conflict_checking">Checking for upload conflicts…</string>
Copy link
Copy Markdown
Collaborator Author

@alperozturk96 alperozturk96 Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kra-mo Please share your feedback regarding wording :)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

APK file: https://github.com/nextcloud/android/actions/runs/24192202894/artifacts/6350914432
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

kra-mo
kra-mo previously requested changes Apr 10, 2026
Comment thread app/src/main/res/values/strings.xml
Comment thread app/src/main/res/values/strings.xml Outdated
Comment thread app/src/main/res/values/strings.xml
@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24240286482/artifacts/6369848734
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96 alperozturk96 requested a review from kra-mo April 10, 2026 11:27
@alperozturk96 alperozturk96 dismissed kra-mo’s stale review April 10, 2026 11:28

pr is updated. please check shared flow.

@alperozturk96 alperozturk96 force-pushed the fix/upload-list-conflict-handling branch from 8a3b895 to 92f1763 Compare April 15, 2026 09:10
@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24447178861/artifacts/6447528665
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24447963945/artifacts/6447832758
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96 alperozturk96 force-pushed the fix/upload-list-conflict-handling branch from bf93cfa to 8b8a7ce Compare April 15, 2026 11:48
@github-actions
Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness6969
Dodgy code226226
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4242
Security1616
Total432432

@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24452793311/artifacts/6449807124
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

alperozturk96 and others added 9 commits April 15, 2026 14:54
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Co-authored-by: Laura Kramolis <git@kramo.page>
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 force-pushed the fix/upload-list-conflict-handling branch from 8b8a7ce to 177d4c0 Compare April 15, 2026 12:54
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 merged commit 09f4102 into master Apr 15, 2026
6 of 8 checks passed
@alperozturk96 alperozturk96 deleted the fix/upload-list-conflict-handling branch April 15, 2026 13:00
@github-actions
Copy link
Copy Markdown

test-Unit test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24455894175/artifacts/6451533794
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: auto upload ux-enhancement Improvements that refine user interactions, accessibility, or overall usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-upload conflicts, yet again -- this is a never ending problem Auto upload conflict detection not working correctly

3 participants