Skip to content

fix: render the live browser panel from the tool's liveUrl#2

Merged
ShawnPana merged 2 commits into
mainfrom
fix-live-browser-panel
Jun 18, 2026
Merged

fix: render the live browser panel from the tool's liveUrl#2
ShawnPana merged 2 commits into
mainfrom
fix-live-browser-panel

Conversation

@ShawnPana

@ShawnPana ShawnPana commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

The bug

The Agent's browser panel rendered empty even while the agent was on a page. extractLiveUrl scraped 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_browser tool output (structured data) instead of the prose. Origin-safe (only accepts https://live.browser-use.com). Verified the panel now renders the live cloud browser (Hacker News) next to the chat. The cubic sandbox on the iframe stays — it was never the cause.

Also

  • Adds public/banner.png (AmbientHacker-style social-preview card) and uses it at the top of the README.

Typecheck + next build pass.

🤖 Generated with Claude Code


Summary by cubic

Fixes the Agent browser panel by reading the live URL from the open_cloud_browser tool 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); adds public/banner.png and updates the README banner.

Written for commit 9033d4a. Summary will update on new commits.

Review in cubic

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>
Comment thread app/_components/agent-chat.tsx Fixed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread app/_components/agent-chat.tsx Outdated
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>
@ShawnPana ShawnPana merged commit 1e4dd8b into main Jun 18, 2026
7 checks passed
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.

2 participants