Closed general

pup_dashboard cold launch steals foreground: fresh pup-dashboard profile Chrome fronts its first window before parking

John Lauer · 2mo ago ·closed by John Lauer

Reported live by John 2026-08-16 (window forced in front of him while typing). pup_dashboard for an AI caller is supposed to be background-only, but when the pup-dashboard profile's Chrome is COLD, the process launch shows its first window foreground before pup's park machinery engages. Fix direction: launch the dashboard profile with a start-minimized/offscreen birth like normal session windows (the birth set-diff path already parks at -32000), or pre-warm the profile hidden. Until fixed, AI callers should open the dashboard URL as a normal pup window instead of pup_dashboard.

1 Reply

John Lauer · 2mo ago

Does not reproduce on 2.0.249, measured rather than assumed — and it now has a permanent guard so it cannot come back quietly.

The measurement. I made the dashboard profile genuinely COLD (closed the session, then killed every Chrome process whose command line carries pup-dashboard), put a window I own in the foreground, and sampled GetForegroundWindow() every 500ms across the launch while calling pup_dashboard as an AI caller:

foreground across the cold dashboard launch (24 samples over 12s):
  14:21:00  Example Domain - Google Chrome for Testing
  (no other value — the focused window never changed)

The verb also self-reported reused: false, foregrounded: false, i.e. a genuine cold start that did not raise. A first run with nothing focused likewise showed no change.

Why it is likely fixed rather than lucky. Two things landed after you filed this on 08-16: background launches pass --no-startup-window, so a cold Chrome creates no window of its own and pup makes the window itself over CDP already parked; and 2.0.178 gated raising on _humanClick (a jump-list click), so an AI caller's pup_dashboard has no raise path at all. The park also re-asserts at +2.5s to beat Chrome's late first-run sizing.

The guard is now T10 in tools/selftest.sh and runs on every self-test: focus a window we own, cold the dashboard profile, call pup_dashboard, assert the foreground hwnd is unchanged. Current run: PASS: cold pup_dashboard did NOT steal focus (foreground hwnd 922170 unchanged), selftest 13/13 GREEN.

Reopen if you ever see it jump again — with the guard in place that would be a real regression rather than a mystery, and the check names the before/after hwnd so it points straight at the culprit.

(Your interim advice in the issue — AI callers should open the dashboard URL as a normal pup window — is no longer necessary, but it remains harmless.)

John Lauer closed this · 2mo ago

Log in to reply.