Sessions window: GH file system provider fixes#298844
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Sessions window’s GitHub-backed virtual filesystem integration to use the github-remote-file URI format (including a ref), improve tree fetching behavior, and present more user-friendly repo/file paths in the UI.
Changes:
- Switch cloud session repository URIs from
vscode-vfs://github/...togithub-remote-file://github/{owner}/{repo}/{ref}. - Add GitHub tree fetch request de-duplication and negative caching to reduce repeated 404 fetches.
- Improve repo/title/path display for GitHub-backed trees and changes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/workspace/browser/workspaceFolderManagement.ts | Sets workspace folder naming for cloud sessions using a GitHub URI-derived display name. |
| src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts | Constructs cloud repository URIs using the github-remote-file scheme and adds a default ref. |
| src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.ts | Adds display-name helper, request de-dupe, negative caching, and adjusts auth session lookup. |
| src/vs/sessions/contrib/fileTreeView/browser/fileTreeView.ts | Uses metadata branch to build repo root URIs and improves tree title derivation. |
| src/vs/sessions/contrib/chat/browser/repoPicker.ts | Updates selected repo URIs to use github-remote-file with HEAD. |
| src/vs/sessions/contrib/changesView/browser/changesView.ts | Strips GitHub URI internal prefix for tree grouping so paths appear repo-relative. |
Comments suppressed due to low confidence (3)
src/vs/sessions/contrib/fileTreeView/browser/fileTreeView.ts:355
- When building github-remote-file URIs,
refshould be encoded as a single path segment. Branch names commonly contain/(e.g.feature/foo), which would otherwise shift segments and breakparseUri()(ref becomesfeature, path starts withfoo/...). Encode the ref segment when constructing these URIs.
return URI.from({
scheme: GITHUB_REMOTE_FILE_SCHEME,
authority: 'github',
path: `/${repository}/${ref}`,
});
src/vs/sessions/contrib/fileTreeView/browser/fileTreeView.ts:364
- When building github-remote-file URIs,
refshould be encoded as a single path segment. Branch names commonly contain/(e.g.feature/foo), which would otherwise shift segments and breakparseUri()(ref becomesfeature, path starts withfoo/...). Encode the ref segment when constructing these URIs.
return URI.from({
scheme: GITHUB_REMOTE_FILE_SCHEME,
authority: 'github',
path: `/${parsed.owner}/${parsed.repo}/${ref}`,
});
src/vs/sessions/contrib/fileTreeView/browser/fileTreeView.ts:341
- When building github-remote-file URIs,
refshould be encoded as a single path segment. Branch names commonly contain/(e.g.feature/foo), which would otherwise shift segments and breakparseUri()(ref becomesfeature, path starts withfoo/...). Encode the ref segment when constructing these URIs.
return URI.from({
scheme: GITHUB_REMOTE_FILE_SCHEME,
authority: 'github',
path: `/${parsed.owner}/${parsed.repo}/${ref}`,
});
src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/workspace/browser/workspaceFolderManagement.ts
Outdated
Show resolved
Hide resolved
src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.ts
Outdated
Show resolved
Hide resolved
joshspicer
approved these changes
Mar 3, 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.
No description provided.