feat: add progress bar to restore operation #23

Scalone
sneak scala 3 commity/ów z feat/restore-progress-bar do main 2026-03-17 11:18:19 +01:00

3 Commity

Autor SHA1 Wiadomość Data
clawbot
63f0dda2db refactor: extract newProgressBar helper with named constants
Extract duplicated progress bar creation into (v *Vaultik) newProgressBar()
helper method. Define progressBarWidth and progressBarThrottle constants to
replace bare magic numbers (40, 100ms) that appeared in both the restore
and verify progress bar blocks.
2026-03-17 01:54:27 -07:00
clawbot
01c349ada1 fix: use v.Stdout in isTerminal() instead of os.Stdout.Fd()
Convert isTerminal() from a standalone function to a method on Vaultik
that checks whether v.Stdout implements Fd() (i.e. is an *os.File).
Falls back to non-terminal for non-file writers (e.g. in tests).

Eliminates all direct os.Stdout/os.Stderr references from restore.go.
2026-03-14 17:45:31 -07:00
82a93c4be6 feat: add progress bar to restore operation
Add an interactive progress bar (using schollz/progressbar) to the
file restore loop, matching the existing pattern in verify. Shows
bytes restored with ETA when output is a terminal, falls back to
structured log progress every 100 files otherwise.

Fixes #20
2026-02-20 02:28:21 -08:00