Summary
On --platform web, agent-device screenshot captures only the current viewport, with no option for a full-page capture. Pages taller than the viewport are silently cropped below the fold. The underlying agent-browser backend is Playwright-based (which supports fullPage), so this is about surfacing that capability through the agent-device command, not new browser plumbing.
Environment
- agent-device: 0.17.8
- agent-browser (managed backend): 0.27.1
- Node: 24.x (web backend requirement)
- Reproduced on macOS (local) and Ubuntu headless CI (GitHub Actions) — identical behavior.
Current behavior
agent-device screenshot exposes no full-page flag:
$ agent-device help screenshot
agent-device screenshot [path] [--out <path>] [--overlay-refs] [--fullscreen] [--max-size <px>] [--no-stabilize]
(--fullscreen is full desktop for macOS app sessions, not full page for web.)
A page taller than the viewport is cropped to the viewport. Minimal repro against a 1500px-tall page:
$ agent-device open http://localhost:9080/tall.html --platform web --session vp
$ agent-device screenshot ./shot.png --platform web --session vp
$ file shot.png
shot.png: PNG image data, 1280 x 577 # viewport only; the page is 1500px tall
The capture height tracks agent-browser's default headless viewport (observed ~1280x577, and ~1280x633 on a fresh daemon) rather than the document height. There is also no documented config-file key or env var to set the web viewport size (only AGENT_BROWSER_* flags unrelated to viewport; the viewport <w> <h> command is not exposed through agent-device --platform web's verb set in help web).
Proposed solution
Add a full-page option to the web screenshot path, e.g.:
agent-device screenshot ./shot.png --platform web --full-page
mapping to the agent-browser/Playwright fullPage: true capture. (Optionally, also expose a viewport-size knob — config key or AGENT_BROWSER_VIEWPORT env — so single-screen captures can be sized deterministically.)
Why / use case
We drive agent-device --platform web from CI to verify and screenshot a web app (Expensify NewDot) for PR evidence. snapshot correctly returns the full tree, so verification is unaffected — but the screenshot evidence posted back to reviewers is cropped to the fold, which misrepresents single-page screens and can't show below-the-fold UI in one image. A --full-page capture would make the visual evidence faithful (a true 1:1 app→screenshot) without scroll-and-stitch workarounds.
Notes
Verification correctness is not affected (we rely on snapshot/is/get, which read the full DOM/AX tree); this is specifically about full-page screenshot evidence.
Summary
On
--platform web,agent-device screenshotcaptures only the current viewport, with no option for a full-page capture. Pages taller than the viewport are silently cropped below the fold. The underlyingagent-browserbackend is Playwright-based (which supportsfullPage), so this is about surfacing that capability through theagent-devicecommand, not new browser plumbing.Environment
Current behavior
agent-device screenshotexposes no full-page flag:(
--fullscreenis full desktop for macOS app sessions, not full page for web.)A page taller than the viewport is cropped to the viewport. Minimal repro against a 1500px-tall page:
The capture height tracks agent-browser's default headless viewport (observed ~1280x577, and ~1280x633 on a fresh daemon) rather than the document height. There is also no documented config-file key or env var to set the web viewport size (only
AGENT_BROWSER_*flags unrelated to viewport; theviewport <w> <h>command is not exposed throughagent-device --platform web's verb set inhelp web).Proposed solution
Add a full-page option to the web screenshot path, e.g.:
mapping to the agent-browser/Playwright
fullPage: truecapture. (Optionally, also expose a viewport-size knob — config key orAGENT_BROWSER_VIEWPORTenv — so single-screen captures can be sized deterministically.)Why / use case
We drive
agent-device --platform webfrom CI to verify and screenshot a web app (Expensify NewDot) for PR evidence.snapshotcorrectly returns the full tree, so verification is unaffected — but the screenshot evidence posted back to reviewers is cropped to the fold, which misrepresents single-page screens and can't show below-the-fold UI in one image. A--full-pagecapture would make the visual evidence faithful (a true 1:1 app→screenshot) without scroll-and-stitch workarounds.Notes
Verification correctness is not affected (we rely on
snapshot/is/get, which read the full DOM/AX tree); this is specifically about full-page screenshot evidence.