🎨 Palette: Enhance CLI Progress Bars and Summary Table#292
🎨 Palette: Enhance CLI Progress Bars and Summary Table#292
Conversation
This change introduces two micro-UX improvements to the CLI experience: 1. **Cleaner Progress Bars**: Replaced the "light shade" character (`░`) with a cleaner "middle dot" (`·`) for less visual noise during long operations. 2. **Card-Style Summary Table**: Replaced the plain ASCII summary table with a Unicode box-drawing table (with robust ASCII fallback) for a more polished report at the end of execution. 3. **Success Delight**: Added a random success message on completion to add a touch of personality. These changes respect the existing `USE_COLORS` logic (checking TTY) to ensure CI logs remain readable. Verification: - Ran `pytest tests/` (all passed). - Visually verified both Unicode (forced) and ASCII output modes. Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
✨ Submitted to Merge by @abhimehro. It will be added to the merge queue once all branch protection rules pass, there are no merge conflicts with the target branch, and impacted targets for the current PR head commit have been uploaded. See more details here. |
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
Summary of ChangesHello @abhimehro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the command-line interface's user experience by refining visual elements. It introduces a more modern aesthetic for progress indicators and restructures the summary output into an easily digestible, card-like format. These changes are designed to make the CLI more engaging and informative, while also ensuring broad compatibility across various terminal environments. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| "💎 Smooth operation!", | ||
| "🌈 Perfect harmony!", | ||
| ] | ||
| print(f"\n{Colors.GREEN}{random.choice(success_msgs)}{Colors.ENDC}") |
Check notice
Code scanning / Bandit
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Note
| # Check for progress bar chars | ||
| assert "░" in combined_output | ||
| # We changed the empty character from '░' to '·' in the progress bar | ||
| 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
There was a problem hiding this comment.
Code Review
The pull request effectively enhances the CLI output by modernizing the progress bar visuals and implementing a card-style summary table. The introduction of the Box class for handling Unicode and ASCII box-drawing characters is a clean and maintainable approach, ensuring a robust fallback for non-interactive environments. The refactoring of the summary table printing logic significantly improves its structure and readability. Additionally, the inclusion of a 'Success Delight' message adds a nice touch to the user experience. All changes are well-implemented and the corresponding test cases have been updated correctly.
There was a problem hiding this comment.
Pull request overview
This PR enhances the CLI user experience by modernizing visual elements. It replaces the Unicode shade character (░) with middle dots (·) in progress bars and implements a card-style summary table using Unicode box-drawing characters with proper ASCII fallbacks for non-interactive environments.
Changes:
- Modified progress bar visuals to use middle dots (·) instead of shade characters (░) for empty portions
- Implemented a Box class that provides Unicode box-drawing characters with automatic ASCII fallback based on USE_COLORS flag
- Redesigned the sync summary table with a card-style layout using box-drawing characters
- Added a randomized success message feature that displays after successful syncs
- Updated test to verify the new middle dot character in progress bars
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| main.py | Added Box class for box-drawing characters, updated progress bar characters from ░ to ·, redesigned summary table with card-style layout, added success message feature, imported random module |
| tests/test_ux.py | Updated test assertion to check for middle dot (·) instead of shade character (░) in progress bars |
| .Jules/palette.md | Added learning entry documenting the ASCII fallback pattern for Unicode box-drawing characters |
Comments suppressed due to low confidence (1)
.Jules/palette.md:8
- The
.Jules/directory (capitalized) conflicts with the existing.jules/directory (lowercase). This creates potential issues on case-sensitive filesystems where both directories exist simultaneously, and on case-insensitive filesystems (like macOS default) where they may collide. The repository convention uses.jules/(lowercase) as seen in existing files like.jules/bolt.mdand.jules/sentinel.md. This file should be moved to.jules/palette.mdto maintain consistency and avoid filesystem conflicts.
## 2025-01-26 - [Silent Waits in CI]
**Learning:** Long silent waits in CLI tools (especially in CI/non-interactive mode) cause user anxiety about hung processes.
**Action:** Always provide periodic heartbeat logs (e.g. every 10s) for long operations in non-interactive environments.
## 2025-02-14 - [ASCII Fallback for Tables]
**Learning:** Using Unicode box drawing characters enhances the CLI experience, but a robust ASCII fallback is crucial for CI environments and piped outputs.
**Action:** Always implement a fallback mechanism (like checking `sys.stderr.isatty()`) when using rich text or Unicode symbols.
| class Box: | ||
| """Box drawing characters for pretty tables.""" | ||
|
|
||
| if USE_COLORS: | ||
| H, V, TL, TR, BL, BR, T, B, L, R, X = "─", "│", "┌", "┐", "└", "┘", "┬", "┴", "├", "┤", "┼" | ||
| else: | ||
| H, V, TL, TR, BL, BR, T, B, L, R, X = "-", "|", "+", "+", "+", "+", "+", "+", "+", "+", "+" | ||
|
|
There was a problem hiding this comment.
The new table rendering functionality (Box class and card-style summary table) lacks test coverage. Given that this project has comprehensive test coverage across 16 test files, the new visual features should have corresponding tests to verify that box-drawing characters are used correctly in interactive mode and fall back to ASCII characters in non-interactive mode. Consider adding tests similar to test_countdown_timer_visuals that verify the Box class characters appear in the table output when USE_COLORS is True and ASCII fallbacks appear when USE_COLORS is False.
Enhanced the CLI output by modernizing the progress bar visuals (using middle dots instead of shades) and implementing a card-style summary table using Unicode box-drawing characters. This improves readability and provides a more polished user experience. Also added a small success message on completion. Includes robust ASCII fallback for non-interactive environments.
PR created automatically by Jules for task 14389183363023798547 started by @abhimehro