Repository navigation
Fix XAML IntelliSense bug-bash issues (#356, #359, #360, #363, #366) - #377
Open
Chiara Mooney (chiaramooney) wants to merge 2 commits into
Open
Chiara Mooney (chiaramooney) wants to merge 2 commits into
Chiara Mooney (chiaramooney) wants to merge 2 commits into
Conversation
- Report a server that stopped restarting with a Restart action instead of a spinning status (#363) - Bound deep element nesting and always answer requests whose results fail to serialize (#366) - Treat CR as a line break and replace lone surrogates in synced text (#360) - Keep WinApp formatting on unless C# Dev Kit provides a XAML formatter (#359) - Report XML well-formedness errors in XAML documents (#356) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Chiara Mooney (chiaramooney)
marked this pull request as ready for review
November 13, 2026 17:34
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
VSIX Build
Updated 2026-11-13 19:05:31 UTC · commit |
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.
Description
Fixes five XAML IntelliSense bugs from the bug bash.
Server stops restarting ([Bug]: Status bar spins forever after the XAML server stops restarting #363): after the server crashes 5 times in 3 minutes, the status bar now shows WinApp: XAML Language Server Stopped instead of spinning forever. Clicking it restarts the server. The warning offers Restart Language Server and Show Output, and opening another XAML file no longer silently restarts a server the client gave up on.
Deep nesting ([Bug]: Deeply nested XAML hangs Outline and produces bogus diagnostics #366): a page with 500 nested elements now gets an outline promptly and no bogus "no matching end tag" diagnostics. The root cause was the outline response exceeding
Utf8JsonWriter's depth limit of 1000. The exception was thrown outside the handler's try block, so the request was never answered. Changes:Line endings and surrogates ([Bug]: XAML document sync breaks on CR-only line endings and unpaired surrogates #360):
\r,\nand\r\nare all line breaks for positions, formatting, namespace insertion and generated event handlers. A lone UTF-16 surrogate indidOpen/didChangebecomes U+FFFD, so the document still updates and the character is reported, instead of the notification failing with aJsonException.Formatting with only the C# extension ([Bug]: XAML formatting does nothing when only the C# extension is installed #359):
winapp.xaml.formatting.provider = autonow defers only when C# Dev Kit is installed anddotnet.enableXamlToolsis on, since the C# extension formats XAML only with Dev Kit. Installing or removing Dev Kit restarts the server so the choice takes effect.XML syntax errors ([Bug]: XML syntax errors are not reported in XAML files #356): new diagnostics XAML0011 to XAML0019 cover:
&, bad entities and invalid character references.<in attribute values.< Button/>and</ Button>.Markup values recognize every XML spelling of a quote (literal,
'/", decimal or hex), so valid escaped values aren't flagged.Usage Example
Each line shows the input, then the result.
Related Issue
Fixes #356
Fixes #359
Fixes #360
Fixes #363
Fixes #366
Type of Change
Checklist
package.jsoncontribution points / command/debugger/custom-editor docs updated (if extension surface changed)Screenshots / Demo
No screenshots captured. The visible changes are the stopped status-bar item and warning, which the VS Code integration test exercises (below). All other changes are diagnostics and server behavior, shown in the example above.
Additional Notes
Validation (local, Windows ARM64):
dotnet test server/test/WinUiXaml.Xaml.Tests: passed, 110 tests. Includes well-formedness cases and depth guards that parse at 512 and 5000 levels on a 1 MB thread.dotnet test server/test/WinUiXaml.LanguageServer.Tests: passed, 1030 tests. Includes CR-only positions, surrogate replacement, deep outline and selection-range serialization throughJsonRpcConnection, and an error reply for unserializable results.node server/test/lsp-smoke/smoke.mjs: passed.npm run compile-tsc: passed.npm run lint: no errors; the 10 warnings are in files this PR doesn't touch.npx tsx --test: 68 passed, covering configuration, degraded notification, server stop handling, project context status and lifecycle. Fullnpm run test:unit: 5 manifest-validator tests fail locally only becauseschemas/isn't synced on this machine; this PR doesn't touch them.npx vscode-testwithtest/xaml-integration/client.test.js: 11 passed. One new test kills the real server 5 times, then checks that it stays stopped, that opening a XAML document doesn't restart it, and that Restart Language Server recovers it.npx vscode-testwith the false-positive sweep, nested markup, styles/templates, parser edges, formatting, outline, code actions and the newwell-formedness-and-depth.test.js: 228 passed, no new false positives.Not validated: I didn't build or install the packaged VSIX with the release AOT server, because this machine's package feed can't restore the AOT runtime packs. CI's bundled-server step covers that.
Known limits:
AI Description
This section is auto-generated by AI when the PR is opened or updated. To opt out, delete this entire section including the marker comments.