Skip to content

editor: show session homes in breadcrumbs - #333404

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
agents/fix-breadcrumbs-uuid-exposure-issue330410
Aug 30, 2026
Merged

editor: show session homes in breadcrumbs#333404
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
agents/fix-breadcrumbs-uuid-exposure-issue330410

Conversation

@sandy081

Copy link
Copy Markdown
Member

Summary

  • add URI home formatting for internal agent session paths
  • render breadcrumbs relative to stable provider/session labels instead of UUIDs
  • register Quick Chat scratch and SDK artifact homes across local, remote, and extension-host sessions

Validation

  • npm run compile
  • npm run hygiene
  • 382 focused unit tests
  • live Agents Window verification against the original session-state reproduction

Fixes #330410

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>
Copilot AI balanced review requested due to automatic review settings August 30, 2026 15:25
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.136.0 milestone Aug 30, 2026
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/editor/breadcrumbsModel.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: 1 High severity · 2 Medium severity

New issues introduced by this change (3)
Severity Finding
Medium severity src/​vs/​workbench/​browser/​parts/​editor/​breadcrumbsModel.ts — Remote Agent Host resources carry their original-URI metadata in the query, while getUriHome()
High severity src/​vs/​workbench/​services/​label/​common/​labelService.ts — This branch also rewrites labels requested with noPrefix: true, although that option is used for…
Medium severity 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();
@sandy081
Sandeep Somavarapu (sandy081) merged commit f291f3f into main Aug 30, 2026
55 of 56 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the agents/fix-breadcrumbs-uuid-exposure-issue330410 branch August 30, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breadcrumbs render UUID for session files

3 participants