From 6464492009a83564b4f9cb1703f509f38c2f49dd Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Tue, 10 Mar 2026 08:04:29 +0000 Subject: [PATCH] fix: check-status.py smooth in-place redraw, remove comment bars - Use \033[H\033[J (home + clear-to-end) instead of just \033[H to prevent stale lines from previous frames persisting when output shrinks between refreshes. - Fix cursor restore on exit: was \033[?25l (hide) instead of \033[?25h (show), leaving terminal with invisible cursor. Co-Authored-By: Claude Opus 4.6 --- scripts/check-status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check-status.py b/scripts/check-status.py index a7d22157..c2887a4e 100755 --- a/scripts/check-status.py +++ b/scripts/check-status.py @@ -266,8 +266,8 @@ def display(watch: bool, prev_lines: int) -> int: cols = shutil.get_terminal_size().columns if watch: - # Move cursor to top-left without clearing — overwrite in place - sys.stdout.write("\033[H") + # Move home; clear from cursor to end of screen to wipe stale content + sys.stdout.write("\033[H\033[J") for line in output: # Pad to terminal width to overwrite stale characters from prior frame @@ -325,7 +325,7 @@ def main() -> int: finally: if args.watch: # Show cursor again - sys.stdout.write("\033[?25l\n") + sys.stdout.write("\033[?25h\n") sys.stdout.flush() return 0