Enable pause/resume and progress tracking for bulk actions - #5
Merged
Conversation
…outing - size: dir_size_recursive resolves plain files with one metadata call (no jwalk pool spin-up per root) and bridges directory walks onto rayon so metadata reads run in parallel - zapg: per-root size pass parallelized across roots (into_par_iter) - size badge and byte-weighted ETA appear much sooner on bulk selections - size: dir_size_tree credits file sizes to the immediate parent and rolls totals up in a single bottom-up pass, replacing the per-file ancestor walk that allocated O(depth) PathBufs per file - zapg: treemap entries sorted, capped to MAX_LAYOUT_ITEMS and summed once in the collection thread (TreemapSnapshot); render frames no longer sort or sum tens of thousands of raw entries at every repaint - zapg: poll_events applies worker events via a path->index HashMap built once per drain instead of a linear scan per event (bulk runs deliver thousands of events per frame); dead set_state/set_progress helpers removed - zapg: batch and drag-and-drop path dedup switched from quadratic items.iter().any() scans to HashSet lookups Co-authored-by: v0 <it+v0agent@vercel.com>
- cli/main: new --journal [N] action prints the N most recent journal entries (default 20) with the journal path; read_recent spans the rotated journal.1.log when the current file is short, missing files are not an error - shred: overwrite buffer 64 KiB -> 1 MiB capped at file size (~16x fewer write syscalls on large files); thread_rng handle reused across chunks - shred: after content overwrite, rename the file to an anonymous name before removal so the original filename does not linger in directory metadata (NTFS $LogFile etc.); best-effort with fallback to plain removal, covered by a directory-empty test Co-authored-by: v0 <it+v0agent@vercel.com>
Replaced Vec for item sizes with a HashMap for O(1) lookups and improved size calculation efficiency. Co-authored-by: Shinoa <87525178+adxptived@users.noreply.github.com>
The zapw worker (Explorer context menu - the most common deletion surface) never wrote to the operation journal; only CLI and GUI runs did. - run_silent_delete now collects per-path outcomes (success or error string) for all three code paths: batched recycle via SHFileOperationW, sequential deletes, and parallel top-level file deletes - and records them in the journal - late-drained batch paths are journaled too since drain_late_batch_paths reuses run_silent_delete - journaling mirrors the CLI rules: skipped for dry runs, --no-journal, and ZAP_NO_JOURNAL=1; best-effort so it can never fail a deletion Co-authored-by: v0 <it+v0agent@vercel.com>
delete_file_roots_bulk silently dropped paths that were skipped after a stop request: callers (GUI item list, zapw journaling) treat a missing error as success, so cancelled-but-never-deleted files were shown as deleted and journaled as ok. - record a 'cancelled by user' error for every skipped path, both for chunks that bail at the start and mid-chunk breaks, so deleted + errors always equals the input count - add a regression test asserting full accounting and that cancelled paths still exist on disk - promote the stop-flag test mutex to a crate-level TEST_FLAG_SERIAL so every test that mutates the global stop/pause flags (stop.rs and now delete.rs) serializes on the same lock instead of racing Co-authored-by: v0 <it+v0agent@vercel.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
v0 Session