🎨 Improve CLI feedback with countdown timers and human-readable duration formatting#196
Conversation
|
🚫 This pull request was requested to be canceled by Abhi Mehrotra (a GitHub user), so it was removed from the merge queue. See more details here.
|
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
|
Hi @copilot, there seems to have been an error which prevented you from merging your changes. Could you please resume where you left off and try again? Thanks! |
…wn timer UX, and add tests Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
I've successfully resumed the work and completed all the improvements from PR #190 review feedback. The changes have been pushed in commit What was done:
All tests passing ✅ (82+ tests including the new ones) |
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
There was a problem hiding this comment.
Pull request overview
This PR addresses all feedback from PR #190 by improving CLI feedback and duration formatting with surgical, targeted fixes. The changes enhance user experience during wait operations by replacing silent sleeps with interactive countdown timers and improving duration display readability in summary tables.
Changes:
- Fixed
format_duration()rounding behavior to useround()instead of truncation, preventing misleading outputs like "60.0s" instead of "1m 00s" - Improved
countdown_timer()line clearing using\033[KANSI escape code to prevent trailing characters when digit counts change - Extended countdown timer usage to
_retry_request()andcreate_folder()for consistent UX across all retry operations - Added comprehensive test coverage for
format_duration()with 5 test functions covering edge cases and boundary conditions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_format_duration.py | New test file with comprehensive coverage for format_duration function, including boundary conditions, rounding behavior, and edge cases |
| main.py | Enhanced format_duration with proper rounding, improved countdown_timer line clearing, and integrated countdown timers into retry operations |
e6966f6
into
palette-ux-improvements-5962504483824375634
Plan: Address PR #190 Feedback & Resolve Merge Conflicts
🎯 Goal
Incorporate all review feedback from PR #190 and resolve merge conflicts with main branch.
✅ Checklist
format_duration()rounding behavior (use round() instead of truncate)countdown_timer()to clear lines properly (avoid trailing characters)countdown_timer()to_retry_request()for consistent UXcountdown_timer()tocreate_folder()for consistent UXformat_duration()format_duration()function📝 Changes Summary
Building on top of PR #190's initial implementation, this PR addresses all review feedback with surgical, minimal changes:
Fixed
format_duration()Rounding - Usesint(round(seconds))instead of truncation to prevent misleading outputs:Improved
countdown_timer()UX - Added\033[Kline clearing on each frame to prevent trailing characters when digit count changes (e.g., 10→9)Consistent Retry Feedback - Applied countdown timer to:
_retry_request()for API retry operationscreate_folder()for folder polling (replacing inline implementation)Comprehensive Test Coverage - Added
tests/test_format_duration.pywith 5 test cases covering:Testing Results
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.