app
Pup - the AI's own browser
Public Made by Adomby adom
pup gives your AI a real browser on your desktop that it drives completely, in the background, signed in as you: windows that never jump in front of your work, one shared profile that learns your logins, and every window labeled on the taskbar with its AI thread's name.
← Commit history
selftest T4: longer settle on a heavy page, one retry, and it prints what it saw on failure (an empty screenshot result used to report 'could not capture the scroll pair' with no evidence)
1 file changed
+19−8
tools/selftest.sh+19−8@@ -41,19 +41,30 @@ SK=$(timeout 60 $CLI pup_screenshot '{"sessionId":"st-web"}' 2>&1 | J "d.get('si echo "== T4 SCROLL-REFLECT (#50 regression): eval scroll changes the screenshot ==" timeout 90 $CLI pup_open_window '{"sessionId":"st-tall","url":"https://en.wikipedia.org/wiki/Windows_11","foreground":false}' >/dev/null 2>&1-sleep 5-P1=$(timeout 60 $CLI pup_screenshot '{"sessionId":"st-tall"}' 2>&1 | J "d.get('savedTo') or ''")-timeout 60 $CLI pup_eval '{"sessionId":"st-tall","expression":"window.scrollTo(0,4000),window.scrollY"}' >/dev/null 2>&1-sleep 2-P2=$(timeout 60 $CLI pup_screenshot '{"sessionId":"st-tall"}' 2>&1 | J "d.get('savedTo') or ''")+# A heavy page needs time to lay out before the FIRST shot; the old 5s only worked on a warm cache,+# and when a shot came back empty this reported "could not capture the scroll pair" with no evidence+# — the same blind-failure pattern T5 had. Now: longer settle, one retry, and it prints what it got.+shot() {+ for a in 1 2; do+ R=$(timeout 90 $CLI pup_screenshot '{"sessionId":"st-tall"}' 2>&1 | J "d.get('savedTo') or ''")+ [ -n "$R" ] && { echo "$R"; return; }+ sleep 4+ done+ echo ""+}+sleep 12+P1=$(shot)+timeout 60 $CLI pup_eval '{"sessionId":"st-tall","expression":"(window.scrollTo(0,4000),window.scrollY)"}' >/dev/null 2>&1+sleep 3+P2=$(shot) if [ -n "$P1" ] && [ -n "$P2" ]; then-python3 - "$P1" "$P2" <<'PY' && ok "scrolled screenshot differs from top" || bad "screenshots identical after scroll (#50 regressed)"+python3 - "$P1" "$P2" <<'SHOTCMP' && ok "scrolled screenshot differs from top" || bad "screenshots identical after scroll (#50 regressed)" import sys,hashlib from PIL import Image a,b=(hashlib.md5(Image.open(p).tobytes()).hexdigest() for p in sys.argv[1:3]) sys.exit(0 if a!=b else 1)-PY-else bad "could not capture the scroll pair"; fi+SHOTCMP+else bad "could not capture the scroll pair (P1=${P1:-empty} P2=${P2:-empty}) — the screenshot verb returned no savedTo"; fi echo "== T5 IDENTITY KEY: own window gets a pup AUMID registry key (mode-aware) ==" MODE=$(timeout 40 $CLI pup_status '{}' 2>&1 | J "(d.get('settings') or {}).get('taskbarMode') or 'unknown'")