Split from the grouped rename and copy/paste report (#354, item 4 of 5).
Strata version
Reproduced on source build of Strata v0.10.0 (main, debug build) with an isolated temp HOME / XDG fixture.
What happened?
When a paste collides with an existing name, Strata shows a “File already exists” dialog with Replace, Skip, Cancel, and an X close button in the header. Clicking X does nothing: the dialog stays open and no choice is applied.
Cancel and Escape already dismiss the dialog. The header close control looks like the same action and should behave the same way.
Steps to reproduce
- Create
source/report.txt and dest/report.txt (same basename, different content).
- Copy
source/report.txt and paste into dest/ so the “File already exists” dialog appears.
- Click the header X close button.
- Observe that the dialog does not dismiss and the paste is neither cancelled nor completed.
- Confirm that Cancel and Escape do dismiss the dialog without writing files.
Expected behavior
X, Cancel, and Escape all cancel the conflict flow:
- The dialog is dismissed.
- No files are overwritten, renamed, or created as a result of that paste.
- Cancelling abandons the whole operation (matching current Cancel behavior).
- Focus returns to the browser so keyboard use can continue.
Replace and Skip must keep their current meaning.
Screenshots or video
Repro recording (X fails to dismiss; Escape / Cancel work; files unchanged):
https://cursor.com/artifacts/v/art-9612e792-e219-46e3-bfd8-53dd93ff8dc2
Additional context
confirm_replace_conflict in src/ui/browser.rs builds the dialog with message_dialog_layout, which always includes layout.close (the header X). Handlers are wired for Cancel, Skip, Replace, and Escape, but layout.close is never connected. Other modals in the same file (transfer-destination, empty-trash, archive-conflict) already connect layout.close to dismiss_modal_layer.
Copy/move undo collision uses the same confirm_replace_conflict, so X is broken there too. Fix the shared helper rather than only the paste caller.
Acceptance criteria
Labels suggestion: bug, UX
Split from the grouped rename and copy/paste report (#354, item 4 of 5).
Strata version
Reproduced on source build of Strata v0.10.0 (
main, debug build) with an isolated tempHOME/ XDG fixture.What happened?
When a paste collides with an existing name, Strata shows a “File already exists” dialog with Replace, Skip, Cancel, and an X close button in the header. Clicking X does nothing: the dialog stays open and no choice is applied.
Cancel and Escape already dismiss the dialog. The header close control looks like the same action and should behave the same way.
Steps to reproduce
source/report.txtanddest/report.txt(same basename, different content).source/report.txtand paste intodest/so the “File already exists” dialog appears.Expected behavior
X, Cancel, and Escape all cancel the conflict flow:
Replace and Skip must keep their current meaning.
Screenshots or video
Repro recording (X fails to dismiss; Escape / Cancel work; files unchanged):
https://cursor.com/artifacts/v/art-9612e792-e219-46e3-bfd8-53dd93ff8dc2
Additional context
confirm_replace_conflictinsrc/ui/browser.rsbuilds the dialog withmessage_dialog_layout, which always includeslayout.close(the header X). Handlers are wired for Cancel, Skip, Replace, and Escape, butlayout.closeis never connected. Other modals in the same file (transfer-destination, empty-trash, archive-conflict) already connectlayout.closetodismiss_modal_layer.Copy/move undo collision uses the same
confirm_replace_conflict, so X is broken there too. Fix the shared helper rather than only the paste caller.Acceptance criteria
Labels suggestion:
bug,UX