Agents web: hide harness picker and host suffix in web when single harness#316144
Merged
Conversation
In vscode.dev/agents the workbench is already scoped to a single agent host via the host filter, so: 1. The session-type picker in the new chat view is hidden when there is only one harness available (nothing to pick). The existing CSS rule on `.session-workspace-picker-with-label` collapses the dangling "with" connector automatically via `:has()`. 2. The `[Host]` suffix is dropped from session-type labels, so they read e.g. "Copilot CLI" instead of "Copilot CLI [My Host]". Both behaviors are gated on `isWeb` / `isWebPlatform`; desktop is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces UI noise in the Agents (sessions) web workbench by (a) hiding the session-type (harness) picker when there’s nothing to choose and (b) removing the redundant remote host suffix from session-type labels in web, while preserving desktop behavior.
Changes:
- Hide the session-type picker trigger on web when the connected host advertises 0–1 session types.
- In web, format remote session-type labels without the
[...]host suffix (e.g. “Copilot CLI” instead of “Copilot CLI [Host]”).
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Omits host suffix in session-type labels on web via isWebPlatform gating. |
| src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts | Hides the session-type picker trigger on web when there’s only one (or zero) available type. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Browser tests run with isWebPlatform === true by default, so the existing assertions for 'Copilot [My Host]' need to drop the suffix. Add an explicit desktop-branch test that overrides isWebPlatform to preserve coverage for the suffixed label. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The browser test runner runs in electron renderer where isWeb is false, so the existing 'Copilot [My Host]' assertions were correct. Restore them and add a separate test that overrides isWebPlatform: true to cover the web no-suffix branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests run in both electron renderer (isWeb=false) and playwright browser (isWeb=true), so assertions that depend on the platform branch must override isWebPlatform explicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Screenshot ChangesBase: Changed (24) |
DonJayamanne
approved these changes
May 13, 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.
What
In the agents workbench (vscode.dev/agents) the new-chat empty state currently shows:
This is redundant because:
copilotcli), the harness picker has nothing to pick. Surfacing it just invites a click that opens an empty popover.This PR hides both, scoped to web only. Desktop behavior is unchanged.
How
Two small changes:
SessionTypePicker._updateTriggerLabel— also adds the.hiddenclass to the trigger whenisWeb && allProviderSessionTypes.length <= 1. The existing CSS rule on.session-workspace-picker-with-label:collapses the dangling "with" connector automatically — no JS coordination required.
RemoteAgentHostSessionsProvider._formatSessionTypeLabel— returns the bare agent label in web (isWebPlatform), instead of`${agentLabel} [${this.label}]`. So labels read "Copilot CLI" instead of "Copilot CLI [My Host]".Result
Notes
[My Host]suffix; they run in node soisWebisfalseand they continue to pass.:has()rule, so no new selectors or layout work was needed.