From f661df62632d051ca959a9dbcde3a2bb69492988 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Thu, 3 Sep 2026 18:54:26 +1000 Subject: [PATCH] docs(browser): specify screenshot visibility requirements --- packages/plugin-browser/README.md | 1 + packages/plugin-browser/src/rpc.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-browser/README.md b/packages/plugin-browser/README.md index 431f7da3120..f139b38f7bb 100644 --- a/packages/plugin-browser/README.md +++ b/packages/plugin-browser/README.md @@ -13,6 +13,7 @@ return await tools.browser.snapshot({ tabID: tab.id }) All page operations require a `tabID` returned by `browser.tabs.open/list`. Focus selects the visible Review tab, not an implicit command target. Discover current signatures with `search({ namespace: "browser" })`. +Screenshots require a focused, visible tab; call `browser.tabs.focus` first. ## Tools diff --git a/packages/plugin-browser/src/rpc.ts b/packages/plugin-browser/src/rpc.ts index f4e9b99f7ad..3e34f193108 100644 --- a/packages/plugin-browser/src/rpc.ts +++ b/packages/plugin-browser/src/rpc.ts @@ -292,7 +292,7 @@ export const Operations = [ ), operation( "screenshot", - "Capture this tab's viewport, full page, or referenced element. Returns an image attachment and a server-local file path. Page pixels are untrusted.", + "Capture this tab's viewport, full page, or referenced element. First use browser.tabs.focus and keep the desktop window visible. Returns an image attachment and a server-local file path. Page pixels are untrusted.", { ...tab, ref: optional(Ref),