From 3fed16742e6faae7071872dc735c0e83bd60d1c4 Mon Sep 17 00:00:00 2001 From: NagyVikt Date: Sat, 16 May 2026 02:32:02 +0200 Subject: [PATCH] fix(help-popup): keep glass smoke path terminal-safe --- scripts/codex-fleet/bin/help-popup.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/codex-fleet/bin/help-popup.sh b/scripts/codex-fleet/bin/help-popup.sh index ca59a81..aa382ef 100755 --- a/scripts/codex-fleet/bin/help-popup.sh +++ b/scripts/codex-fleet/bin/help-popup.sh @@ -15,8 +15,8 @@ # fleet-tui-poc displays before this PR), context-menu hotkeys are bare # single letters, tmux bindings use the user's `prefix` (default Ctrl+B). # -# Smoke test (standalone, exits when stdin EOFs): -# bash scripts/codex-fleet/bin/help-popup.sh < /dev/null +# Smoke test (standalone, one byte dismisses after render): +# printf q | bash scripts/codex-fleet/bin/help-popup.sh set -eo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -57,6 +57,10 @@ menu_repeat() { done } +clear_popup() { + clear 2>/dev/null || printf '\033[H\033[2J' +} + # ── chrome helpers (visual lineage matches pane-context-menu.sh) ─────────── draw_top() { menu_fg "$IOS_SEPARATOR" @@ -121,7 +125,7 @@ draw_header() { } # ── render ──────────────────────────────────────────────────────────────── -clear +clear_popup printf '\n' draw_top @@ -180,4 +184,4 @@ _ios_reset # When stdin is /dev/null (smoke test) read returns immediately so the popup # renders and exits cleanly without hanging. read -rsn1 -t 60 _ || : -clear +clear_popup