Use ANSI 2K to clear the progress line before notify/render

main

Commit

Soph4mo ago

The previous "overwrite with N spaces" approach for clearing the ticker frame relied on tracked byte length matching display width. That assumption breaks for our line: it contains four multi-byte UTF-8 characters (→, │, …, →), so byte length runs ~8 bytes wider than display width. The extra spaces wrap onto the next row and leave the original progress text untouched on the previous one, which is why slog INFO lines and 413 errors appeared concatenated to the progress line in the user's terminal output even though notify was firing.

Switch to emitting "\r\x1b[2K" (carriage return + ANSI "erase entire line") in both render and notify. The terminal handles the column accounting, so the clear is exact regardless of UTF-8 byte/column mismatch and regardless of terminal width. Drops the need for lastLen-based padding entirely. Add a regression test that verifies the clear escape lands before the message text.

Entire-Checkpoint: bcd665909dfa

Checkpoints

can you rebase soph/progress-indicators onto soph/smart-subdivision

Claude CodeOpus 4.7[1m]
View session
Checkpoint 1