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 T10: name the window that took foreground. Running on John's own laptop while he worked, every click on his Edge window reported '#56 REGRESSED' — a false alarm against a shipped fix. Only a pup window taking focus can support that accusation.
1 file changed
+11−1
tools/selftest.sh+11−1@@ -140,10 +140,20 @@ sleep 6 FG_AFTER=$(timeout 60 $CLI shell_execute '{"command":"powershell -NoProfile -Command \"Add-Type -Name FGB -Namespace W -MemberDefinition '"'"'[DllImport(\\\"user32.dll\\\")] public static extern IntPtr GetForegroundWindow();'"'"'; [W.FGB]::GetForegroundWindow()\"","reason":"selftest T10: foreground window after the cold dashboard launch"}' 2>&1 | J "(d.get('stdout') or '').strip()") # hwnd 0 means NOTHING was focused, so "unchanged" proves nothing — that is a vacuous pass, the # same class of lie this harness keeps having to unlearn. Say so instead of banking it.+# A CHANGED foreground is not automatically a steal. This check ran on John's own laptop while he+# was working, and every time he clicked his Edge window mid-test it reported "#56 REGRESSED" — a+# false alarm naming a shipped fix, which is worse than no check at all. The accusation is specific+# ("stolen BY A COLD pup_dashboard"), so only pup taking the foreground can support it: name the new+# foreground window and fail only if it is pup's. Anything else is the human using their machine.+FG_AFTER_TITLE=$(timeout 60 $CLI shell_execute '{"command":"powershell -NoProfile -Command \"Add-Type -Name FGT -Namespace W -MemberDefinition '"'"'[DllImport(\\\"user32.dll\\\")] public static extern IntPtr GetForegroundWindow(); [DllImport(\\\"user32.dll\\\", CharSet=CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, System.Text.StringBuilder s, int n);'"'"'; $h=[W.FGT]::GetForegroundWindow(); $sb=New-Object System.Text.StringBuilder 300; [void][W.FGT]::GetWindowTextW($h,$sb,300); $sb.ToString()\"","reason":"selftest T10: name the foreground window so a human focus change is not misreported as a pup steal"}' 2>&1 | J "(d.get('stdout') or '').strip()") if [ "$FG_BEFORE" = "0" ] || [ -z "$FG_BEFORE" ]; then bad "T10 INCONCLUSIVE: no window held focus before the launch (hwnd '${FG_BEFORE:-empty}'), so a steal could not be detected — raise a window and re-run" elif [ "$FG_BEFORE" = "$FG_AFTER" ]; then ok "cold pup_dashboard did NOT steal focus (foreground hwnd $FG_BEFORE unchanged)"-else bad "FOREGROUND STOLEN by a cold pup_dashboard (#56 regressed): $FG_BEFORE -> $FG_AFTER"; fi+elif printf '%s' "$FG_AFTER_TITLE" | grep -qi "Chrome for Testing"; then+ bad "FOREGROUND STOLEN by a cold pup_dashboard (#56 regressed): $FG_BEFORE -> $FG_AFTER (\"$FG_AFTER_TITLE\")"+else+ ok "cold pup_dashboard did NOT steal focus (focus moved to a NON-pup window, \"$FG_AFTER_TITLE\" — the human was using the machine, which is not a steal)"+fi timeout 60 $CLI pup_close_window '{"sessionId":"st-fg"}' >/dev/null 2>&1 timeout 60 $CLI pup_close_window '{"sessionId":"pup-dashboard"}' >/dev/null 2>&1