#!/usr/bin/env bash
# Manual reproduction command transcript, parameterized to omit private hostnames.
# Run from each commit checkout. Use a fresh HOME_DIR for each server.
set -euo pipefail
: "${HOME_DIR:?}" "${DEVICE_ORIGIN:?}" "${SERVER_PORT:?}" "${METRO_PORT:?}" "${SESSION:?}"
# Terminal 1:
# T3CODE_DEV_SEED=0 vp run dev --host 0.0.0.0 --home-dir "$HOME_DIR"
# Terminal 2, in apps/mobile:
# vp run dev:client --port "$METRO_PORT"
# Prepare before leasing; connect proxy and lease Pixel 9 with agent-device.
# vp run mobile:install android --prepare
# vp run mobile:install android --session "$SESSION" --metro "$DEVICE_ORIGIN:$METRO_PORT"
# Between commits, clear client state and open the other checkout's Metro URL.
# Native fingerprint was identical on both commits.
.agents/skills/test-t3-mobile/scripts/pair-client.sh "$SERVER_PORT" "$HOME_DIR" "$DEVICE_ORIGIN:$SERVER_PORT" agent-device --session "$SESSION"
agent-device snapshot -i --session "$SESSION"
# Tap the New thread row's ref from the snapshot; leave Ask anything empty.
# Confirm snapshot reports Send [disabled], with no keyboard or overlay.
# Run these commands for light and dark, retaining screenshots only after a match.
for theme in light dark; do
  agent-device settings appearance "$theme" --session "$SESSION"
  agent-device screenshot "$theme-a.png" --normalize-status-bar --session "$SESSION"
  sleep 0.5
  agent-device screenshot "$theme-b.png" --normalize-status-bar --session "$SESSION"
done
