#!/usr/bin/env bash
set -euo pipefail
# Fresh pooled Pixel Tablet, paired to the same seeded backend as its phone.
session="$1"
output="$2"
agent-device wait text "Checkout icon proof" --session "$session"
python3 stable-capture.py "$session" "$output-navigation.png"
agent-device find text "Checkout icon proof" click --session "$session"
agent-device wait text "first fixture turn complete" --session "$session"
agent-device click 'label="New thread"' --session "$session" --settle
agent-device wait 'label="Ask anything"' --session "$session"
agent-device fill 'label="Ask anything"' "Draft for the second checkout" --session "$session" --settle
agent-device find text "Checkout icon proof" click --session "$session"
agent-device wait text "first fixture turn complete" --session "$session"
python3 stable-capture.py "$session" "$output-thread-and-draft.png"
