fix: support library downloads with virtual fs uris#1910
Draft
smorrisj wants to merge 6 commits into
Draft
Conversation
Signed-off-by: Joe Morris <Joe.Morris@sas.com>
Signed-off-by: Joe Morris <Joe.Morris@sas.com>
Signed-off-by: Joe Morris <Joe.Morris@sas.com>
smorrisj
force-pushed
the
bug/web-table-dl
branch
from
June 17, 2026 12:50
164348d to
0ac8037
Compare
Signed-off-by: Joe Morris <Joe.Morris@sas.com>
scottdover
approved these changes
Jul 1, 2026
scottdover
left a comment
Contributor
There was a problem hiding this comment.
I don't understand all of browserDownload, but it looks okay to me. And it looks like we either use browser download or what we had before, so I'm good w/ it :)
scottdover
reviewed
Jul 1, 2026
| const DOWNLOAD_TOKEN_PARAM = "token"; | ||
| const DEFAULT_DOWNLOAD_FILENAME = "table.csv"; | ||
|
|
||
| export function isValidDownloadToken( |
Contributor
There was a problem hiding this comment.
I don't love that we're only exposing these functions so that we can test them. I'd prefer just running all tests through what's available in the public interface, but I'm guessing it's likely easier this way and requires less setup
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:
Library downloads failed in virtual file systems (e.g., vscode-local:// scheme from code-server's "Show Local" folder) fail because the code only supported local file system paths. Additionally, large table downloads could cause memory exhaustion due to missing backpressure handling in the streaming logic.
Add browser download support for non-file schemes, and fix the underlying stream backpressure issue to prevent memory problems on large libraries.
[index.ts]
[LibraryModel.ts]
forEachwith for...of loop to enable async/await backpressure handlingwritereturns false to prevent memory exhaustion on large tablesTesting:
See added unit tests. Additionally built a vsce package and tested in analytics pro and workbench.
TODOS