🎨 Palette: Hide cursor during spinner animation#15
Conversation
When the TUI is showing the `Spinner` animation, the cursor is currently still visible. This causes the cursor block to rapidly jump around the screen as the terminal frame updates, which is visually distracting. This updates the `Spinner` struct to hide the cursor via `crossterm::cursor::Hide` during animation. The cursor is then safely restored via `Show` when the spinner completes, fails, or drops out of scope (to prevent terminal corruption). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@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. |
There was a problem hiding this comment.
Code Review
This pull request implements cursor visibility management for the Spinner component to improve the visual polish of the CLI. It introduces a cursor_hidden flag and ensures the cursor is hidden during animation and restored upon completion or failure, including a Drop implementation for safety. Feedback suggests refactoring the cursor restoration logic into a helper method to reduce duplication and addressing the inconsistency where the Drop implementation hardcodes stdout while other methods use a generic writer.
|
@copilot code review |
|
@claude code review |
There was a problem hiding this comment.
Pull request overview
Adds cursor visibility management to the CLI Spinner so the terminal cursor is hidden during spinner animation and restored afterward (including an attempted restore on drop), improving terminal UX while rendering animated progress.
Changes:
- Track cursor visibility in
Spinnerand hide the cursor on firsttick(). - Show the cursor again in
finish()/fail()and add aDropimpl to restore cursor visibility. - Add a palette note documenting the UX learning.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| rust/crates/rusty-claude-cli/src/render.rs | Implements cursor hide/show logic for spinner rendering and adds Drop restore behavior. |
| .Jules/palette.md | Documents the rationale and guidance for cursor visibility during terminal animations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex Code Review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d5c7fe886
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d5c7fe886
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… tests Agent-Logs-Url: https://github.com/badMade/claw-code/sessions/dc4e8046-8430-44a8-9d70-aee7fc1644ab Co-authored-by: badMade <106821302+badMade@users.noreply.github.com>
Addressed in |
💡 What: Added cursor hiding/showing logic to the
Spinnercomponent in the CLI renderer.🎯 Why: While a CLI spinner animates, an active blinking cursor jumping around the screen can be visually distracting and is generally considered poor terminal UX.
📸 Before/After: The blinking terminal cursor no longer overlays the spinner animation.
♿ Accessibility/Polish: Adds an implementation of
Dropto the spinner to ensure the cursor is restored if the process exits unexpectedly, avoiding a corrupted terminal state.PR created automatically by Jules for task 2176432711789245205 started by @badMade