#!/usr/bin/env bash
# Run from the tested checkout, after pairing the Pixel 9 and opening the PR.
# Full-screen portrait, 1080x2424, light theme, no scrolling.
# Usage: interaction.sh SESSION OUTPUT_DIRECTORY EMPTY_PR_ID
set -euo pipefail
session=$1
out=$2
pr=$3
stamp=$(date -u +%Y%m%dT%H%M%SZ)
run="$out/$stamp"
mkdir -p "$run"
agent-device record start "$run/empty.mp4" --session "$session"
agent-device press 60 1459 --session "$session" --settle
az repos pr show --id "$pr" --organization "$AZURE_DEVOPS_TEST_ORG" --query description -o json > "$run/after-checkbox.json"
agent-device press 164 1459 --session "$session" --settle
agent-device record stop --session "$session"
# In these runs the text-label tap did not toggle either side.
# On head, a subsequent checkbox tap demonstrated unchecking and persistence:
# agent-device record start "$run/uncheck.mp4" --session "$session"
# agent-device press 60 1459 --session "$session" --settle
# az repos pr show --id "$pr" --organization "$AZURE_DEVOPS_TEST_ORG" --query description -o json
# agent-device record stop --session "$session"
# Control PR: open it, then record and press 60 1398 with --settle.
