Keep a frame line from auto-wrapping: count visible columns ignoring SGR
escapes and control chars, and drop trailing visible chars that would
push past cols. Appends a reset so a truncated color run can’t leak.
In-place terminal redraw of one frame. Assumes the cursor parks on the
previous frame’s last line (no trailing newline). Returns the new frame’s
line count so the caller can pass it back as prev_lines.
Terminal (rows, cols) from stty size. None when not a tty or the probe
fails — redraw then skips clipping (safe: non-tty can’t wrap).
Deliberately UNcached: the watch loop re-queries every refresh so resizing
mid-run switches between the full and compact dashboards live.