You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0f2d584
Browse filesBrowse the repository at this point in the historyBrowse files
fix(progress): keep the spinner status on a single row
Each spinner frame clears its line with `\r\x1b[K`, which only erases the
row the cursor sits on. When the status is wider than the terminal it
wraps, so every redraw leaves the overflow row on screen and the line
reads as flicker. The combined status
`Refreshing model pricing from LiteLLM... :: Loading usage logs (0/2) ::
Claude, Codex` is ~85 columns, so any terminal narrower than that hits it
on every online run; `-O` skips the pricing status and avoids it.
Truncate the status to the terminal width minus the spinner prefix and one
spare column before writing, so the single-line clear stays correct and
the cursor never ends a frame in the wrap-pending state.
`table.rs` already had ANSI- and CJK-aware truncation for cells, so that
helper moves to `ccusage-terminal::width` as the public
`truncate_to_width` instead of being duplicated. Its tests and insta
snapshot move with it.
Verified under a pty at `COLUMNS=40`: all 284 spinner frames stay within
39 columns, and at `COLUMNS=80` nothing is truncated.
Closes#1411
Copy file name to clipboardExpand all lines: rust/crates/ccusage-terminal/src/snapshots/ccusage_terminal__table__tests__snapshots_ansi_truncation_boundary.snap
0 commit comments