Skip to content

fix: offer only keep both and skip for upload conflicts between file and folder - #3735

Merged
AlexAndBear merged 7 commits into
mainfrom
fix/upload-file-vs-folder
Oct 19, 2026
Merged

AlexAndBear merged 7 commits into
mainfrom
fix/upload-file-vs-folder

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Description

Uploading a file onto an existing folder, or a folder onto an existing file of the same name, previously offered Replace or Merge even though those operations fail. Such conflicts now offer only Keep both and Skip.

A saved Replace/Merge choice prompts again for type mismatches. An "Apply to all" choice in that exception dialog is stored separately, so it cannot overwrite the original choice for ordinary conflicts. This works whether an ordinary conflict or a type mismatch appears first. Compatible global Skip/Keep-both choices still apply to type mismatches when no separate exception choice exists.

The exception dialog counts only remaining type mismatches of the same upload type. File and folder batch choices remain independent.

Related Issue

How Has This Been Tested?

  • test environment: local Vitest with happy-dom. The original change was tested with Playwright against a local OpenCloud; the follow-up to the review was verified with unit tests, without a new browser/backend run.
  • test case 1: 118 tests pass in upload.spec.ts and ResourceConflictModal.spec.ts, including file/folder mismatch detection and hiding invalid actions.
  • test case 2: regression tests cover Replace/Merge for ordinary conflicts together with Skip/Keep both for all type mismatches, for both upload types and both conflict orders.
  • test case 3: verify exception-dialog counts and that compatible global Skip/Keep-both choices continue to apply without an extra dialog.
  • test case 4: existing rename/endpoint tests pass; ESLint, Prettier and root vue-tsc --noEmit pass.

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@JammingBen JammingBen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A stored replace or merge can be overwritten by an individual conflict dialog, not sure if there's an easy fix. It happens when you upload 3 conflicts: check "apply to all" on the first one, second one clashes and shows the dialog again. Now you can check "apply to all" again, overwriting the first one.

@AlexAndBear

Copy link
Copy Markdown
Member Author

@JammingBen Fixed: type-mismatch conflicts now keep a separate “apply to all” strategy, preserving the original Replace/Merge choice; regression tests cover files, folders and both conflict orders.

@AlexAndBear
AlexAndBear merged commit d007132 into main Oct 19, 2026
27 checks passed
@AlexAndBear
AlexAndBear deleted the fix/upload-file-vs-folder branch October 19, 2026 14:42
@openclouders openclouders mentioned this pull request Oct 19, 2026
1 task
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.

A file-vs-folder name conflict offers Replace or Merge, which then fail

2 participants