editor: show session homes in breadcrumbs - #333404
Merged
Sandeep Somavarapu (sandy081) merged 1 commit intoAug 30, 2026
Merged
Conversation
Add URI home formatting so internal agent session paths render with stable provider labels instead of exposing session IDs. Register homes for Agent Host and Copilot CLI sessions, including resumed SDK artifact paths and pending Quick Chats.\n\nFixes #330410\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sandeep Somavarapu (sandy081)
enabled auto-merge (squash)
August 30, 2026 15:25
Copilot started reviewing on behalf of
Sandeep Somavarapu (sandy081)
August 30, 2026 15:25
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts — Remote Agent Host resources carry their original-URI metadata in the query, while getUriHome()… |
|
src/vs/workbench/services/label/common/labelService.ts — This branch also rewrites labels requested with noPrefix: true, although that option is used for… |
|
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts — The PR summary says SDK artifact homes are registered for remote sessions, but the remote provider… |
What changed in this PR
Adds friendly breadcrumb roots for internal agent-session files, replacing UUID-heavy paths with provider/session labels.
Changes:
- Adds resource-label home registration and formatting.
- Integrates homes with breadcrumbs and session providers.
- Adds shared scratch-path utilities and focused tests.
| File | Description |
|---|---|
src/vs/platform/agentHost/common/workspacelessScratchDir.ts |
Adds shared scratch URI helper. |
src/vs/platform/agentHost/node/copilot/copilotAgent.ts |
Uses shared scratch helper. |
src/vs/platform/agentHost/node/workspacelessScratchDir.ts |
Reuses common path logic. |
src/vs/platform/label/common/label.ts |
Extends label formatter contracts. |
src/vs/editor/standalone/browser/standaloneServices.ts |
Implements new label API. |
src/vs/workbench/services/label/common/labelService.ts |
Resolves and formats URI homes. |
src/vs/workbench/services/label/common/resourceLabelHomeStore.ts |
Manages dynamic home registrations. |
src/vs/workbench/services/label/test/browser/label.test.ts |
Tests home resolution and lifecycle. |
src/vs/workbench/services/label/test/common/mockLabelService.ts |
Supports homes in label tests. |
src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts |
Renders home-relative breadcrumbs. |
src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts |
Tests breadcrumb home behavior. |
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts |
Updates fixture label service. |
src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts |
Updates test label mock. |
src/vs/sessions/LAYOUT.md |
Documents session label homes. |
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Exposes known-session homes and draft changes. |
src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.ts |
Registers local scratch and artifact homes. |
src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts |
Tests local home registration. |
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts |
Registers extension-host session homes. |
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts |
Tests extension-host homes. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts |
Registers remote quick-chat homes. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts |
Updates remote provider test setup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| let uriPrefix: URI | null = uri; | ||
| while (uriPrefix && uriPrefix.path !== '/') { | ||
| if (info.folder && isEqual(info.folder.uri, uriPrefix)) { | ||
| if ((info.folder && isEqual(info.folder.uri, uriPrefix)) || (info.home && isEqual(info.home, uriPrefix))) { |
| } | ||
|
|
||
| getUriLabel(resource: URI, options: { relative?: boolean; noPrefix?: boolean; separator?: '/' | '\\'; appendWorkspaceSuffix?: boolean } = {}): string { | ||
| const homeFormatter = this.findHomeFormatter(resource); |
| this.onDidReportConnectProgress = config.onDidReportConnectProgress; | ||
| this.canConnectOnDemand = !!config.connectOnDemand; | ||
| const updateResourceLabelHomes = () => { | ||
| const homes = this.getResourceLabelHomes(); |
Benjamin Christopher Simmonds (benibenj)
approved these changes
Aug 30, 2026
Sandeep Somavarapu (sandy081)
deleted the
agents/fix-breadcrumbs-uuid-exposure-issue330410
branch
August 30, 2026 22:10
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.


Summary
Validation
npm run compilenpm run hygienesession-statereproductionFixes #330410