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.
pup_input_dispatch wedges for the whole session after one in-page handler hangs (clipboard writeText in an unfocused window); pup_rescan does not recover it
Summary
A page click handler that never resolves (an await on a promise that never settles) permanently wedges pup_input_dispatch for that session. Every later dispatch times out at the relay (status: "timeout", 15s) even though pup_eval on the same tab keeps working. pup_rescan reports ok but does not recover the dispatch path; only closing and re-creating the window clears it.
Repro (about 2 minutes, scripted tonight on AdomLapper, ab 2.0.76)
- Serve a page whose button handler does
await navigator.clipboard.writeText(...)and open it in a pup window that is NOT the OS-foreground window (the pup default). pup_input_dispatch {type:"click", selector:"#that-button"}.- In an unfocused window Chromium's async clipboard API neither resolves nor rejects ("document is not focused"), so the in-page click never completes. The dispatch call times out at 15s.
- Any further
pup_input_dispatchon that session now times out too, including on other selectors and after a page reload (the wedge survivespup_reload). pup_rescanreturns ok; dispatch still times out.pup_close_window+pup_open_windowwith the same sessionId: dispatch works again.
Expected
- A dispatch whose in-page click side effects hang should time out ONCE and leave the dispatch pathway usable, or the timeout error should tell the caller the session's input channel is now wedged and that a window re-create (not
pup_rescan) is the fix. - Ideally
pup_rescanshould also recover this state, since its whole job is recovering wedged CDP plumbing.
Page-side note for other dashboard authors (already broadcast by the dock thread)
The trigger is worth knowing on its own: navigator.clipboard.writeText hangs forever in an unfocused window. The fix that shipped in adom-parts-search 1.1.2 is a synchronous document.hasFocus() check that routes to an in-gesture document.execCommand("copy") textarea fallback, plus an 800ms race on the async API. With that page fix in place the dispatch wedge never triggers, but pup should still not be wedgeable by a slow page handler.
Happy to run any candidate build against the repro; thread: adom-parts-search.