prune,ui: show the removal pass, prefix the sizing spinner
CI / build (push) Successful in 6m23s
CI / test (push) Skipped
CI / publish (push) Skipped
CI / snap (push) Successful in 11m45s

Confirming a 500 GiB prune went silent under "Removing:" for minutes:
drive an indicatif bar from the plan's sizes through a new
apply_with_progress observer, in the deb live view's layout — the
running count behind the spinner on the first line, the byte bar with
its counters on the second. The removed path is not rendered: it
fights the bar on a narrow terminal, and the failed-removal errors
name the paths that matter. --force plans no sizes and gets the count
line only.

The dry-run size spinner lacked the "> " prompt prefix the other
one-line waits carry; wait_spinner renders it too now.
This commit is contained in:
vhaudiquet committed 2026-10-03 01:34:47 +02:00
1 parent f6f2b882a8
commit 486856da60
4 files changed
+129 -14

No files matched your search

+11 -1
View File
@@ -1293,7 +1293,17 @@ fn main() {
}
info!("Removing:");
let report = pkh::prune::apply(plan);
// The removal is slow (the big session trees take minutes):
// the plan's sizes drive a byte bar in the deb view's layout;
// --force planned no sizes and gets the count line only.
let bar = pkh::ui::removal_bar(&multi, digest.total_bytes);
let report = pkh::prune::apply_with_progress(
plan,
Some(&|idx, count, _path, done| {
pkh::ui::removal_progress(&bar, idx, count, done);
}),
);
bar.finish_and_clear();
for (path, err) in &report.failed {
error!("Failed to remove {}: {}", path.display(), err);
}