Skip to content

🎨 Palette: Add visual progress bars for CLI operations#130

Merged
abhimehro merged 1 commit intomainfrom
palette/cli-progress-bars-2833095607090920927
Jan 27, 2026
Merged

🎨 Palette: Add visual progress bars for CLI operations#130
abhimehro merged 1 commit intomainfrom
palette/cli-progress-bars-2833095607090920927

Conversation

@google-labs-jules
Copy link

💡 What: Replaced text-based progress counters with visual progress bars [██░░] in warm_up_cache and push_rules.
🎯 Why: Provides better psychological feedback for long-running operations and improves the "polish" of the CLI.
📸 Before/After:
Before: ⏳ Warming up cache: 5/50...
After: ⏳ Warming up cache: [██░░░░░░░░] 10% (5/50)
♿ Accessibility: Uses \033[K to ensure clean line updates for screen readers/terminals. Uses high-contrast cyan/green colors.


PR created automatically by Jules for task 2833095607090920927 started by @abhimehro

@google-labs-jules
Copy link
Author

👋 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.

@trunk-io
Copy link

trunk-io bot commented Jan 24, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

bar = "█" * filled + "░" * (width - filled)
percent = int(progress * 100)

# Use \033[K to clear line residue

Check warning

Code scanning / Prospector (reported by Codacy)

Black listed name "bar" (blacklisted-name) Warning

Black listed name "bar" (blacklisted-name)
return safe


def render_progress_bar(current: int, total: int, label: str, prefix: str = "🚀") -> None:

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring
width = 20
progress = min(1.0, current / total)
filled = int(width * progress)
bar = "█" * filled + "░" * (width - filled)

Check warning

Code scanning / Pylint (reported by Codacy)

Black listed name "bar" Warning

Black listed name "bar"
percent = int(progress * 100)

# Use \033[K to clear line residue
sys.stderr.write(f"\r\033[K{Colors.CYAN}{prefix} {label}: [{bar}] {percent}% ({current}/{total}){Colors.ENDC}")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (115/100) Warning

Line too long (115/100)
if USE_COLORS:
sys.stderr.write(f"\r{Colors.CYAN}🚀 Folder {sanitize_for_log(folder_name)}: Pushing batch {successful_batches}/{total_batches}...{Colors.ENDC}")
sys.stderr.flush()
render_progress_bar(successful_batches, total_batches, f"Folder {sanitize_for_log(folder_name)}")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (109/100) Warning

Line too long (109/100)
if successful_batches == total_batches:
if USE_COLORS:
sys.stderr.write(f"\r{Colors.GREEN}✅ Folder {sanitize_for_log(folder_name)}: Finished ({len(filtered_hostnames)} rules) {Colors.ENDC}\n")
sys.stderr.write(f"\r\033[K{Colors.GREEN}✅ Folder {sanitize_for_log(folder_name)}: Finished ({len(filtered_hostnames)} rules){Colors.ENDC}\n")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (154/100) Warning

Line too long (154/100)
return safe


def render_progress_bar(current: int, total: int, label: str, prefix: str = "🚀") -> None:

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning

Missing function or method docstring
width = 20
progress = min(1.0, current / total)
filled = int(width * progress)
bar = "█" * filled + "░" * (width - filled)

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Black listed name "bar" Warning

Black listed name "bar"
percent = int(progress * 100)

# Use \033[K to clear line residue
sys.stderr.write(f"\r\033[K{Colors.CYAN}{prefix} {label}: [{bar}] {percent}% ({current}/{total}){Colors.ENDC}")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (115/100) Warning

Line too long (115/100)
if USE_COLORS:
sys.stderr.write(f"\r{Colors.CYAN}🚀 Folder {sanitize_for_log(folder_name)}: Pushing batch {successful_batches}/{total_batches}...{Colors.ENDC}")
sys.stderr.flush()
render_progress_bar(successful_batches, total_batches, f"Folder {sanitize_for_log(folder_name)}")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (109/100) Warning

Line too long (109/100)
if successful_batches == total_batches:
if USE_COLORS:
sys.stderr.write(f"\r{Colors.GREEN}✅ Folder {sanitize_for_log(folder_name)}: Finished ({len(filtered_hostnames)} rules) {Colors.ENDC}\n")
sys.stderr.write(f"\r\033[K{Colors.GREEN}✅ Folder {sanitize_for_log(folder_name)}: Finished ({len(filtered_hostnames)} rules){Colors.ENDC}\n")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (154/100) Warning

Line too long (154/100)
@abhimehro abhimehro marked this pull request as ready for review January 27, 2026 07:27
Copilot AI review requested due to automatic review settings January 27, 2026 07:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@abhimehro abhimehro merged commit 8dfb2f6 into main Jan 27, 2026
24 checks passed
@abhimehro abhimehro deleted the palette/cli-progress-bars-2833095607090920927 branch January 27, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants