Skip to content

fix(offline): operation processing and conflict handling - #17982

Merged
alperozturk96 merged 6 commits into
masterfrom
fix/offline-operation
Nov 11, 2026
Merged

alperozturk96 merged 6 commits into
masterfrom
fix/offline-operation

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

  • Some offline operations were not processed correctly, such as renaming the same file twice, or renaming and then deleting it.
  • Files uploaded into a folder created offline could get a wrong path.
  • Offline uploads used the wrong modified and creation time.
  • The conflict dialog was not shown properly and showed wrong server file data and a wrong label.
  • After resolving a conflict, the file list was not updated until a manual refresh.
  • An offline version could be lost silently when the folder synced before the conflict was resolved.
  • Notifications stayed even after the offline operation was handled, so users had to remove them manually.

Changes

  • Fixes offline operation logic (create, rename, delete, operations inside folders)
  • Keeps pending items until they are created on the server
  • Fixes refresh mechanism after offline operations complete
  • Fixes notification handling and pending intent action
  • Fixes the conflict resolve dialog for offline operations, such as showing correct data, dismissing and showing the dialog
  • Uses ClientRepository instead of ClientFactory in the offline operations worker
  • Handles edge cases

How to test?

  1. Create a folder and upload a file, turn off the internet, then upload a different file with the same name to cause a conflict. Turn the internet on, open the notification and choose "Keep both". Both files should appear without a refresh.
  2. Turn off the internet and rename the same file twice. Turn it on; the file should have the last name.
  3. Turn off the internet, rename a file and then delete it. Turn it on; the file should be deleted.
  4. Turn off the internet, create a folder, upload a file into it, then rename the folder. Turn it on; both should be created with the new name.
  5. Turn off the internet and delete a folder. Turn it on; the folder should be deleted without error notifications.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

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

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

SpotBugs

CategoryBaseNew
Bad practice2424
Correctness4848
Dodgy code128128
Experimental11
Malicious code vulnerability11
Multithreaded correctness1313
Performance2626
Security1515
Total256256

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit d332b3e
Version 17982
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@alperozturk96

Copy link
Copy Markdown
Collaborator Author

/backport to stable-35.1.x

@alperozturk96
alperozturk96 merged commit acbc44f into master Nov 11, 2026
24 of 28 checks passed
@alperozturk96
alperozturk96 deleted the fix/offline-operation branch November 11, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants