Repository navigation
Normalize client URIs once at the server boundary - #141
Merged
Merged
Conversation
URIs the server produces with @hyperjump/uri are always normalized, but URIs from the client arrived raw. TextDocuments stored documents under the raw URI while JsonDocument.uri was normalized, so looking up a document by an internal URI failed whenever the client encoded it differently, e.g. VS Code on Windows sends "file:///c%3A/...". Server now normalizes the text document URI and watched file URIs in the params of every handler it proxies, and the workspace folders in the initialize params. Code past the boundary can compare URIs without normalizing them again. TestClient now encodes every URI it sends the way VS Code does, and the test workspace folder contains an "@" so the encoded and normalized forms always differ. TestClient keeps its own URIs in the form the server sees them, which includes VS Code's lowercase drive letter on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdesrosiers
force-pushed
the
normalize-bug
branch
from
October 7, 2026 20:40
d69a41f to
845891e
Compare
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.
We keep running into this windows URI normalization bug and it's coming up again in another task I'm working on. So, I'm trying this more aggressive approach to handle it.
Servernow normalizes the text document URI and watched file URIs in the params of every handler it proxies, and the workspace folders in the initialize params. Code past the boundary can compare URIs without normalizing them again.TestClientnow encodes every URI it sends the way VS Code does in windows, and the test workspace folder contains an "@" so the encoded and normalized forms always differ.