feat(frontend): add Browser Live to Custom Agent chats - #4719
Merged
WillemJiang merged 2 commits intoAug 7, 2026
Conversation
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables the existing “Browser Live” UI in Custom Agent chat threads by mounting the shared chat provider stack (including BrowserViewProvider) and gating visibility based on the global browser-control feature flag plus the agent’s tool_groups configuration.
Changes:
- Mount shared chat providers for Custom Agent chat routes so Browser Live can function.
- Add Browser Live gating in Custom Agent chat UI: requires an existing thread, non-mock chat, browser control enabled, and agent tool groups either unrestricted or including
browser. - Add E2E coverage for Browser Live visibility boundaries in Custom Agent chats and update mock agent typing to support
tool_groups.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents Browser Live availability for Custom Agent chats. |
| frontend/tests/e2e/utils/mock-api.ts | Extends MockAgent to support tool_groups in E2E fixtures. |
| frontend/tests/e2e/agent-chat.spec.ts | Adds E2E scenarios asserting when Browser Live should show/hide for Custom Agent threads. |
| frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/page.tsx | Implements Browser Live gating and renders BrowserTrigger + passes browserEnabled to ChatBox. |
| frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/layout.tsx | Switches to shared ChatProviders so Browser Live provider is mounted. |
| frontend/AGENTS.md | Updates module guidance to reflect new gating behavior for Custom Agent chats. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
frontend/src/app/workspace/agents/[agent_name]/chats/[thread_id]/layout.tsx:3
layout.tsxis marked as a client component even though it only rendersChatProviders(a client component) and doesn't use client-only APIs itself. Keeping the layout as a server component (by removing the top-level"use client") preserves the server/client boundary and avoids needlessly forcing this route segment to be client-rendered if the page composition changes later.
"use client";
import { ChatProviders } from "@/components/workspace/chats/chat-providers";
WillemJiang
approved these changes
Aug 7, 2026
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.
Closes #4716
Why
Custom Agents can already use the
browsertool group, but their chat route does not mount the Browser Live provider or render its entry point. Users can therefore see browser-produced output without being able to inspect or take over the live per-conversation browser session for navigation, sign-in, CAPTCHA, or other human steps.What changed
BrowserViewProvider.tool_groupsare unrestricted or includebrowser.Surface area
frontend/backend/applanggraph.json, or prompt changedocker/or sandboxed executionskills/backend/pyproject.tomlorfrontend/package.json(say what it buys us)Screenshots / Recording
No new visual design is introduced: Custom Agent chats reuse the existing workspace Browser Live trigger and panel. The production-build E2E test opens the real trigger and asserts that the Browser Live URL controls appear.
Validation
Frontend, on the final state of this branch:
pnpm format— cleanpnpm check— ESLint and TypeScript cleanpnpm test— 125 test files, 987 tests, 0 failuresBETTER_AUTH_SECRET=local-dev-secret pnpm build— succeededPLAYWRIGHT_SKIP_WEB_SERVER=1 PLAYWRIGHT_BASE_URL=http://127.0.0.1:3017 pnpm test:e2e -- tests/e2e/agent-chat.spec.ts tests/e2e/browser-feature.spec.ts— 13 passed against the production buildThe new Browser Live cases were run before the implementation: the explicit-browser and unrestricted-tool-group cases failed because the trigger was absent, while the three hidden-state cases passed. All five passed after the implementation.
Backend code is untouched, so backend suites were not run.
AI assistance
Tool(s) used: Codex
How you used it: Used Codex to inspect the current Custom Agent and Browser Live call paths, implement the shared provider and capability/tool-group gates, add E2E coverage, run red/green and broader frontend validation, and prepare this PR. I reviewed every line and the final diff.