feat(fm): overwrite-on-conflict for copy/move (FM mandatory)#31
Merged
Conversation
Same-filesystem copy/move no longer silently skips an existing target — it pauses on a conflict dialog and lets the user decide: Overwrite, Skip, Overwrite all, Skip all, or Cancel (the title-bar X / click-out aborts the batch). "…all" applies the decision to every remaining conflict without re-prompting. - The batch is modelled as a resumable state machine (PendingCopyMove + a queue of ops); process_pending_copy_move drives it, opening Dialog::CopyMoveConflict on the first undecided conflict and resuming from the dialog actions. - Overwrite replaces cleanly: the existing target (file or directory) is removed first, so a rename over a non-empty dir — or a copy into an existing tree — behaves as "replace". Scope: same-filesystem path (two panes on one machine — the primary two-panel workflow). Cross-connection overwrite still reports skips; that follows. Verified: cargo check -p warp 0/0; 251 sftp tests green (3 new: conflict→dialog→overwrite replaces, skip keeps, overwrite-all applies across a multi-file batch). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same-filesystem copy/move no longer silently skips an existing target. On a conflict it pauses and asks: Overwrite / Skip / Overwrite all / Skip all, with the title-bar X (or click-outside) aborting the batch. "…all" applies the decision to every remaining conflict without re-prompting.
PendingCopyMove+ an op queue);process_pending_copy_movedrives it, opensDialog::CopyMoveConflicton the first undecided conflict, and resumes from the dialog actions.Scope: the same-filesystem path (two panes on one machine — the primary two-panel workflow). Cross-connection overwrite still reports skips; that follows.
Verified:
cargo check -p warp0/0; 251 sftp tests green (3 new: conflict→dialog→overwrite replaces content, skip keeps, overwrite-all applies across a multi-file batch). No build triggered.🤖 Generated with Claude Code