Skip to content

🎨 Palette: Improve feedback for long waits in CI/non-interactive mode#265

Merged
abhimehro merged 7 commits intomainfrom
palette-ux-improvement-ci-feedback-17019950799559030425
Feb 16, 2026
Merged

🎨 Palette: Improve feedback for long waits in CI/non-interactive mode#265
abhimehro merged 7 commits intomainfrom
palette-ux-improvement-ci-feedback-17019950799559030425

Conversation

@abhimehro
Copy link
Owner

💡 What: Updated countdown_timer to log periodic status updates (every 10s) instead of sleeping silently in non-color environments.
🎯 Why: In CI or non-interactive terminals, long waits (e.g., 60s for deletion propagation) appeared as hung processes, causing user anxiety.
📸 Before/After: Before: Silent sleep. After: "Waiting: 50s remaining...", "Waiting: 40s remaining..."
♿ Accessibility: Improves experience for users relying on logs or screen readers in non-interactive mode.
Reference: Updated tests/test_ux.py and fixed tests/test_push_rules_perf.py to handle dynamic imports.


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

- Update `countdown_timer` in `main.py` to log periodic updates every 10s in non-color mode.
- Update `tests/test_ux.py` to verify the new behavior.
- Fix test pollution in `tests/test_push_rules_perf.py` by using dynamic imports.
- Create `.Jules/palette.md` to document the learning.

Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 15, 2026 22:56
@google-labs-jules
Copy link

👋 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 Feb 15, 2026

😎 Merged manually by @abhimehro - details.

@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 enhances the user experience in non-interactive environments, particularly CI, by addressing the issue of silent, long-duration waits. Previously, operations like waiting for deletion propagation could appear as frozen processes, causing user uncertainty. The core change introduces periodic status updates in the countdown_timer function, ensuring users receive clear feedback on remaining wait times. This improvement is complemented by updated test coverage and a refinement in how modules are imported within certain test files to maintain test stability.

Highlights

  • Enhanced User Feedback for Long Waits: The countdown_timer function now provides periodic log updates (every 10 seconds) in non-interactive environments (e.g., CI) for waits exceeding 10 seconds, preventing the appearance of hung processes and reducing user anxiety.
  • Improved Test Coverage for Countdown Timer: The test suite for countdown_timer was updated to include specific test cases for both short and long waits in non-color mode, ensuring the new periodic logging behavior is correctly verified.
  • Refactored Module Import in Tests: The main module import in tests/test_push_rules_perf.py was refactored to dynamically handle reloads, improving test reliability and preventing potential import conflicts.
  • Documented Best Practice: A new learning note was added to .Jules/palette.md emphasizing the importance of providing feedback during long silent waits in CLI tools, especially in non-interactive environments.
Changelog
  • .Jules/palette.md
    • Added a new entry documenting the learning and action regarding silent waits in CI.
  • main.py
    • Modified countdown_timer to provide periodic status updates (every 10s) instead of silent sleeping when USE_COLORS is false and the wait is longer than 10 seconds.
    • Implemented a loop to log remaining time and sleep in steps for long waits.
  • tests/test_push_rules_perf.py
    • Changed import main to dynamically import main using importlib in setUp to prevent issues with module reloads.
    • Updated calls to main.push_rules to use self.main.push_rules after dynamic import.
  • tests/test_ux.py
    • Renamed test_countdown_timer_no_colors to test_countdown_timer_no_colors_short and updated its assertion to check for no log calls for short waits.
    • Added test_countdown_timer_no_colors_long to verify periodic log updates and correct sleep calls for long waits in non-color mode.
Activity
  • The pull request was automatically created by Jules for a task started by @abhimehro.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

# 1. "LongWait: 15s remaining..." (after first sleep/loop iteration)
# 2. "LongWait: 5s remaining..." (after second sleep/loop iteration)

assert mock_sleep.call_count == 3

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.
mock_sleep.assert_any_call(10)
mock_sleep.assert_any_call(5)

assert mock_log.info.call_count == 2

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

Improves CLI UX in CI/non-interactive environments by adding periodic “heartbeat” log updates during long waits, rather than appearing to hang silently.

Changes:

  • Update countdown_timer to emit periodic log.info updates in no-color mode for waits >10s.
  • Expand UX tests to cover both short (silent) and long (periodic log) no-color countdown behavior.
  • Adjust a perf test to reference main via sys.modules and add a Jules “palette” note documenting the UX lesson.

Reviewed changes

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

File Description
main.py Adds periodic logging for long waits when USE_COLORS is false.
tests/test_ux.py Splits/extends countdown timer tests to validate short vs long no-color behavior.
tests/test_push_rules_perf.py Switches to using self.main derived from sys.modules to be resilient to module reloads.
.Jules/palette.md Adds a short “palette” note about avoiding silent waits in CI.

Comment on lines +1 to +3
## 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.
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

This introduces a new .Jules/ directory, but the repo already has a .jules/ directory. Having both differs only by case and can cause checkout/merge issues on case-insensitive filesystems (Windows/macOS). Consider placing this file under the existing .jules/ directory (or standardizing on one casing).

Copilot uses AI. Check for mistakes.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable user experience improvement for non-interactive environments by adding periodic status updates during long waits, preventing the appearance of a hung process. However, a medium-severity log injection vulnerability was identified in a new logging statement within the countdown_timer function, as it fails to sanitize the message parameter. It is recommended to apply the existing sanitize_for_log function to mitigate this risk. Additionally, a minor refinement is suggested for test_push_rules_perf.py to improve test robustness against pollution.

abhimehro and others added 2 commits February 15, 2026 20:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

1 similar comment
@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

abhimehro and others added 2 commits February 15, 2026 20:14
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

@github-actions
Copy link

👋 Development Partner is reviewing this PR. Will provide feedback shortly.

@abhimehro abhimehro merged commit 6c0f025 into main Feb 16, 2026
9 of 11 checks passed
@abhimehro abhimehro deleted the palette-ux-improvement-ci-feedback-17019950799559030425 branch February 16, 2026 02:47
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.

5 participants