Repository navigation
Conversation
|
💬 Approved with comments — The wrapper and the WebSocket auto-upgrade look correct, and the tests cover both the success and failure paths. One WARNING: the public Browser Run TypeScript declarations don't include the new Findings: 1 warning The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 🔧 Fix with your agentPaste the following into your coding agent to investigate and fix these issues. 📝 Documentation:
|
|
Review: 1 finding (1 warning). Adds Browser Run forwarding methods and optional WebSocket auto-upgrade coverage. Specialist findings not posted (4)
Reviewed commit: 2172ee53 · github run |
| launch({ websocket, ...options }: LaunchOptions = {}): Promise< | ||
| BrowserRunConnection | WebSocketConnection | ||
| > { | ||
| const connection = this.#fetcher.launch(options); |
There was a problem hiding this comment.
I'd rather we model launch as just jsrpc too.
There was a problem hiding this comment.
If I understood correctly you are referring to the websocket upgrade in that function? We wanted to have that to not require users to manually call the websocket upgrade (since WebSocket does not go through JSRPC).
iirc the AI binding does something similar of calling the upgrade inside the wrapped binding itself
This PR setups BrowserRun wrapped binding with the methods available to later move every call to go through it.
It also adds ability for Websocket initiated connections to be auto upgraded, so users don't need to do it manually, improving the API in this regard.