Skip to content

🎨 Palette: Add dynamic CLI progress bar for quiet mode simulations#103

Merged
EiJackGH merged 2 commits intomainfrom
palette-quiet-progress-bar-9273143439313147185
Mar 18, 2026
Merged

🎨 Palette: Add dynamic CLI progress bar for quiet mode simulations#103
EiJackGH merged 2 commits intomainfrom
palette-quiet-progress-bar-9273143439313147185

Conversation

@EiJackGH
Copy link
Owner

💡 What: Added a dynamic progress bar for the bitcoin_trading_simulation.py script when running in --quiet mode. Also fixed a bug where buy/sell signals were still being printed despite the --quiet flag.

🎯 Why: When users ran long simulations (e.g., hundreds of days) with --quiet enabled to avoid log pollution, the CLI provided zero feedback until completion. This created a "black box" experience where the user couldn't tell if the application was working or hung.

📸 Before/After:
Before: Running --quiet printed buy/sell logs incorrectly, and then paused for a long time with no indicator of progress.
After: Running --quiet suppresses all trading logs, but if run in an interactive terminal, it displays a smooth, self-updating progress bar: Simulation Progress: |██████████--------------------| 33.3%

Accessibility/UX:

  • Context Awareness: The progress bar respects the execution environment. It uses sys.stdout.isatty() to ensure it only renders for humans in an interactive terminal. If piped to a file or CI/CD system, it correctly remains silent to prevent log pollution with carriage returns (\r).
  • Journaled: Added this critical learning regarding long-running CLI process UX to .Jules/palette.md.

PR created automatically by Jules for task 9273143439313147185 started by @EiJackGH

When running the bitcoin trading simulation in --quiet mode, the tool
previously printed no output until the end, creating a "black box" UX
for long-running jobs.

This commit introduces a dynamic progress bar that overwrites itself
using \r when the output is an interactive terminal (`sys.stdout.isatty()`).
It also fixes a bug where buy and sell signals were incorrectly printing
even when --quiet was passed.

A journal entry was added to .Jules/palette.md to record this CLI UX pattern.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

…ration

This commit resolves two independent CI check failures.

1.  **Build (Docker):** The `Dockerfile` attempted to copy `NumberGuess.cpp` from the root directory, but the file exists within the `NumberGuess/` subdirectory. The `COPY` directive has been updated to use the correct relative path (`COPY NumberGuess/NumberGuess.cpp .`), resolving the "not found" build error.
2.  **Terraform:** The `hashicorp/setup-terraform` GitHub action step `terraform plan` was failing with "No configuration files". Terraform requires at least one configuration file (even if empty) to run `init` and `plan`. An empty `main.tf` has been added to the root directory containing `terraform {}` to satisfy this requirement and allow the CI pipeline to complete successfully.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
@EiJackGH EiJackGH merged commit 5f1c0b5 into main Mar 18, 2026
9 checks passed
Repository owner locked as resolved and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant