Skip to content

🎨 Palette: Add progress indicator to cache warm-up#108

Merged
abhimehro merged 1 commit intomainfrom
palette-cli-progress-indicator-11370702366396698307
Jan 18, 2026
Merged

🎨 Palette: Add progress indicator to cache warm-up#108
abhimehro merged 1 commit intomainfrom
palette-cli-progress-indicator-11370702366396698307

Conversation

@google-labs-jules
Copy link

🎨 Palette: CLI Progress Indicator

What: Added a real-time progress counter (e.g., ⏳ Warming up cache: 5/23...) to the cache warm-up phase.
Why: The previous implementation was silent during the network-heavy fetching phase, leaving users wondering if the tool was stuck.
UX:

  • Interactive: Shows dynamic progress on a single line.
  • Clean: Clears the line properly when done or when logging warnings.
  • Accessible: Falls back to simple logs if no TTY is detected.

(No dependencies added, purely standard library)


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

- Implemented a TTY-aware progress spinner for the `warm_up_cache` function.
- Updates in place using `\r` to keep the CLI output clean.
- Handles logging interruptions by clearing and restoring the progress line.
- Falls back to standard logging for non-TTY environments.

This improves the user experience during the initial phase of the sync, especially when fetching many remote resources.
@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 16, 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.


total = len(urls_to_fetch)
if not USE_COLORS:
log.info(f"Warming up cache for {total} URLs...")

Check warning

Code scanning / Prospector (reported by Codacy)

Use lazy % formatting in logging functions (logging-fstring-interpolation) Warning

Use lazy % formatting in logging functions (logging-fstring-interpolation)
for future in concurrent.futures.as_completed(futures):
completed += 1
if USE_COLORS:
sys.stderr.write(f"\r{Colors.CYAN}⏳ Warming up cache: {completed}/{total}...{Colors.ENDC}")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (107/100) Warning

Line too long (107/100)

if USE_COLORS:
# Restore progress
sys.stderr.write(f"\r{Colors.CYAN}⏳ Warming up cache: {completed}/{total}...{Colors.ENDC}")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (111/100) Warning

Line too long (111/100)
sys.stderr.flush()

if USE_COLORS:
sys.stderr.write(f"\r{Colors.GREEN}✅ Warming up cache: {total}/{total} Done! {Colors.ENDC}\n")

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (106/100) Warning

Line too long (106/100)
for future in concurrent.futures.as_completed(futures):
completed += 1
if USE_COLORS:
sys.stderr.write(f"\r{Colors.CYAN}⏳ Warming up cache: {completed}/{total}...{Colors.ENDC}")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (111/100) Warning

Line too long (111/100)

if USE_COLORS:
# Restore progress
sys.stderr.write(f"\r{Colors.CYAN}⏳ Warming up cache: {completed}/{total}...{Colors.ENDC}")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (107/100) Warning

Line too long (107/100)
sys.stderr.flush()

if USE_COLORS:
sys.stderr.write(f"\r{Colors.GREEN}✅ Warming up cache: {total}/{total} Done! {Colors.ENDC}\n")

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (106/100) Warning

Line too long (106/100)

total = len(urls_to_fetch)
if not USE_COLORS:
log.info(f"Warming up cache for {total} URLs...")

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Use lazy % formatting in logging functions Note

Use lazy % formatting in logging functions
@abhimehro abhimehro merged commit 9259fef into main Jan 18, 2026
18 checks passed
@abhimehro abhimehro deleted the palette-cli-progress-indicator-11370702366396698307 branch January 18, 2026 05:29
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.

1 participant