[api] Fix two filename case sensitivity issues - #64391
Merged
Andrew Branch (andrewbranch) merged 5 commits intoSep 22, 2026
Merged
Andrew Branch (andrewbranch) merged 5 commits into
Andrew Branch (andrewbranch) merged 5 commits into
Conversation
Copilot started reviewing on behalf of
Andrew Branch (andrewbranch)
September 22, 2026 16:43
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The casing and directory-inference changes are consistent and covered across server and client APIs.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes Windows drive-letter casing across the API boundary and moves directory inference to the case-aware server.
Changes:
- Preserves drive-letter casing when decoding file URIs.
- Derives omitted directory listings server-side deterministically.
- Updates sync, async, and Go regression tests.
| File | Description |
|---|---|
tsc/internal/lsp/lsproto/lsp.go |
Preserves URI drive-letter case. |
tsc/internal/ls/lsconv/converters_test.go |
Updates URI conversion expectations. |
tsc/internal/api/session_createprogram_test.go |
Tests snapshot drive-letter preservation. |
tsc/internal/api/requestfilesystem/requestfilesystem.go |
Deterministically derives directory structure. |
tsc/internal/api/requestfilesystem/requestfilesystem_test.go |
Tests host-aware casing behavior. |
packages/typescript/test/sync/api.test.ts |
Updates synchronous API expectations. |
packages/typescript/test/async/api.test.ts |
Updates asynchronous API expectations. |
packages/typescript/src/api/proto.generated.ts |
Documents server-side derivation. |
packages/typescript/src/api/path.ts |
Preserves casing during URI decoding. |
packages/typescript/src/api/fs.ts |
Removes client-side directory inference. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…er do it with its case sensitivity knowledge
Andrew Branch (andrewbranch)
force-pushed
the
api/case-sensitivity
branch
from
September 22, 2026 18:40
69518f8 to
c30c6fa
Compare
Andrew Branch (andrewbranch)
requested review from
Jake Bailey (jakebailey) and
Wesley Wigham (weswigham)
September 22, 2026 18:41
Jake Bailey (jakebailey)
approved these changes
Sep 22, 2026
… through lossy URI conversion
Member
Author
|
Your comment made me realize that there was still a path that went from file name to URI and back to file name. If either one of those conversions is intended to be lossy/case-normalizing, any API requests that can end up creating filenames on new source files shouldn't go through that. Fixed in the latest commit. |
Jake Bailey (jakebailey)
approved these changes
Sep 22, 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.
Preserve original Windows drive letter case across API boundary 4da8232
On case-insensitive file systems, creating a snapshot VFS would infer directories case-sensitively on the client, while the server rejects duplicates case-insensitively, such that if you passed
createFileSystem({ files: [["C:/Proj/main.ts"], [""], ["C:/proj/foo.ts"], [""]] }), this would be inferred as two distinct directoriesC:/ProjandC:/proj, but then be rejected by the server as duplicates.d02db3a fixed this on the server side by merging duplicates instead of erroring, but I didn't like how that blurred the difference between automatically inferred directories from case-inconsistent inputs and various real user-authored mistakes. I couldn't see a strong reason for the client to infer directories up front when the server already does, so the next commit removed the client-side inference in favor of just letting the server do it with its case-sensitivity knowledge.