#!/usr/bin/env bash
# Run after installing the matching dev client, pairing its isolated backend,
# and opening the completed Bridge reading thread at the bottom in split view.
# Android Pixel 10 Pro Fold, unfolded 2076x2152, light theme.
set -euo pipefail
session="$1"
out="$2/$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$out"
for i in 1 2 3 4 5 6 7; do
  agent-device gesture pan 1500 700 0 1300 1200 --session "$session"
done
agent-device screenshot "$out/reading.png" --session "$session"
agent-device record start "$out/toggle.mp4" --session "$session"
agent-device press 'label="Maximize content"' --session "$session" --settle
agent-device screenshot "$out/wide.png" --session "$session"
# Show sidebar icon child (the named parent is not directly tappable).
agent-device press 244 128 --session "$session" --settle
agent-device screenshot "$out/narrow-return.png" --session "$session"
agent-device record stop --session "$session"
