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
Copy file name to clipboardExpand all lines: AGENTS.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,9 @@ Elements are paginated to ensure **no visual overlap** in each screenshot:
204
204
205
205
-`highlight_elements` now uses a **snapshot-first** readiness check instead of page-side polling loops.
206
206
- Reason: OpenBrowser intentionally keeps automated tabs in the browser background, and Chrome may heavily throttle hidden-tab timers. A page-side `setTimeout` stability loop can therefore take far longer than its nominal budget and become the main cause of highlight timeouts.
207
+
- In practice, the main cause of unstable first-highlight screenshots is often **missing warmup**, not a bad readiness classifier. A background tab may answer lightweight `Runtime.evaluate` probes while still sitting in a partially painted / partially decoded state.
208
+
- A screenshot-style warmup is therefore the default precondition for `highlight_elements`. It helps force hidden-tab paint/compositor/image-decode work before interactive-element detection runs.
209
+
- If `highlight_elements` keeps returning `not_ready` but `tab view` immediately makes the next highlight succeed, treat that as a warmup issue first.
207
210
- The extension samples viewport readiness signals once per attempt: document readiness, viewport text/media density, pending images, and loading placeholders such as skeleton/shimmer/spinner indicators.
208
211
- Readiness is graded as `ready`, `provisionally_ready`, or `not_ready`.
209
212
- If readiness is `not_ready`, the extension performs only a couple of short **background-side** retries before proceeding or returning the latest result.
@@ -213,7 +216,7 @@ Elements are paginated to ensure **no visual overlap** in each screenshot:
213
216
```
214
217
# Highlight mixed elements first (default)
215
218
highlight_elements() → Page 1 of any interactive elements
216
-
highlight_elements(page=2) → Page 2 of the same any inventory
219
+
highlight_elements(page=2) → Page 2 of the current page state's any results
OpenBrowser has explicit screenshot control for maximum flexibility:
314
317
318
+
- Screenshots also serve as a practical page warmup mechanism for background tabs. They can unblock page paint and media decode work that passive DOM/readiness inspection does not reliably trigger on its own.
0 commit comments