fix: render the live browser panel from the tool's liveUrl#2
Merged
Conversation
The panel never rendered because extractLiveUrl scraped the URL out of the model's markdown-formatted chat text and captured trailing ** , corrupting the wss host. Read the canonical liveUrl from the open_cloud_browser tool output instead. Also add a social-preview banner and use it in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Resolves CodeQL js/incomplete-url-substring-sanitization: startsWith would also accept live.browser-use.com.evil.com. Parse the URL and require hostname === "live.browser-use.com". Co-Authored-By: Claude Opus 4.8 (1M context) <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.
The bug
The Agent's browser panel rendered empty even while the agent was on a page.
extractLiveUrlscraped the liveUrl from the model's markdown-bolded chat text and captured the trailing**, corrupting the wss host so the live view couldn't connect.The fix
Read the canonical liveUrl from the
open_cloud_browsertool output (structured data) instead of the prose. Origin-safe (only acceptshttps://live.browser-use.com). Verified the panel now renders the live cloud browser (Hacker News) next to the chat. The cubicsandboxon the iframe stays — it was never the cause.Also
public/banner.png(AmbientHacker-style social-preview card) and uses it at the top of the README.Typecheck +
next buildpass.🤖 Generated with Claude Code
Summary by cubic
Fixes the Agent browser panel by reading the live URL from the
open_cloud_browsertool output, avoiding markdown corruption and restoring the live view. Validates the URL by parsing it (https + exact host live.browser-use.com, no substring matches); addspublic/banner.pngand updates the README banner.Written for commit 9033d4a. Summary will update on new commits.