Fix black box artifact in context thinning status line

Add ANSI clear-to-end-of-line escape sequence (\x1b[K]) after the
reset code in the context thinning animation. This prevents leftover
background color artifacts when the carriage return overwrites the
line during the flash animation.
This commit is contained in:
Dhanji R. Prasanna
2026-01-12 11:39:20 +05:30
parent 33558bc092
commit 9e26d6bbf9

View File

@@ -70,13 +70,13 @@ impl UiWriter for ConsoleUiWriter {
// Quick flash animation // Quick flash animation
for frame in &frames { for frame in &frames {
print!("\r{}{}\x1b[0m", frame, message); print!("\r{}{}\x1b[0m\x1b[K", frame, message);
let _ = io::stdout().flush(); let _ = io::stdout().flush();
std::thread::sleep(std::time::Duration::from_millis(80)); std::thread::sleep(std::time::Duration::from_millis(80));
} }
// Final display with bright cyan and sparkle emojis // Final display with bright cyan and sparkle emojis
print!("\r\x1b[1;96m✨ {}\x1b[0m", message); print!("\r\x1b[1;96m✨ {}\x1b[0m\x1b[K", message);
println!(); println!();
// Add a subtle "success" indicator line // Add a subtle "success" indicator line