Skip to content

🎨 Palette: Hide terminal cursor during CLI spinner animation#8

Open
badMade wants to merge 3 commits into
mainfrom
palette-hide-cursor-spinner-8229289081376148807
Open

🎨 Palette: Hide terminal cursor during CLI spinner animation#8
badMade wants to merge 3 commits into
mainfrom
palette-hide-cursor-spinner-8229289081376148807

Conversation

@badMade
Copy link
Copy Markdown
Owner

@badMade badMade commented Apr 13, 2026

🎨 Palette: Hide terminal cursor during CLI spinner animation

💡 What: Hides the terminal cursor (\x1b[?25l) while the Spinner is active and restores it (\x1b[?25h) when the spinner finishes, fails, or goes out of scope (via the Drop trait).
🎯 Why: Prevents the terminal cursor from jumping around or rendering alongside the spinner frames during long-running tasks, creating a smoother and more polished CLI experience. The Drop implementation ensures safety so the cursor is not permanently hidden if the CLI crashes or is interrupted.
📸 Before/After: Visual noise during "🦀 Thinking..." is reduced.


PR created automatically by Jules for task 8229289081376148807 started by @badMade

💡 What: Hides the terminal cursor (`\x1b[?25l`) while the `Spinner` is active and restores it (`\x1b[?25h`) when the spinner finishes, fails, or goes out of scope (via the `Drop` trait).
🎯 Why: Prevents the terminal cursor from jumping around or rendering alongside the spinner frames during long-running tasks, creating a smoother and more polished CLI experience. The `Drop` implementation ensures safety so the cursor is not permanently hidden if the CLI crashes or is interrupted.
📸 Before/After: Visual noise during "🦀 Thinking..." is reduced.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

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

Copy link
Copy Markdown

@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 implements terminal cursor management for the CLI spinner, hiding the cursor during animation and ensuring its restoration via the Drop trait. Feedback includes removing internal session artifacts, fixing an unexpanded shell command in the documentation, and refining the cursor restoration logic to be terminal-aware, which prevents side effects in non-terminal environments and unit tests.

Comment thread .Jules/palette.md
Comment thread .port_sessions/108fa52a890542199d833cd93ed0429f.json Outdated
Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread rust/crates/rusty-claude-cli/src/render.rs
@badMade
Copy link
Copy Markdown
Owner Author

badMade commented Apr 22, 2026

@copilot code review

@badMade
Copy link
Copy Markdown
Owner Author

badMade commented Apr 22, 2026

@claude code review

Copy link
Copy Markdown

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 by hiding the terminal cursor while the Spinner is active and restoring it when the spinner completes or is dropped, reducing visual noise during long-running operations.

Changes:

  • Hide the cursor on first spinner tick and restore it on success/failure and via Drop.
  • Remove some rust/.claw/sessions/*.jsonl session artifacts.
  • Add new .port_sessions/*.json artifacts and a Jules note file.

Reviewed changes

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

Show a summary per file
File Description
rust/crates/rusty-claude-cli/src/render.rs Adds cursor hide/show behavior to the Spinner, including a Drop restore path.
rust/.claw/sessions/session-1775386853666-0.jsonl Removes a local session artifact.
rust/.claw/sessions/session-1775386852257-0.jsonl Removes a local session artifact.
rust/.claw/sessions/session-1775386842352-0.jsonl Removes a local session artifact.
rust/.claw/sessions/session-1775386832313-0.jsonl Removes a local session artifact.
.port_sessions/d5662f5a103444a9984129c1c8b01597.json Adds a local session artifact (should not be committed).
.port_sessions/59b491f8b3b2439a957e0c680cd193bc.json Adds a local session artifact (should not be committed).
.port_sessions/200c7e63f6f04a57ac6211a90e4e35d0.json Adds a local session artifact (should not be committed).
.port_sessions/108fa52a890542199d833cd93ed0429f.json Adds a local session artifact (should not be committed).
.Jules/palette.md Adds a note documenting the cursor-hiding UX approach.

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

Comment thread .port_sessions/200c7e63f6f04a57ac6211a90e4e35d0.json Outdated
Comment thread .port_sessions/108fa52a890542199d833cd93ed0429f.json Outdated
Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread .port_sessions/d5662f5a103444a9984129c1c8b01597.json Outdated
Comment thread .port_sessions/59b491f8b3b2439a957e0c680cd193bc.json Outdated
Copy link
Copy Markdown

Copilot AI commented Apr 22, 2026

@copilot code review

Addressed with commit e71eaab. I fixed an error-path bug in spinner cursor restoration so cursor_hidden is only cleared after a successful Show, and added regression tests for both finish and fail write-failure paths. Screenshot: N/A (terminal-only ANSI cursor visibility behavior change).

@badMade
Copy link
Copy Markdown
Owner Author

badMade commented Apr 23, 2026

@codex Code Review

1 similar comment
@badMade
Copy link
Copy Markdown
Owner Author

badMade commented Apr 23, 2026

@codex Code Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e71eaab600

ℹ️ 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".

Comment thread rust/crates/rusty-claude-cli/src/render.rs
@badMade badMade marked this pull request as ready for review April 23, 2026 14:52
Copilot AI review requested due to automatic review settings April 23, 2026 14:52
Copy link
Copy Markdown

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

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


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

Comment thread rust/crates/rusty-claude-cli/src/render.rs
Comment thread .port_sessions/d5662f5a103444a9984129c1c8b01597.json Outdated
@badMade
Copy link
Copy Markdown
Owner Author

badMade commented Apr 23, 2026

@codex code review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e71eaab600

ℹ️ 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".

Comment on lines +56 to +57
let mut out = io::stdout();
let _ = execute!(out, Show);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore cursor using the spinner output writer

Spinner::drop always emits Show to io::stdout(), but tick hides the cursor on whichever writer the caller passed in. When a non-stdout writer is used (e.g., stderr or an in-memory writer in tests), the hide/show pair goes to different destinations, which can leave the terminal cursor hidden or inject unexpected ANSI into stdout.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot, make changes based on the above suggestion.

Comment thread .port_sessions/108fa52a890542199d833cd93ed0429f.json Outdated
Copy link
Copy Markdown

Copilot AI commented Apr 30, 2026

@codex Code Review

Completed in commit 495a33d: removed tracked .port_sessions/*.json artifacts and added .port_sessions/ to .gitignore so they won’t be reintroduced. Screenshot: N/A (no UI changes).

@codex Code Review

Completed in commit 495a33d: removed tracked .port_sessions/*.json artifacts and added .port_sessions/ to .gitignore so they won’t be reintroduced. Screenshot: N/A (no UI changes).

@codex code review

Completed in commit 495a33d: removed tracked .port_sessions/*.json artifacts and added .port_sessions/ to .gitignore so they won’t be reintroduced. Screenshot: N/A (no UI changes).

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Copy link
Copy Markdown

Copilot AI commented Apr 30, 2026

@copilot code review

Completed review: no additional code changes were needed beyond commit 495a33d, and spinner-related tests pass (cargo test -p rusty-claude-cli spinner). Screenshot: N/A (terminal-only behavior, no UI screen change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants