chore: browser._launchServer#37031
Conversation
| }, | ||
|
|
||
| onConnection: (request, url, ws, id) => { | ||
| if (url.searchParams.has('debug-controller')) { |
There was a problem hiding this comment.
I think we don't want this available on every server, so let's make it configurable.
| import { connectOverWebSocket } from './webSocket'; | ||
| import { TimeoutSettings } from './timeoutSettings'; | ||
|
|
||
| import type { Browser as BrowserImpl } from '../server/browser'; |
There was a problem hiding this comment.
I think everything goes wrong with the bots because we should not import server code from the client side. I'd recommend making launchServerOnExistingBrowser taking a client-side Browser instead.
There was a problem hiding this comment.
i tried that in 820fd7f, but typescript still doesn't like it. how curious 🤔
There was a problem hiding this comment.
oh, the real problem was that I imported from src instead of lib in a test.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| host?: string, | ||
| port?: number, | ||
| wsPath?: string, | ||
| debugController?: boolean; |
There was a problem hiding this comment.
Keep it private please.
| debugController?: boolean; | |
| _debugController?: boolean; |
| try { | ||
| const connection = this._delegate.onConnection(request, url, ws, id); | ||
| (ws as any)[kConnectionSymbol] = connection; | ||
| } catch (error) { |
There was a problem hiding this comment.
Lovely! I was about to comment that we should handle exceptions 😄
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"2 failed 21 flaky46594 passed, 803 skipped Merge workflow run. |
This reverts commit 3fdbc06.
Adds a private method for launching a playwright server for an existing browser, for usage from inside MCP.