Improve browser experience in Agents app#312420
Merged
Conversation
Contributor
kycutler
commented
Apr 24, 2026
- Open localhost links by default
- Disable agentic tools (for now)
- Persist pages when switching between sessions
- Pages are destroyed when closed by the user, or the session is archived / deleted
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Integrated Browser experience in the Agents (sessions) app by changing defaults for link/tool behavior and adding session-aware browser tab persistence so pages survive session switches but are still destroyed on explicit close/archive/delete.
Changes:
- Default Agents configuration to open localhost links in the Integrated Browser and disable agentic browser tools.
- Add session-scoped browser editor lifecycle management to keep browser inputs/models alive across session switches, but force-dispose them when a session is archived/removed.
- Adjust browser editor/model handling and layout timing to better support reusing existing models and avoid transient zero-size layout.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts | Forces browser editor disposal from the tab quick pick close actions to bypass the new veto mechanism. |
| src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts | Reuses an existing input model when present; adds layout retries when container bounds are temporarily 0x0. |
| src/vs/workbench/contrib/browserView/common/browserEditorInput.ts | Introduces a vetoable pre-dispose event and a dispose(force?) override to support session swap persistence. |
| src/vs/sessions/sessions.common.main.ts | Wires the new sessions browser view contribution into the Agents app entrypoint. |
| src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts | Sets Agents defaults for localhost link opening and disables browser chat tools. |
| src/vs/sessions/contrib/browserView/browser/sessionBrowserView.ts | Adds a sessions workbench contribution to track browser editors per session and veto disposal during swaps. |
| src/vs/sessions/contrib/browserView/browser/sessionBrowserView.contribution.ts | Registers the session browser view controller contribution. |
| src/vs/platform/browserView/electron-main/browserView.ts | Moves initial BrowserView bounds offscreen and adjusts child view insertion. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 3
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @jrualesMatched files:
|
pwang347
approved these changes
Apr 24, 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.