Skip to content

Conversation

@rtfeldman
Copy link
Contributor

Summary

Implements #9009: Package download status indicator.

  • Add spinner animation with braille characters when downloading packages
  • Show progress bar with percentage when Content-Length is known
  • Display human-readable size formatting (KB/MB)
  • Add TTY detection to skip ANSI codes when stderr is piped/redirected
  • Include VirtualTerminal for deterministic screenshot testing

During download:

⠋ Downloading roc-lang/basic-cli...
  [████████████░░░░░░░░░░░░░░░░] 1.2 / 5.5 MB

When complete:

✔ Downloaded roc-lang/basic-cli

Test plan

  • All 2202 existing tests pass
  • New tests verify progress bar rendering at 0%, 50%, 100%
  • Tests verify spinner animation overwrites correctly
  • Tests verify non-TTY mode outputs simple text without ANSI codes
  • Tests verify completion clears both progress lines
  • Manual test: run roc run on project with uncached dependency

🤖 Generated with Claude Code

rtfeldman and others added 3 commits January 14, 2026 21:34
Implements GitHub issue #9009: Package download status indicator.

Changes:
- Add progress.zig with ProgressState, spinner animation, and progress bar
- Add TTY detection to skip ANSI codes when stderr is piped/redirected
- Add VirtualTerminal for deterministic screenshot testing
- Add ANSI cursor control codes to style.zig
- Display download status in CLI when fetching packages

The progress display shows:
- Spinner animation
- Package name (extracted from URL)
- Progress bar with percentage (when size is known)
- Human-readable size (KB/MB)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Zig lints disallow separator comments (// ====).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants