Skip to content

fix(cli): omit undefined screenshot options - #2528

Closed
shrey150 wants to merge 8 commits into
v4-spike-cli-actionsfrom
v4-spike-cli-page-runtime
Closed

fix(cli): omit undefined screenshot options#2528
shrey150 wants to merge 8 commits into
v4-spike-cli-actionsfrom
v4-spike-cli-page-runtime

Conversation

@shrey150

@shrey150 shrey150 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • omit absent screenshot options instead of serializing explicit undefined values onto the V4 wire
  • preserve screenshot syntax, timeout, file/base64 result shapes, and populated option behavior
  • add regression coverage for default and fully populated screenshot requests

Refreshed on 2026-08-10 against the current parent and v4-spike commit d7556e9a.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
2026-08-10 cumulative stack refresh on Chrome Stable 151 pnpm build passed 6/6 tasks; pnpm check passed 11/11 tasks with 0 errors; the full pnpm test graph exited 0, including 17/17 protocol browser tests and 15/15 local SDK browser tests Proves the updated six-PR stack is compatible with v4-spike d7556e9a across build, static checks, unit tests, and real-browser suites.
Clean coordinated-release tarball consumer at the cumulative tip Packed workspace Stagehand and Browse, installed both into an empty npm project, opened example.com, produced a snapshot, clicked through to IANA, filled an injected input, and read back published-v4-ok Proves the intended co-published artifacts work outside the monorepo with a real Chrome session; it does not substitute for a credentialed Browserbase smoke.
corepack pnpm --dir packages/cli exec vitest run tests/driver-commands.test.ts 1 file passed; 24/24 tests passed Covers minimal and populated V4 screenshot requests, cumulatively including the parent byte encoding.
corepack pnpm --filter browse test:unit 25 files passed; 380/380 tests passed Covers the cumulative CLI contract on the refreshed V4 tip.
Real managed-local screenshot --base64 15,180 base64 characters decoded to 11,384 bytes with a valid PNG signature Exercises the real browser, extension, V4 screenshot RPC, CLI JSON output, and cleanup.
Deterministic local CLI eval suite 18/18 tasks passed, including page-info/screenshot Independent end-to-end screenshot proof through the workspace CLI eval adapter.
Final repository gates 6/6 build tasks; 11/11 checks; 400 warnings and 0 errors Proves the screenshot layer builds and passes all repository gates.

Includes a browse patch changeset for the default screenshot fix.

Final release validation (2026-08-10)

At the cumulative stack tip:

  • release validation now recognizes public browse changesets
  • a Changesets version dry run resolves browse 0.9.7, Stagehand 4.0.1, extension 1.0.1, and Go 4.0.1
  • the packed Browse 0.9.7 manifest rewrites workspace:* to exact Stagehand 4.0.1
  • a clean npm consumer installed those versioned tarballs and completed real-Chrome open, snapshot, model-free click, URL read, and stop with zero audit vulnerabilities

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 651e091

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
browse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from db7b4ca to f2cd89a Compare August 6, 2026 08:22
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch 2 times, most recently from ed70a54 to 7d6d774 Compare August 6, 2026 08:33
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from 7d6d774 to 93a737f Compare August 6, 2026 08:52
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from 93a737f to 68e422a Compare August 6, 2026 09:03
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from 68e422a to 70c1432 Compare August 6, 2026 09:08
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from 70c1432 to 7b7d82f Compare August 6, 2026 17:37
@shrey150 shrey150 closed this Aug 7, 2026
@shrey150 shrey150 reopened this Aug 7, 2026
@shrey150
shrey150 force-pushed the v4-spike-cli-page-runtime branch from 7b7d82f to 4b2080c Compare August 7, 2026 18:43
@shrey150

Copy link
Copy Markdown
Contributor Author

Superseded by #2834. The screenshot adapter there omits undefined options when building the V4 screenshot request, so the compatibility fix is folded into the runtime migration where it is exercised by the CLI tests. Closing this draft.

@shrey150 shrey150 closed this Aug 27, 2026
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.

1 participant