Repository navigation
feat: pause and resume running file operations - #146
Merged
Merged
Conversation
nextestudios
force-pushed
the
feature/21-pause-resume
branch
2 times, most recently
from
September 27, 2026 05:26
9b1e783 to
4a1684e
Compare
Add a cooperative PauseGate that the file operation engine honors between items and between blocks of a file being copied. Only pausable engines get a gate, so Pause is hidden (never simulated) for extraction and compression. Resume continues from the current item and cancel still works while paused, removing the partial copy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nextestudios
force-pushed
the
feature/21-pause-resume
branch
from
September 27, 2026 05:28
4a1684e to
ef8a7d8
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.
Summary
PauseGate(Core): cooperative pause;WaitIfPausedAsynchonors cancellation.FileOperationRequest.Pause: the engine waits at safe points — before each item (delete, copy/move, inside folders) and before each 80 KB block of a file being copied. A paused copy keeps only its hidden.controlfs-copy-*.parttemp (journaled), nothing half-written in the destination.OperationQueue.Enqueue(..., pausable: true)is used only for copy/move/delete. Extraction and compression don't get a gate, soCanPauseis false and Pause never appears.OperationQueue.Pause/Resumeuse the existingPausedstate ofOperationStateMachine; cancel works while paused (no resume needed). A conflict asked right before a pause no longer flips the state back to Running.Tests
CI (Windows):
FileOperationServiceTests: pausing mid-file stops writing (no progress for 1 s, no destination file), resuming finishes a byte-identical copy with no temps; cancelling while paused removes the partial copy.PauseJourneyTests: pause/resume through the Operations menu; paused engine doesn't touch the destination; non-pausable operations can't be paused.Manual (docs/TESTING.md): disk activity really stops within ~1 s on a slow USB drive; cancel after pause; extraction/compression show no Pause.
Closes #21
🤖 Generated with Claude Code