Skip to content

feat(browserless): add report() hardware & GPU diagnostics#810

Merged
Kikobeats merged 2 commits into
masterfrom
next
Jun 26, 2026
Merged

feat(browserless): add report() hardware & GPU diagnostics#810
Kikobeats merged 2 commits into
masterfrom
next

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Jun 26, 2026

Copy link
Copy Markdown
Member

Add a report() context method that returns a normalized snapshot of the environment a page renders in: browser build (name/version/headless/channel/ build + full and app-only launch args), virtualization/container detection, OS/CPU/memory, and the GPU stack parsed from the ANGLE renderer string (vendor/device/type, graphics API, mesa/llvm/simdWidth) plus per-version WebGL capabilities/extensions and WebGPU support.

Optionally runs a small deterministic WebGL benchmark (report({ benchmark: true })) for comparing environments and catching render regressions after Chrome/Mesa/LLVM/flag/infra changes.

Includes TypeScript types (HardwareInfo) and tests.


Note

Low Risk
Additive API on the existing withPage lifecycle; no changes to launch or navigation defaults, though CDP command-line reads and optional benchmark add modest runtime when used.

Overview
Adds report() on each browserless context (wired through withPage like pdf/screenshot) so callers get a single HardwareInfo snapshot of where pages actually render.

The implementation collects browser metadata (version, headless, channel/build, sanitized launch args vs driver.defaultArgs via CDP), host OS/CPU/memory and VM/container hints, and GPU data from in-page WebGL/WebGPU probes with ANGLE renderer parsing (vendor/device, hardware vs software—including SwiftShader detection—plus optional Mesa via dpkg-query on Linux). report({ benchmark: true }) optionally runs a short deterministic WebGL timing loop and attaches performance.webgl.

index.d.ts documents HardwareInfo and related types. Tests cover detectBuild path heuristics, integration report() shape (CI pins Mesa/llvmpipe), and the benchmark path.

Reviewed by Cursor Bugbot for commit 8280af5. Bugbot is set up for automated code reviews on this repo. Configure here.

Add a `report()` context method that returns a normalized snapshot of the
environment a page renders in: browser build (name/version/headless/channel/
build + full and app-only launch args), virtualization/container detection,
OS/CPU/memory, and the GPU stack parsed from the ANGLE renderer string
(vendor/device/type, graphics API, mesa/llvm/simdWidth) plus per-version
WebGL capabilities/extensions and WebGPU support.

Optionally runs a small deterministic WebGL benchmark
(`report({ benchmark: true })`) for comparing environments and catching
render regressions after Chrome/Mesa/LLVM/flag/infra changes.

Includes TypeScript types (HardwareInfo) and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f297dfd. Configure here.

Comment thread packages/browserless/src/report.js
@coveralls

coveralls commented Jun 26, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 96.324%next into master. No base build found for master.

detectBuild matched broad patterns (chrome-linux/mac/win, /chrome/) that also
hit stable Chrome install paths (/opt/google/chrome/chrome, Application/
chrome.exe). Match only the Chrome for Testing platform-arch dirs
(chrome-linux64, chrome-mac-arm64, chrome-win64, ...). Adds detectBuild unit
test. Addresses Cursor Bugbot review on #810.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kikobeats Kikobeats merged commit 47b1865 into master Jun 26, 2026
26 of 27 checks passed
@Kikobeats Kikobeats deleted the next branch June 26, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants