Move conflict prompt in the web UI (Replace / Keep both / Skip) for Move to, drag and drop and bulk move #975

Closed
opened 2026-10-19 21:09:05 +00:00 by Cordy · 4 comments
Owner

Follow-up to #926 item 1 (decision D6 a, 2026-10-19). From v0.6.351, REST rename answers 409 destination-exists when a file of that name is already in the destination. The web move flows (Move to, drag and drop, bulk Move to, and "new space from selection" in move mode) then show the generic "Move failed" message instead of silently replacing the file.

To do:

  1. Research how others prompt (Nextcloud, Google Drive, Dropbox, Finder and Explorer) and what users complain about.
  2. Build a whole-page mockup of a Replace / Keep both / Skip prompt, with "apply to all" for bulk moves.
  3. Get approval, then build it. Replace sends overwrite: true; Keep both picks the lowest free "{name} 2", the way trash restore already does.
Follow-up to #926 item 1 (decision D6 a, 2026-10-19). From v0.6.351, REST rename answers 409 `destination-exists` when a file of that name is already in the destination. The web move flows (Move to, drag and drop, bulk Move to, and "new space from selection" in move mode) then show the generic "Move failed" message instead of silently replacing the file. **To do:** 1. Research how others prompt (Nextcloud, Google Drive, Dropbox, Finder and Explorer) and what users complain about. 2. Build a whole-page mockup of a Replace / Keep both / Skip prompt, with "apply to all" for bulk moves. 3. Get approval, then build it. Replace sends `overwrite: true`; Keep both picks the lowest free "{name} 2", the way trash restore already does.
Author
Owner

Research (2026-10-30). The full write-up with sources and VERIFIED, INFERRED and UNVERIFIED markers is in scratch/b7e/backlog/research-975.md.

Cairn today

  • Move to, drag and drop, bulk move and copy all get 409 destination-exists and show "Move failed". Uploads, small and TUS, still replace a same-named file silently (it becomes a new version).
  • Rename overwrite works only file onto file, and copy has no overwrite option.
  • Trash restore already does Keep both on the server ({name} 2). Two other numbering styles exist: (2) for space share entries and -1 for peering.
  • What Replace does: the old content becomes a version and the two histories merge (cap 10).
    • A hold refuses it (403) and someone else's lock refuses it (423).
    • Someone who received a share cannot replace its top item.
    • Links and grants on the destination path stay, so after a Replace they serve the moved file.
    • The audit log cannot tell a replace from a move.

Market

  • Nextcloud and OpenCloud check the destination listing in the browser first, then send overwrite or a new name.
  • Nextcloud copy always renames; Seafile always renames on the server.
  • Google Drive and Box version a same-named upload silently.
  • Folders: Finder and WebDAV replace the whole folder, Windows merges, SharePoint offers Keep both only.

Pitfalls

  • Finder's folder "Replace" has caused real data loss.
  • An oCIS MOVE with overwrite destroyed a folder or a whole space.
  • CVEs from conflict paths that skipped permission checks (Nextcloud and ownCloud, 2016).
  • Overwriting can get around a missing delete right.

Standards: WCAG 2.2 3.3.4 (reversible or confirmed) and 2.5.7 (a non-drag way to move). The ARIA guide puts first focus on the least destructive button.

Recommended design

  • One dialog for move, drag and drop, bulk move, copy and upload. It asks one conflict at a time ("1 of 3") with Replace / Keep both / Skip, an "Apply to the other n conflicts" option and Stop. A single item gets Cancel instead.
  • Conflicts are found from the listing before sending; a late 409 opens the same dialog.
  • Replace is offered only file onto file. It is disabled with the reason on a locked or held destination, and warns when the destination is shared or linked.
  • Folder conflicts offer Keep both and Skip only; no merge in this issue.
  • A new server option conflict: fail | replace | keepBoth on rename, copy, upload and TUS, using the trash-restore numbering, with an audit note replaced.
  • Nothing is stored and nothing needs a lease, so several instances (#742) are fine. 12 mockup frames.

Open questions, with my recommendations

  1. Keep both decided on the server.
  2. Folder conflicts: Keep both and Skip only, with Merge later if the dogfood asks.
  3. Uploads ask too: yes.
  4. Copy gets Replace (this reverses the "not yet" from #926), and copying into the same folder is Keep both: yes.
  5. Replacing a shared or linked file: warn.
  6. "Apply to all" asks separately for conflicts where that choice is not available: yes.
  7. Default button: Keep both.
  8. Audit note replaced: yes.
  9. Bulk move as one server job: no.
**Research (2026-10-30).** The full write-up with sources and VERIFIED, INFERRED and UNVERIFIED markers is in `scratch/b7e/backlog/research-975.md`. **Cairn today** - Move to, drag and drop, bulk move and copy all get 409 `destination-exists` and show "Move failed". Uploads, small and TUS, still replace a same-named file silently (it becomes a new version). - Rename `overwrite` works only file onto file, and copy has no overwrite option. - Trash restore already does Keep both on the server (`{name} 2`). Two other numbering styles exist: ` (2)` for space share entries and `-1` for peering. - **What Replace does:** the old content becomes a version and the two histories merge (cap 10). - A hold refuses it (403) and someone else's lock refuses it (423). - Someone who received a share cannot replace its top item. - Links and grants on the destination path stay, so after a Replace they serve the moved file. - The audit log cannot tell a replace from a move. **Market** - Nextcloud and OpenCloud check the destination listing in the browser first, then send overwrite or a new name. - Nextcloud copy always renames; Seafile always renames on the server. - Google Drive and Box version a same-named upload silently. - Folders: Finder and WebDAV replace the whole folder, Windows merges, SharePoint offers Keep both only. **Pitfalls** - Finder's folder "Replace" has caused real data loss. - An oCIS MOVE with overwrite destroyed a folder or a whole space. - CVEs from conflict paths that skipped permission checks (Nextcloud and ownCloud, 2016). - Overwriting can get around a missing delete right. **Standards:** WCAG 2.2 3.3.4 (reversible or confirmed) and 2.5.7 (a non-drag way to move). The ARIA guide puts first focus on the least destructive button. **Recommended design** - One dialog for move, drag and drop, bulk move, copy and upload. It asks one conflict at a time ("1 of 3") with Replace / Keep both / Skip, an "Apply to the other n conflicts" option and Stop. A single item gets Cancel instead. - Conflicts are found from the listing before sending; a late 409 opens the same dialog. - Replace is offered only file onto file. It is disabled with the reason on a locked or held destination, and warns when the destination is shared or linked. - Folder conflicts offer Keep both and Skip only; no merge in this issue. - A new server option `conflict: fail | replace | keepBoth` on rename, copy, upload and TUS, using the trash-restore numbering, with an audit note `replaced`. - Nothing is stored and nothing needs a lease, so several instances (#742) are fine. 12 mockup frames. **Open questions, with my recommendations** 1. Keep both decided on the server. 2. Folder conflicts: Keep both and Skip only, with Merge later if the dogfood asks. 3. Uploads ask too: yes. 4. Copy gets Replace (this reverses the "not yet" from #926), and copying into the same folder is Keep both: yes. 5. Replacing a shared or linked file: warn. 6. "Apply to all" asks separately for conflicts where that choice is not available: yes. 7. Default button: Keep both. 8. Audit note `replaced`: yes. 9. Bulk move as one server job: no.
Author
Owner

Decision (Nikola, 2026-10-30): all 9 recommendations from the research comment are approved. Next step: a whole-page mockup.

**Decision (Nikola, 2026-10-30):** all 9 recommendations from the research comment are approved. Next step: a whole-page mockup.
Author
Owner

Mockup approved (Nikola, 2026-10-30): 975-conflict-prompt-mockup.html, with all its strings and open-point recommendations.

  • Keep both strips a trailing " N" ("Offerte 2.pdf" becomes "Offerte 3.pdf"), and trash restore uses the same rule.
  • Callers that send no conflict keep today's behaviour: upload and TUS replace, rename and copy fail.
  • All questions are asked before anything is sent.
  • No bell on replace.
  • The predicted name is shown.
  • "Apply to the other n" is never pre-ticked.
  • Keep both gets first focus.
**Mockup approved (Nikola, 2026-10-30):** `975-conflict-prompt-mockup.html`, with all its strings and open-point recommendations. - Keep both strips a trailing " N" ("Offerte 2.pdf" becomes "Offerte 3.pdf"), and trash restore uses the same rule. - Callers that send no `conflict` keep today's behaviour: upload and TUS replace, rename and copy fail. - All questions are asked before anything is sent. - No bell on replace. - The predicted name is shown. - "Apply to the other n" is never pre-ticked. - Keep both gets first focus.
Cordy closed this issue 2026-10-31 08:16:49 +00:00
Author
Owner

Shipped in v0.6.377 (PR #1053), live on both dogfoods (pods ready, no restarts, no new WARN lines).

  • Move to, drag and drop, bulk move/copy, copy into the same folder, create space from selection and uploads ask before anything is sent when a name is taken: Replace, Keep both (default focus) or Skip, with "apply to the others" for batches; late conflicts asked once; one result line.
  • One numbering rule everywhere: a trailing " N" is stripped (2 to 999), so a 2.pdf becomes a 3.pdf; trash restore uses it too; the web planner predicts with the same fixture.
  • REST rename, copy, upload and TUS take conflict (fail | replace | keepBoth); every 409 destination-exists carries the existing row; uploads use If-None-Match; TUS returns X-Cairn-Path / X-Cairn-Renamed; spaces, homes and received share roots are never numbered.
  • Audit notes conflict=… asked=… replaced=1 surface=… on successful rename/copy/write; WebDAV Overwrite: T onto a file noted.
  • Works together with #835: a move out of Personal asks the name question first, then the shares confirm.
  • Docs: CHANGELOG v0.6.377, file-browser.md, sharing.md, admin-policy.md, VERSIONING.md, ARCHITECTURE.md.

Backlog follow-ups noted in the findings list: atomic no-replace rename on posix/s3, highlight the new row after a same-folder copy, readable audit text for the conflict notes.

Shipped in **v0.6.377** (PR #1053), live on both dogfoods (pods ready, no restarts, no new WARN lines). - Move to, drag and drop, bulk move/copy, copy into the same folder, create space from selection and uploads ask before anything is sent when a name is taken: **Replace**, **Keep both** (default focus) or **Skip**, with "apply to the others" for batches; late conflicts asked once; one result line. - One numbering rule everywhere: a trailing " N" is stripped (2 to 999), so `a 2.pdf` becomes `a 3.pdf`; trash restore uses it too; the web planner predicts with the same fixture. - REST rename, copy, upload and TUS take `conflict` (fail | replace | keepBoth); every 409 `destination-exists` carries the existing row; uploads use `If-None-Match`; TUS returns `X-Cairn-Path` / `X-Cairn-Renamed`; spaces, homes and received share roots are never numbered. - Audit notes `conflict=… asked=… replaced=1 surface=…` on successful rename/copy/write; WebDAV `Overwrite: T` onto a file noted. - Works together with #835: a move out of Personal asks the name question first, then the shares confirm. - Docs: CHANGELOG v0.6.377, file-browser.md, sharing.md, admin-policy.md, VERSIONING.md, ARCHITECTURE.md. Backlog follow-ups noted in the findings list: atomic no-replace rename on posix/s3, highlight the new row after a same-folder copy, readable audit text for the conflict notes.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#975
No description provided.