feat(browser): redo file operations with Ctrl+Shift+Z - #1120
Open
JoeJoeflyn wants to merge 1 commit into
Open
JoeJoeflyn wants to merge 1 commit into
JoeJoeflyn wants to merge 1 commit into
Conversation
JoeJoeflyn
force-pushed
the
feat/1117-redo
branch
from
September 18, 2026 19:18
0bbebee to
2b2f866
Compare
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.
Description
Adds Finder-style redo for every undoable file operation. Undo keeps a process-wide history stack shared across windows; this adds a parallel redo stack fed by completed undos, so Ctrl+Shift+Z (and Ctrl+Y) re-applies what was just reverted:
UndoEntry::Copyentries restore already records, so undoing a Put Back (re-trash) can itself be redoneTwo correctness rules:
push_pending_undo), matching Finder.completedbucket on each pending entry accumulates only items that actually applied, so a partial undo offers a redo for just the reverted portion, and a partial redo regenerates the matching undo subset. Failed operations push nothing — a failed rename undo, for example, offers no redo.Undo and redo share one replay core (
replay_move,replay_rename,replay_entry_locations,resolve_replay_collisions,finish_claimed_replay) parameterized by direction rather than duplicated per direction. Replays reuse the existing provider operations (undo_move,undo_rename,undo_copy,restore) — no new provider API.Merge/copy-overwrite undos deliberately offer no redo: a merge undo mixes deletions and restores that no single replay operation can re-apply.
Visual evidence
screenrecording-2026-09-18_21-21-14.mp4
target/pr-captures/redo-1-restored.png— after Ctrl+Z:todo.txtput back in the listingtarget/pr-captures/redo-2-retrashed.png— after Ctrl+Shift+Z:todo.txtre-trashed, listing back to four itemsHow to test
Related issue
Closes #1117