Conversation
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>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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 throughwithPagelike pdf/screenshot) so callers get a singleHardwareInfosnapshot of where pages actually render.The implementation collects browser metadata (version, headless, channel/build, sanitized launch args vs
driver.defaultArgsvia 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 viadpkg-queryon Linux).report({ benchmark: true })optionally runs a short deterministic WebGL timing loop and attachesperformance.webgl.index.d.tsdocumentsHardwareInfoand related types. Tests coverdetectBuildpath heuristics, integrationreport()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.