From 6b9e3b3f28fd808e976d0737542067639c56cbf4 Mon Sep 17 00:00:00 2001 From: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> Date: Wed, 21 Oct 2026 03:45:56 +0000 Subject: [PATCH] ci: count the prepared channel's subscriber lines by pattern, and close the desktop result menu with a click The first desktop run showed "2 subscribers" in the toolbar and the banner, which the check counting "1 subscriber" missed, and Escape doesn't close the chat list's menus on desktop. Run: 011-search-redesign, slice 4 (feature CI fix) --- scripts/ci/desktop-linux/smoke-test.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/ci/desktop-linux/smoke-test.sh b/scripts/ci/desktop-linux/smoke-test.sh index feff2c1e8d..a4912df2dc 100755 --- a/scripts/ci/desktop-linux/smoke-test.sh +++ b/scripts/ci/desktop-linux/smoke-test.sh @@ -353,7 +353,8 @@ no_consent_alert() { ! "$ui" find "Enable Directory search" > /dev/null 2>&1 } -# A right click on a result opens its menu, which offers Open; Escape closes it. +# A right click on a result opens its menu, which offers Open; a click elsewhere closes it (Escape doesn't close the +# chat list's menus on desktop). result_menu() { local layout=$1 pos opens pos=$(left_pane_position "#ci_group") || { check "$layout: #ci_group shown for its menu" false; return; } @@ -361,9 +362,9 @@ result_menu() { "$ui" right-click "${pos% *}" "${pos#* }" check "$layout: a right click on #ci_group opens a menu with \"Open\"" [ "$(count_phrases all Open)" -gt "$opens" ] "$ui" shot "$layout-result-menu" - "$ui" key Escape + "$ui" click 900 450 sleep 1 - check "$layout: Escape closes the result's menu" [ "$(count_phrases all Open)" -eq "$opens" ] + check "$layout: a click elsewhere closes the result's menu" [ "$(count_phrases all Open)" -eq "$opens" ] } # Searches the directory for the text in the search field with the "Search in Directory" row; the first search @@ -513,7 +514,12 @@ wait_prepared_channel() { alert_shown=true fi if grep -qiF "tap join channel" <<< "$screen"; then - prepared_subscribers=$(count_phrases right "1 subscriber") + local line + while IFS= read -r line; do + if [ "${line%%,*}" -ge 390 ] && grep -qiE '[0-9]+ subscribers?' <<< "$line"; then + prepared_subscribers=$((prepared_subscribers + 1)) + fi + done <<< "$screen" return 0 fi [ "$SECONDS" -lt "$deadline" ] || return 1