From 68d4d6191c11a7318108124cea6b25ebbaeb9e64 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 15 Apr 2026 09:03:44 +0200 Subject: [PATCH] add test progress bar --- misc/scripts/test-progress-bar.sh | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 misc/scripts/test-progress-bar.sh diff --git a/misc/scripts/test-progress-bar.sh b/misc/scripts/test-progress-bar.sh new file mode 100755 index 00000000..82cdae25 --- /dev/null +++ b/misc/scripts/test-progress-bar.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Manual repro for OSC 9;4 progress-bar handling (issue #1509). +# Run inside a Rio window. The fix is verified visually if the +# indeterminate bar in phase 2 *moves* across the window — before +# the fix it froze at the left edge because every heartbeat OSC +# yanked the animation phase back to t=0. + +osc() { printf '\033]9;4;%s;%s\033\\' "$1" "$2"; } + +echo "== phase 1: determinate, climbing 0->100 ==" +for p in 0 10 20 30 40 50 60 70 80 90 100; do + osc 1 "$p" + sleep 0.15 +done + +echo "== phase 2: heartbeat indeterminate (issue #1509 repro) ==" +echo "(OSC 9;4;3 every 100ms for 6s — bar should slide L<->R, not freeze)" +end=$(( $(date +%s) + 6 )) +while [ "$(date +%s)" -lt "$end" ]; do + osc 3 0 + sleep 0.1 +done + +echo "== phase 3: error state at 50% ==" +osc 2 50 +sleep 1.5 + +echo "== phase 4: pause at 75% ==" +osc 4 75 +sleep 1.5 + +echo "== phase 5: clear ==" +osc 0 0 -- 2.51.2