Conversation
… configuration - Introduced EXPECT_COOKIES_ENV_NAME and EXPECT_BROWSER_ENV_NAME constants. - Updated McpSession to utilize new cookie and browser configuration options. - Enhanced cookie handling logic to support default settings based on environment variables.
- Updated the cookie handling in the Browser class to first attempt batch cookie injection. - Implemented a fallback mechanism for per-cookie injection in case of batch failures, with detailed logging for skipped cookies. - Modified the Cookie class to conditionally include the sameSite property in the serialized output.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Contributor
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/cli/src/index.tsx">
<violation number="1" location="apps/cli/src/index.tsx:1">
P1: This change removes the CLI command parser from the entrypoint, so documented commands like `tui`, `init`, and `watch` are no longer wired here.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| }); | ||
|
|
||
| program.parse(); | ||
| import "@expect/browser/cli"; |
Contributor
There was a problem hiding this comment.
P1: This change removes the CLI command parser from the entrypoint, so documented commands like tui, init, and watch are no longer wired here.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/cli/src/index.tsx, line 1:
<comment>This change removes the CLI command parser from the entrypoint, so documented commands like `tui`, `init`, and `watch` are no longer wired here.</comment>
<file context>
@@ -1,451 +1,456 @@
-});
-
-program.parse();
+import "@expect/browser/cli";
+
+// // HACK: TUI and Commander CLI commented out — entry point now only runs the MCP server.
</file context>
Video recording adds unnecessary overhead when running via MCP. Removes videoOutputDir from createPage and video handling from close. Co-authored-by: Cursor <cursoragent@cursor.com>
- Added a mechanism to prevent multiple shutdown executions by introducing an `alreadyShutdown` flag. - Enhanced the `handleShutdown` function to handle errors during session closure and ensure process exit is called only once. - Registered additional event listeners for `stdin` to trigger shutdown on input end or close.
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/browser/src/mcp/start.ts">
<violation number="1" location="packages/browser/src/mcp/start.ts:22">
P2: The SIGINT/SIGTERM handler no longer exits the process on success. With a signal listener registered, Node won’t terminate automatically, so a successful closeSession will leave the process running.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic.
This reverts commit 2489466.
- Introduced viewport option in CreatePageOptions interface. - Added EXPECT_VIEWPORT_ENV_NAME constant for environment variable configuration. - Enhanced McpSession to parse and apply viewport settings from the environment variable. - Updated Browser class to utilize the configured viewport when creating new contexts.
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.
Summary
playwrightFormatno longer includessameSite: undefined, which causedProtocol error (Storage.setCookies): Invalid cookie fieldsin PlaywrightaddCookiesfails, falls back to injecting cookies one-by-one so one bad cookie doesn't abort the restEXPECT_COOKIES(simple on/off toggle) andEXPECT_BROWSER(default engine) for MCP configurationTest plan
EXPECT_COOKIES=trueagainst a site that previously crashed withInvalid cookie fieldsEXPECT_BROWSER=webkitchanges the default browser engineMade with Cursor
Summary by cubic
Fixes a Playwright cookie injection crash and hardens cookie syncing. Adds MCP env vars for cookie reuse, default browser engine, and viewport; disables Playwright video; CLI now runs the MCP server.
Bug Fixes
sameSite: undefinedin cookie payloads to avoid Playwright “Invalid cookie fields”.New Features
EXPECT_COOKIES(default cookie reuse, honored even ifEXPECT_COOKIE_BROWSERSis empty),EXPECT_BROWSER(default engine),EXPECT_VIEWPORT(e.g. 1280x800).@expect/browser/cli(previous TUI/Commander code is commented out).Written for commit 98dd39e. Summary will update on new commits.