You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browser service: input before Chrome's first paint answers ok though Chrome dropped it #437
Found while fixing #168 (PR #436). Before a page's first contentful paint, Chromium drops input during paint holding, but it still acknowledges that input to CDP. A coordinate click or a key sent in that window answers ok even though Chrome discarded it. In the parity cell, the keys went to body and the field stayed empty.
A real agent usually takes a screenshot first, and a screenshot makes the tab render. Still, an agent that acts on a page it has just navigated, or on a background tab it hasn't observed since, can meet this. The ok is then false.
Work
Measure whether the browser service's input path can tell that the page hasn't painted yet: the first-contentful-paint state, document.visibilityState, or whether the first frame has been presented.
If it can, wait for the first paint, within a bound, before the input. If the bound runs out, answer unconfirmed.
If it can't, document the limit in the agent docs: observe a freshly loaded or background page before acting on it.
Acceptance
A cell clicks and types into a page before its first paint, and the input either lands or is answered unconfirmed. It never answers ok without landing.
Measured on Chrome for Testing and on the person's Chrome.
Activity