feat: add built-in Browser tab for agent-browser by ibetitsmike · Pull Request #27910 · coder/coder · GitHub
Skip to content

feat: add built-in Browser tab for agent-browser - #27910

Merged
ibetitsmike merged 6 commits into
mainfrom
mike/agent-browser-native-tab
Aug 11, 2026
Merged

feat: add built-in Browser tab for agent-browser#27910
ibetitsmike merged 6 commits into
mainfrom
mike/agent-browser-native-tab

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Adds a built-in Browser tab to the Agents page right panel, alongside the built-in Terminal and Desktop tabs, when the chat's bound agent has an app with the well-known slug agent-browser. The tab shows only while the app is embeddable and its health is healthy (or disabled, for templates without a healthcheck), so it appears and disappears live as the daemon comes up or goes down. The iframe stays mounted across tab switches to preserve session state.

To avoid duplicates, the generic Add Tab menu and persisted workspace-app tabs now exclude the agent-browser app. Detection uses the existing coder_app slug and healthcheck signals already present in the workspace data model. The workspace watch handler compares the agent app fields the chat UI consumes, so health transitions propagate without re-render churn on every heartbeat.

On the backend, the chat execute tool now exports AGENT_BROWSER_SESSION=<chat id> on every process it starts. agent-browser resolves its default session from that variable, so browser automation from each chat lands in its own isolated session (named by the chat id in the embedded dashboard) instead of a shared default browser.

Mux created this PR on Mike's behalf.

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 8745625488

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Export AGENT_BROWSER_SESSION=<chat id> on every process the execute
tool starts, so agent-browser commands from a chat land in a browser
session keyed by that chat instead of a shared default. Sessions show
up under the chat id in the dashboard the Browser tab embeds.
@ibetitsmike ibetitsmike changed the title feat(site/src): add built-in Browser tab for agent-browser feat: add built-in Browser tab for agent-browser Aug 7, 2026
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Mux requested this review on Mike's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 1f399ddd15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike marked this pull request as ready for review August 11, 2026 09:37
Comment thread site/src/pages/AgentsPage/AgentChatPageView.stories.tsx Outdated
Comment thread coderd/x/chatd/chattool/execute.go
@coderagents

coderagents Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

New Documentation Needed

  • docs/ai-coder/agents/platform-controls/ (new page, e.g. agent-browser.md) - Document the built-in Browser tab added to the Agents page right panel. This is a new user-facing surface with no docs today, and it closely mirrors the Virtual desktop feature, which has its own dedicated page. The page should cover:
    • When the tab appears: the chat's bound agent must expose a coder_app with the well-known slug agent-browser, and the tab only shows while that app is embeddable and its health is healthy (or disabled for templates without a healthcheck).
    • The template/module prerequisite (an agent-browser app, presumably a registry module), matching how virtual-desktop.md references the portabledesktop module.
    • Per-chat browser session isolation: the chat execute tool exports AGENT_BROWSER_SESSION=<chat id>, so browser automation from each chat lands in its own isolated session instead of a shared default.
  • docs/manifest.json - Add the new page to the AI > Coder Agents > Platform Controls navigation group, alongside the Virtual desktop entry.

Note

The remaining changes (watch-handler refactor, right-panel tab exclusion logic, Storybook/unit tests, and the AGENT_BROWSER_SESSION plumbing) are internal and do not require standalone docs beyond the behavior described above.


Automated review via Coder Agents

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

@ibetitsmike
ibetitsmike merged commit 2e5353b into main Aug 11, 2026
28 checks passed
@ibetitsmike
ibetitsmike deleted the mike/agent-browser-native-tab branch August 11, 2026 10:49
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants