Leave browsers-pill websites out of the artifacts pill - #332032
Merged
Benjamin Christopher Simmonds (benibenj) merged 2 commits intoAug 23, 2026
Merged
Leave browsers-pill websites out of the artifacts pill#332032Benjamin Christopher Simmonds (benibenj) merged 2 commits into
Benjamin Christopher Simmonds (benibenj) merged 2 commits into
Conversation
A page the agent opened in a browser showed up twice: once as a browser entry and once as a website artifact. The browsers control now publishes the URLs it lists (empty while the user hides the pill), and the artifact sections drop website artifacts pointing at one of those pages, matched on a normalized key so origin casing and a trailing slash still match. Website artifacts also open with contributed openers now, the same way the link opens from the response markdown it came from, so a localhost artifact lands in the integrated browser instead of the system one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge (squash)
August 21, 2026 20:31
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
August 21, 2026 20:32
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents browser-opened pages from appearing twice in the Agents Window toolbar.
Changes:
- Publishes visible browser URLs and filters matching website artifacts.
- Aligns artifact link opening with markdown links.
- Adds browser visibility and URL-normalization tests.
Show a summary per file
| File | Description |
|---|---|
sessionBrowsersControl.test.ts |
Tests URL publication states. |
sessionArtifacts.test.ts |
Tests website filtering and normalization. |
sessionChatInputToolbar.ts |
Connects browser URLs to artifacts. |
sessionBrowsersControl.ts |
Exposes visible browser URLs reactively. |
sessionArtifacts.ts |
Filters duplicates and updates link opening. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Balanced
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 21, 2026
Mohammad javad Dianat (dianatofficial)
left a comment
There was a problem hiding this comment.
LGTM! Code changes are clean and well-structured.
Benjamin Christopher Simmonds (benibenj)
merged commit Aug 23, 2026
ab4bd3e
into
main
29 of 51 checks passed
Benjamin Christopher Simmonds (benibenj)
deleted the
agents/artifacts-pill-browser-dedupe
branch
August 23, 2026 06:42
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.
A page the agent opened in a browser was offered twice in the chat input toolbar: once as a browser entry, and once as a website artifact.
Changes
SessionBrowsersControlfactors out the owned-browser collection and publishes a newurlsobservable — the URLs the pill currently lists, empty while the user has the pill hidden (so hiding the pill brings the artifacts back). A set-contentequalsFnkeeps the frequent title/favicon/loading-state signals from churning downstream.buildSessionArtifactSectionstakes those URLs and dropsWebsiteartifacts pointing at one of them. Matching goes through a normalized key (origin casing, trailing slash), sohttps://Example.com/docs/matches a browser onhttps://example.com/docs. Only websites are filtered — a pull request, issue or commit link stays even if a browser shows it.SessionChatInputToolbarnow creates the browsers control (and the pill-visibility state it needs) beforeSessionArtifacts, which receivesthis._browsers.urls.allowContributedOpeners/fromUserGesture, matchingopenLinkFromMarkdown. A link behaves the same whether it is clicked in the response text or in the artifacts pill, so alocalhostartifact lands in the integrated browser instead of the system one (workbench.browser.openLocalhostLinksdefaults to true in the agents window).Validation
sessionArtifacts.test.tsand a visible/hidden/disabled URL test tosessionBrowsersControl.test.ts.tsc --noEmit -p srcis clean.