Repository navigation
Fix XAML IntelliSense bugs and safely enable Restricted Mode - #370
Merged
Jaylyn Barbee (Jaylyn-Barbee) merged 3 commits intoNov 9, 2026
Merged
Jaylyn Barbee (Jaylyn-Barbee) merged 3 commits into
Jaylyn Barbee (Jaylyn-Barbee) merged 3 commits into
Conversation
Correct the manifest dependency documentation URL, align x:Bind member resolution with bindability and argument-count checks, emit UTF-8 logs, and safely enable Restricted Mode activation. Cover existing named-element navigation with live regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Definition falls back to unfiltered member lookup so F12 still reaches members that hover hides. Blocked commands in Restricted Mode no longer show a toast because VS Code already prompts for trust. Smoke and integration prose probes use a valid event binding. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CLI commands are hidden from the Command Palette and the manifest editor hides Regenerate Assets until the workspace is trusted, so nothing appears to silently fail. Debugging keeps VS Code's own trust prompt, which runs before the extension is called. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
VSIX Build
Updated 2026-11-06 22:25:10 UTC · commit |
There was a problem hiding this comment.
🔵 Needs a closer look
Restricted Mode changes a code-execution trust boundary, requiring independent runtime validation of the packaged current head to confirm activation, CLI commands, debugging, and asset regeneration cannot launch processes before workspace trust is granted.
No open issues 🎉
What changed in this PR
This PR fixes XAML IntelliSense and manifest-editor bugs while enabling limited Restricted Mode support. Safe editing features remain available, while CLI execution, debugging, and the XAML server require workspace trust.
Changes:
- Aligns x:Bind hover with accessibility and argument-count checks while preserving navigation to rejected members.
- Adds trust-gated commands and asset regeneration, with UI updates when trust is granted.
- Corrects the manifest help link, enables UTF-8 server logging, and adds regression coverage, including the existing named-element navigation fix.
| File | Description |
|---|---|
| test/xaml-integration/xbind-name-definition.test.js | Tests named-element navigation across x:Bind forms. |
| test/xaml-integration/redteam-method-hover-signatures.test.js | Tests invalid-call hover suppression and preserved F12 navigation. |
| test/xaml-integration/features-completion-and-navigation.test.js | Uses a method reference for metadata-hover coverage. |
| src/workspace-trust.ts | Adds shared trust checks and command registration. |
| src/test/workspace-trust.test.ts | Tests trust gates, activation, and command visibility. |
| src/test/e2e/webview-state.spec.ts | Tests asset-button visibility as trust changes. |
| src/test/e2e/dependencies-tab.spec.ts | Verifies the corrected dependency help URL. |
| src/new-command.ts | Requires trust for project creation. |
| src/manifest-editor/webview-styles.ts | Hides asset regeneration in untrusted workspaces. |
| src/manifest-editor/webview-script.ts | Handles workspace-trust updates. |
| src/manifest-editor/webview-content.ts | Corrects the main-package dependency help link. |
| src/manifest-editor/manifest-types.ts | Defines the workspace-trust message. |
| src/manifest-editor/manifest-editor-provider.ts | Publishes trust state and guards asset regeneration. |
| src/extension.ts | Gates CLI commands, debugging, and launch setup on trust. |
| server/test/WinUiXaml.LanguageServer.Tests/ServerShutdownTests.cs | Tests Unicode paths in redirected and file logs. |
| server/test/WinUiXaml.LanguageServer.Tests/BindingSymbolTests.cs | Tests binding-member filtering and definition fallback. |
| server/test/lsp-smoke/smoke-completion-scenarios.mjs | Updates the metadata-hover smoke scenario. |
| server/src/WinUiXaml.LanguageServer/XamlValidator.BindFunctions.cs | Exposes argument-count validation for reuse. |
| server/src/WinUiXaml.LanguageServer/XamlLanguageServer.Resolution.cs | Passes definition intent through symbol resolution. |
| server/src/WinUiXaml.LanguageServer/XamlLanguageServer.DocumentFeatures.cs | Enables permissive resolution for Go to Definition. |
| server/src/WinUiXaml.LanguageServer/XamlLanguageServer.CompletionAndResources.cs | Applies binding rules and overload-count checks to hover. |
| server/src/WinUiXaml.LanguageServer/Program.cs | Sets UTF-8 output before logging initializes. |
| README.md | Documents Restricted Mode behavior. |
| package.json | Declares limited trust support, hides CLI commands, and registers tests. |
Review effort: Balanced
Jaylyn Barbee (Jaylyn-Barbee)
approved these changes
Nov 9, 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.
Description
Fix the manifest dependency help URL, misleading x:Bind member hovers, non-ASCII server logs, and extension activation in Restricted Mode.
uap3:MainPackageDependencyto its published Microsoft Learn reference.The named-element navigation fix for #365 was already on
mainin9dcfccaa. This PR adds live regression coverage for positional paths,Path=, and function arguments.Usage Example
F12 on
Headingopens itsx:Namedeclaration, not generated C#. HoveringOnGo_Click()(zero arguments for a two-parameter handler) shows no signature; F12 on it still opens the handler.In Restricted Mode,
.xamlstays in XAML language mode, the Command Palette lists only Open Manifest Editor and the XAML language-server commands, and F5 shows VS Code's "Do you trust the authors" dialog. After trusting the folder, the CLI commands and Regenerate Assets appear without a reload. The main-package dependency Learn more link opens the schema reference.Related Issue
Fixes #369
Fixes #368
Fixes #367
Fixes #364
Related to #365 (already fixed on
main, closed)Type of Change
Checklist
.\scripts\build-vsce.ps1locallypackage.jsoncontribution points / command/debugger/custom-editor docs updated (if extension surface changed)Screenshots / Demo
No layout changes. The behavior above is covered by regression tests and live VS Code checks.
Additional Notes
Local validation on the current head:
npm run test:unit: passed, 1,563 tests, including a check that every trust-gated command is hidden while untrusted.npx playwright test --project=webview: passed, 20 tests, including Regenerate Assets hiding and reappearing with trust.From the previous head:
npm run compile-tsc: passed.npm run lint: 0 errors, 10 existing warnings.dotnet test server\test\WinUiXaml.LanguageServer.Tests\WinUiXaml.LanguageServer.Tests.csproj -c Debug: passed, 995 tests.npm run test:xaml-smoke: passed. This stdio smoke test failed in CI on the first head.npm run test:xaml-bundledagainst the published Native AOT server: passed.npx vscode-testwithxbind-name-definition,redteam-method-hover-signatures,features-completion-and-navigationandfeatures-document-and-editor: 257 passed against the Debug server, and the same 257 against the Native AOT server..csprojhas an MSBuild target that runscalc.exe, running Restart XAML Server, Restore, Pack, Get WinApp Path and F5 started nowinapp, MSBuild, language server orcalcprocess, and the target never ran.From the first head:
.\scripts\build-vsce.ps1 -Packagepassed with VSIX validation of both architectures, and the manifest-editor Learn more E2E test passed.These are local results, not a CI pass. The full E2E and full XAML integration suites were not run locally.
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.