#!/usr/bin/env bash
set -euo pipefail
# Run from each checkout with its fresh dev server already running.
# Supply a disposable git project and the checkout's isolated data directory.
project="$1"
data="$2"
node apps/server/src/bin.ts project add "$project" --title 'Math fallback proof' --base-dir "$data"
node apps/server/src/bin.ts thread start "$project" 'Pick the state $\hat{s} = \arg\max_{s \in M_t:\,\dead(s)=0} b_t(s) + b_{t-1}(s) + b_{t-2}(s) + b_{t-3}(s)$, then plan from it.' --title 'Invalid inline formula' --provider devReplay --model multi-turn --base-dir "$data" --wait --json
# Install each checkout's native client with mobile:install, load its Metro,
# and pair with test-t3-mobile's pair-client.sh.
# Settings > Appearance: Render math ON, DM Sans 16 pt, T3 Code light theme.
# Open Invalid inline formula, expand the user message. Pixel 9 / Android API 36.
# Screenshot twice at least 500ms apart; compare the content area for stability.
# Public captures crop away the top 230px (status/header with private host label).
# iOS counterpart: same setup, iPhone 18 Pro / iOS 27.2, System font 16 pt.
node apps/server/src/bin.ts thread start "$project" 'Pick the state $\hat{s} = \arg\max_{s \in M_t:\,\dead(s)=0} b_t(s)$, then plan from it.' --title 'Original invalid formula' --provider devReplay --model multi-turn --base-dir "$data" --wait --json
# Expand Original invalid formula with Render math ON.
# iOS public captures crop away the top 115px (status/header with private host label).
