Skip to content

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

Open
alperozturk96 wants to merge 5 commits intomasterfrom
fix/upload-list-conflict-handling
Open

fix(upload-list): handle conflict actions#16819
alperozturk96 wants to merge 5 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

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@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

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
<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 :)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Codacy

SpotBugs

CategoryBaseNew
Bad practice3636
Correctness6969
Dodgy code228228
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4242
Security1616
Total435435

@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)

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

Labels

3. to review backport-request 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

1 participant