From 65036d216ca6241ef53f85492cb5da922846bbcb Mon Sep 17 00:00:00 2001 From: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> Date: Wed, 21 Oct 2026 02:30:04 +0000 Subject: [PATCH] ci: let the desktop tests right-click a point, to open a list row's menu ui right-click clicks with the right button, as ui click does with the left. Run: 011-search-redesign, slice 4 (CI helper) --- scripts/ci/desktop-linux/README.md | 2 +- scripts/ci/desktop-linux/ui | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/ci/desktop-linux/README.md b/scripts/ci/desktop-linux/README.md index 1347cc7d57..8bb40683d3 100644 --- a/scripts/ci/desktop-linux/README.md +++ b/scripts/ci/desktop-linux/README.md @@ -23,7 +23,7 @@ Queueing for a runner adds from under a minute to 20 minutes. Results are artifa ## Scripts -- `ui`: the UI driver. Compose for Desktop has no accessibility tree on Linux, so it finds text on screenshots by OCR (tesseract) and acts with xdotool on an Xvfb display. `ui` alone prints its commands: start (with app settings), shot, text, find, wait, click, click-text, scroll, type, key, avatar (a profile image's colour), ink (a text's height), do (several in a row), stop. `screen-text.py`, `screen-colour.py` and `screen-ink.py` are its helpers. +- `ui`: the UI driver. Compose for Desktop has no accessibility tree on Linux, so it finds text on screenshots by OCR (tesseract) and acts with xdotool on an Xvfb display. `ui` alone prints its commands: start (with app settings), shot, text, find, wait, click, right-click, click-text, scroll, type, key, avatar (a profile image's colour), ink (a text's height), do (several in a row), stop. `screen-text.py`, `screen-colour.py` and `screen-ink.py` are its helpers. - `smoke-test.sh [start|onboarding|setup|backend|search]`: the scripted cases; the default is onboarding and both layouts. `setup` also creates a local group and makes the test SMP server the app's only names server; `backend` does that, connects to the seeded name, and checks both layouts; `search`, which the workflow runs when the backend started, also searches in both layouts: "Search in Directory" for "ci seed", and the full search for the name `seeded` with Enter (the local chat, the Names part, the Directory part, in order), and with the toolbar at the bottom the full search in the New chat sheet, checking headers, rows, avatars, counts and the cards hidden while results show. It then joins `ci_channel` from its Directory row and checks, in both layouts, the note "All results on this page are already in your chats" when the typed `ci_channel` finds only the listed chat, and, with "seeded notes" open and `ci seed` typed, `ci_channel` as its chat's row in the Directory part (OCR reads no `#` before its name and no "Join channel" next to it; `#ci_group` keeps "Join group") that opens the channel without an alert; and the same row in the New chat sheet. The search case makes 129 checks (106 before the known-chat ones). - `backend.sh start ` / `resume ` / `stop `: the test backend, below; `resume` starts the same backend again from a stopped work dir, for the Claude job. - `claude-test.sh`, `claude-test.md` (the prompt), `claude-search.md` (the prompt when the backend runs), `claude-scope` (whether the prompt uses the test backend), `claude-guard.py`, `claude-usage.py`: the Claude job. diff --git a/scripts/ci/desktop-linux/ui b/scripts/ci/desktop-linux/ui index 83c6f74bc0..dae59bcd70 100755 --- a/scripts/ci/desktop-linux/ui +++ b/scripts/ci/desktop-linux/ui @@ -14,6 +14,7 @@ # ui ink print the height in pixels of the text's ink, to compare text sizes # ui wait [secs] wait up to secs (30) until the text is on screen # ui click click at x,y +# ui right-click right-click at x,y, e.g. to open a list row's menu # ui click-text [secs] wait up to secs (20) for the text and click its centre # ui scroll [clicks] # turn the mouse wheel over x,y, 3 clicks unless given @@ -156,7 +157,7 @@ shot() { } click() { - xdotool mousemove --sync "$1" "$2" click 1 + xdotool mousemove --sync "$1" "$2" click "${3:-1}" sleep 1 } @@ -234,6 +235,10 @@ case "${1:-}" in click "$2" "$3" log "click $2,$3" ;; + right-click) + click "$2" "$3" 3 + log "right-click $2,$3" + ;; click-text) secs=${3:-20} if ! pos=$(wait_for "$2" "$secs"); then