Skip to content

🎨 Palette: Use ANSI Erase in Line (\033[K) to prevent text artifacts#136

Open
EiJackGH wants to merge 1 commit intomainfrom
palette/ansi-erase-in-line-9419785241340369082
Open

🎨 Palette: Use ANSI Erase in Line (\033[K) to prevent text artifacts#136
EiJackGH wants to merge 1 commit intomainfrom
palette/ansi-erase-in-line-9419785241340369082

Conversation

@EiJackGH
Copy link
Copy Markdown
Collaborator

💡 What: Replaced hardcoded padding spaces with the ANSI Erase in Line escape sequence (\033[K) after carriage returns in the UI output.
🎯 Why: When dynamic lines (like the "Starting in 3..." or "Score: 100") update, replacing a longer line with a shorter line can leave trailing characters behind. Using \033[K immediately clears the line to the right of the cursor, cleanly overwriting previous text without needing to guess how many padding spaces to add.
📸 Before/After: Visual changes only noticeable during transitions where text shrinks in length.
♿ Accessibility: N/A - but improves visual clarity for all sighted users by removing visual artifacts.


PR created automatically by Jules for task 9419785241340369082 started by @EiJackGH

Replaced hardcoded padding spaces in CLI output with the ANSI Erase
in Line escape sequence (`\033[K`) after carriage returns. This
change reliably clears out dynamic text to the end of the line,
preventing trailing characters from persisting when a new output string
is shorter than the previous one.

Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

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

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.

1 participant