feat(download): add status messages and -v verbose flag #150

Merged
fuzzy merged 2 commits from feature/status-messages into main 2026-07-13 20:36:12 +00:00
Owner

What

Add -v verbose flag for worker-level detail (retries, completions, skips). On successful download, always print a completion summary with file size, elapsed time, and average speed.

Why

Users need visibility into what workers are doing during problematic downloads (-v). Every download should show a final summary line for quick confirmation of what was downloaded and how fast.

Testing

  • Manual: -v shows worker retry/complete messages on stderr
  • Manual: without -v, worker messages hidden, only progress bar + summary shown
  • Manual: completion summary shows correct size/time/speed
  • go build ./..., go vet ./..., golangci-lint run — all clean

Breaking Changes

None

Notes

  • Logger gets Verbosef method — only prints when -v is set and not -q
  • Worker "retry", "already done", and "complete" messages all use Verbosef
  • Summary format: downloaded 3.8GB in 2m30s (25.3MB/s)
  • New humanBytes helper in download.go for human-readable sizes

Closes #75, #73, #74

## What Add `-v` verbose flag for worker-level detail (retries, completions, skips). On successful download, always print a completion summary with file size, elapsed time, and average speed. ## Why Users need visibility into what workers are doing during problematic downloads (-v). Every download should show a final summary line for quick confirmation of what was downloaded and how fast. ## Testing - [x] Manual: `-v` shows worker retry/complete messages on stderr - [x] Manual: without `-v`, worker messages hidden, only progress bar + summary shown - [x] Manual: completion summary shows correct size/time/speed - [x] `go build ./...`, `go vet ./...`, `golangci-lint run` — all clean ## Breaking Changes None ## Notes - Logger gets `Verbosef` method — only prints when `-v` is set and not `-q` - Worker "retry", "already done", and "complete" messages all use `Verbosef` - Summary format: `downloaded 3.8GB in 2m30s (25.3MB/s)` - New `humanBytes` helper in download.go for human-readable sizes Closes #75, #73, #74
Add -v flag for verbose worker detail (retries, completions).
On successful download, print completion summary with file size,
elapsed time, and average speed.

Closes #75, #73, #74
docs(roadmap): mark status messages complete
All checks were successful
Test and Release / lint (pull_request) Successful in 2m33s
Test and Release / test (pull_request) Successful in 4m21s
9529d75ac4
Closes #75, #73, #74
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-13 20:32:51 +00:00
fuzzy self-assigned this 2026-07-13 20:32:55 +00:00
the.auditor left a comment

Review: APPROVED

Verification

  • go vet ./... passes
  • go build ./... passes
  • golangci-lint v2 run ./... 0 issues

Changes

  • internal/logging/logging.goverbose field, Verbosef method (only prints when verbose=true and quiet=false)
  • internal/config/config.goVerbose bool, -v flag, PGET_VERBOSE env var
  • internal/downloader/download.go — worker messages use Verbosef; humanBytes helper; completion summary with size/time/speed
  • cmd/pget/main.go — passes cfg.Verbose to logging.New
  • ROADMAP.md — Marks Phase 3 status messages as [x]

Key behavior

  • -v: shows worker retry/skip/complete messages
  • No -v: only progress bar + final summary shown
  • -q: suppresses both (quiet takes precedence over verbose)
  • Summary line: downloaded 3.8GB in 2m30s (25.3MB/s)

Closes #73, #74, #75 on merge.

## Review: APPROVED ### Verification - `go vet ./...` — ✅ passes - `go build ./...` — ✅ passes - `golangci-lint v2 run ./...` — ✅ 0 issues ### Changes - `internal/logging/logging.go` — `verbose` field, `Verbosef` method (only prints when verbose=true and quiet=false) - `internal/config/config.go` — `Verbose bool`, `-v` flag, `PGET_VERBOSE` env var - `internal/downloader/download.go` — worker messages use `Verbosef`; `humanBytes` helper; completion summary with size/time/speed - `cmd/pget/main.go` — passes `cfg.Verbose` to `logging.New` - ROADMAP.md — Marks Phase 3 status messages as [x] ### Key behavior - `-v`: shows worker retry/skip/complete messages - No `-v`: only progress bar + final summary shown - `-q`: suppresses both (quiet takes precedence over verbose) - Summary line: `downloaded 3.8GB in 2m30s (25.3MB/s)` Closes #73, #74, #75 on merge.
fuzzy merged commit 9529d75ac4 into main 2026-07-13 20:36:12 +00:00
fuzzy deleted branch feature/status-messages 2026-07-13 20:36:12 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/pget!150
No description provided.