#!/usr/bin/env bash
set -euo pipefail
# Run from either checkout after starting T3CODE_DEV_SEED=0 T3CODE_ENVIRONMENT_LABEL=Evidence vp run dev.
# Supply a new scratch repository directory. Each server keeps its own fresh .t3 database.
workspace="$1"
mkdir -p "$workspace"
git -C "$workspace" init --initial-branch=main
git -C "$workspace" remote add origin https://github.com/pingdotgg/t3code.git
git -C "$workspace" -c user.name=Evidence -c user.email=evidence@example.invalid commit --allow-empty -m 'Initial commit'
node apps/server/src/bin.ts project add "$workspace" --title comment-preview --base-dir .t3
node apps/server/src/bin.ts thread start "$workspace" 'Check this comment: https://github.com/pingdotgg/t3code/pull/45060#issuecomment-7266681488' --title 'Check comment' --provider devReplay --model showcase --wait --json --base-dir .t3
# Pair the browser, open the returned thread directly, expand its Agent message, hover its GitHub link.
# Both sides: light theme, 1280x800 CSS viewport, 2x captures. Record hover from the composer.
# Wait for Pushed 6bf9b69782, then capture two stills at least 500ms apart and compare hashes.
