Skip to content

Enable pause/resume and progress tracking for bulk actions - #5

Merged
adxptived merged 5 commits into
masterfrom
v0/1zulema-7269-2c69f6c6
Jul 5, 2026
Merged

Enable pause/resume and progress tracking for bulk actions#5
adxptived merged 5 commits into
masterfrom
v0/1zulema-7269-2c69f6c6

Conversation

@adxptived

Copy link
Copy Markdown
Owner
  • Added pause and resume capabilities for bulk actions to provide better control over long-running operations.
  • Implemented real-time progress tracking to give users visibility into the status of batch tasks.
  • Optimized size calculation performance by migrating from vector-based lookups to a HashMap for O(1) efficiency.
  • Improved the responsiveness of the progress display when handling large datasets and high-volume updates.

v0 Session

v0 and others added 5 commits July 5, 2026 13:58
…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>
@adxptived adxptived added the v0 label Jul 5, 2026 — with Vercel
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zap Ready Ready Preview, Comment, Open in v0 Jul 5, 2026 6:19pm

@adxptived
adxptived merged commit 5a0b282 into master Jul 5, 2026
5 checks passed
@adxptived
adxptived deleted the v0/1zulema-7269-2c69f6c6 branch July 5, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants