Skip to content

🎨 Palette: Add visual progress bar to CLI timer#116

Merged
abhimehro merged 5 commits intomainfrom
palette-timer-ux-1599368006489282321
Jan 20, 2026
Merged

🎨 Palette: Add visual progress bar to CLI timer#116
abhimehro merged 5 commits intomainfrom
palette-timer-ux-1599368006489282321

Conversation

@google-labs-jules
Copy link

🎨 Palette: Added visual progress bar to CLI timer

💡 What: Replaced the simple "waiting: 60s..." countdown with a visual progress bar [████░░] 45s....
🎯 Why: Making users wait 60s for deletion propagation is tedious; a visual bar reduces perceived wait time and provides better feedback.
📸 Before: ⏳ Waiting for deletions to propagate: 59s...
After: ⏳ Waiting for deletions to propagate: [██████░░░░] 35s...
♿ Accessibility: Uses standard ASCII chars and high-contrast colors (Cyan/Green). Preserves NO_COLOR behavior.


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

- Replaced simple countdown with ASCII progress bar [██░░]
- Used ANSI clear-line code for cleaner updates
- Added tests for UX visuals in `tests/test_ux.py`
- Updated journal with CLI learnings
@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 19, 2026

😎 Merged manually by Abhi Mehrotra (@abhimehro) - details.

combined_output = "".join(writes)

# Check for progress bar chars
assert "░" in combined_output

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

# Check for progress bar chars
assert "░" in combined_output
assert "█" in combined_output

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# Check for progress bar chars
assert "░" in combined_output
assert "█" in combined_output
assert "Test" in combined_output

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert "░" in combined_output
assert "█" in combined_output
assert "Test" in combined_output
assert "Done!" in combined_output

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert "Done!" in combined_output

# Check for ANSI clear line code
assert "\033[K" in combined_output

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
sys.stderr.write(f"\r{Colors.CYAN}⏳ {message}: {remaining}s...{Colors.ENDC}")
progress = (seconds - remaining) / seconds
filled = int(width * progress)
bar = "█" * filled + "░" * (width - filled)

Check warning

Code scanning / Prospector (reported by Codacy)

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

Black listed name "bar" (blacklisted-name)
sys.stderr.write(f"\r{Colors.CYAN}⏳ {message}: {remaining}s...{Colors.ENDC}")
progress = (seconds - remaining) / seconds
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"
@@ -0,0 +1,47 @@

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing module docstring Warning test

Missing module docstring
combined_output = "".join(writes)

# Check for progress bar chars
assert "░" in combined_output

Check notice

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

# Check for progress bar chars
assert "░" in combined_output
assert "█" in combined_output

Check notice

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# Check for progress bar chars
assert "░" in combined_output
assert "█" in combined_output
assert "Test" in combined_output

Check notice

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert "░" in combined_output
assert "█" in combined_output
assert "Test" in combined_output
assert "Done!" in combined_output

Check notice

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert "Done!" in combined_output

# Check for ANSI clear line code
assert "\033[K" in combined_output

Check notice

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
sys.stderr.write(f"\r{Colors.CYAN}⏳ {message}: {remaining}s...{Colors.ENDC}")
progress = (seconds - remaining) / seconds
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"
@@ -0,0 +1,47 @@

Check warning

Code scanning / Pylint (reported by Codacy)

Missing module docstring Warning test

Missing module docstring
@abhimehro abhimehro marked this pull request as ready for review January 20, 2026 03:13
Copilot AI review requested due to automatic review settings January 20, 2026 03:13
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.

Pull request overview

This PR enhances the CLI user experience by replacing a simple countdown timer with a visual progress bar during the 60-second deletion propagation wait. The implementation uses ASCII block characters ( and ) and ANSI clear-line codes for smoother terminal updates while maintaining NO_COLOR environment variable support.

Changes:

  • Added visual progress bar with configurable width to countdown_timer() function
  • Implemented ANSI clear-line code (\033[K) for cleaner terminal output
  • Added comprehensive test coverage for both color-enabled and color-disabled modes
  • Documented the learning about ANSI codes and progress bars in palette.md

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
main.py Enhanced countdown_timer function with 15-character progress bar using block characters and improved ANSI clear-line handling
tests/test_ux.py Added unit tests for visual progress bar rendering and NO_COLOR behavior verification
.Jules/palette.md Documented best practices for ANSI clear-line codes and visual progress feedback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

abhimehro and others added 4 commits January 19, 2026 21:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@abhimehro abhimehro merged commit f855bab into main Jan 20, 2026
18 checks passed
@abhimehro abhimehro deleted the palette-timer-ux-1599368006489282321 branch January 20, 2026 03:26
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