fix(browser): offer keep-both for cross-folder paste conflicts - #599
Conversation
Same-folder copy paste silently generated a unique name on collision while cross-folder paste only offered Replace/Skip, so users had no way to keep both copies when pasting across folders. Add a KeepBoth TransferConflict variant that reuses the existing unique-name generation, and surface it as a "Keep Both" option in the conflict dialog for copy paste only (moves keep their prior Replace/Skip behavior, since undo and post-move reveal assume a move never renames its target). Closes lgse#395
Enter must not choose Replace when Keep Both has keyboard focus. Cover numbered-copy selection and undo, mixed conflict choices, and cancellation with real GUI interactions.
|
Merged
Added regression coverage for keyboard/pointer Keep Both, numbered-copy selection and undo, mixed apply-to-all pastes, and copy/move cancellation. Audited every added comment and removed or tightened redundant prose. Exercised the real GTK application on isolated Xvfb: Shift+Tab to Keep Both, then Enter creates and selects the numbered copy without changing the existing file. Pointer activation, undo, and Cancel/Escape/close also preserve the expected files. GitHub still requires approval from someone other than the last pusher. Captured current dialog/result screenshots, but this session has no GitHub attachment-upload tooling; these files were not uploaded:
|

Description
Same-folder copy paste silently generates a unique name (
name (1).ext) on a collision and never prompts, while cross-folder paste only offers Replace/Skip/Cancel with no way to keep both copies. This adds aKeepBothconflict option, reusing the existing unique-name generation logic, and surfaces it as a "Keep Both" button in the cross-folder conflict dialog for copy paste.Move operations (cut/paste, drag-move) keep their prior Replace/Skip/Cancel behavior only — Keep Both is not offered there, because undo and post-move reveal currently assume a move never renames its destination; offering it there would need separate follow-up work to carry the renamed target through undo/reveal tracking.
Visual evidence
N/A from me directly — this only adds one new button ("Keep Both") to the existing "File already exists" conflict dialog, no other layout changes. I don't have a way to capture a screenshot from this environment; happy to attach one if needed.
How to test
source/report.txtanddest/report.txt.report.txtfromsource/and paste intosource/again.report.txtfromsource/, navigate todest/, and paste.report.txtfromsource/(Ctrl+X), navigate todest/, and paste.Expected result:
report (1).txtis created silently, no dialog.report (1).txtindest/without touching the existing file.Related issue
Closes #395