Skip to content

feat: colorize dataset install and download progress output - #42

Merged
Etoile-Bleu merged 2 commits into
mainfrom
colorize-dataset-install-output
Jul 16, 2026
Merged

feat: colorize dataset install and download progress output#42
Etoile-Bleu merged 2 commits into
mainfrom
colorize-dataset-install-output

Conversation

@Etoile-Bleu

Copy link
Copy Markdown
Owner

Summary

  • Extract cli.rs's Tone/styled helpers into a shared style.rs module (styled_out for stdout, styled_err for stderr), so the color convention isn't duplicated per module.
  • Colorize data.rs's install-flow messages (warning when no database is found, the install prompt, download/success/fallback lines).
  • Colorize dataset_download.rs's live progress bar.
  • All coloring stays gated behind is_terminal(), so piped/redirected output is unaffected.

Test plan

  • cargo build --release -p mensung-client
  • cargo test -p mensung-client (35 passed, 2 ignored live-network tests unaffected)
  • cargo clippy -p mensung-client --release -- -D warnings (clean)
  • Verified interactively via a pty that the install-flow messages render in color on a real terminal and fall back to plain text when piped

Extract cli.rs's Tone/styled helpers into a shared style module so the
installer's messages (data.rs) and progress bar (dataset_download.rs)
follow the same terminal-aware red/yellow/green convention already
used for interaction results, instead of being plain text.
CI's cargo fmt --check job caught a line rustfmt wants split across
multiple lines.
@Etoile-Bleu
Etoile-Bleu merged commit 176f995 into main Jul 16, 2026
5 checks passed
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.

1 participant