Fix text/uri-list transformation in tree view drag for remote environments#292818
Draft
Fix text/uri-list transformation in tree view drag for remote environments#292818
Conversation
…e environments Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix 'File does not exist' error when dragging files from search
Fix text/uri-list transformation in tree view drag for remote environments
Feb 4, 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.
Dragging files from tree views (e.g., references search panel) in remote environments (WSL/Docker) fails with "File does not exist" error. The
handleDragmethod inTreeViewDragAndDropControllerwas usingitem.asStringwhich contains the untransformed URI, ignoringitem.uriListDatawhich contains URIs already processed by the URI transformer during RPC.Changes
mainThreadTreeViews.ts: Fortext/uri-listmime type, reconstruct URI string fromuriListDatausingUriList.create()andURI.revive()instead of rawasStringmainThreadTreeViews.test.ts: Added test verifying transformed URIs are used over untransformed stringsTesting
Original prompt
This section details on the original issue you should resolve
<issue_title>After searching for a reference and dragging the file, a “File does not exist” error occurs.</issue_title>
<issue_description>
Type: Bug
Behaviour
If I search for a reference and then drag the file, I get a “File does not exist” error.
This issue is likely caused by mixed file path separators (‘/’ and ‘\’).
The file opens fine when opened directly.
There are no issues even with simple searches, not just references.
This occurs$$\color{red}not\ only\ in\ Python\ but\ also\ in\ Go,\ C,\ and\ even\ Markdown$$ .
(It works normally in VS Code on the host, not in WSL.)
Steps to reproduce:
Diagnostic data
None
Detail
VS Code version: Code 1.107
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2
User Settings
Installed Extensions
System Info
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
Comments on the Issue (you are @copilot in this section)
@jrieken @alexr00 I am using the extension tree API and I wonder if the `TreeDragAndDropController` sends dnd data with type `text...💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.