Repository navigation
Add metadata-backed XAML typo Quick Fixes - #376
Conversation
VSIX Build
Updated 2026-11-12 21:03:10 UTC · commit |
PR review (automated, scope: 10 files, +317/-12)No critical or high findings. Spelling-fix path, Medium
Low
Docs: README Code actions row updated. Packaging/security: no impact found (no new inputs, no manifest/pipeline changes). |
Add direct Quick Fix suggestions for misspelled XAML properties and invalid values, including combined replacements such as FrozenEdgeCount=1 to FrozenEdge=Leading. Extend coverage with focused unit tests and smoke scenarios, and keep README IntelliSense docs concise. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A value containing < means the closing quote belongs to later markup, so only the name-span rename is offered. Adds a regression test for a missing quote before another element. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Owner-qualified assignments to the same property now block duplicate replacements, while attached properties from other owners no longer suppress valid renames. Invalid-value spelling fixes re-check the current member so a stale diagnostic cannot rewrite a renamed property. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Detect a missing closing quote by the character after the value, so swallowed attributes are never rewritten and the name-only rename survives an unterminated value. Offer one rename per tied property name, named choices for unnamed numbers on non-flags enums, and unpreferred True/False for invalid Booleans. Share one attribute value-type resolver between the validator and quick fixes, which also gives attached properties a default-literal fix, and trim padded enum values before suggesting. Restore the full code-actions list in the README. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share one swallowed-value check across rename and invalid-value fixes, and treat a value ending in = as swallowed. Star the closest property name whenever it is strictly closer than the next match, and stop treating 2-letter swaps as one typo. Invalid-value guesses (default numbers, Booleans, small enum choices) are no longer preferred, and misspelled Boolean names now get the plain rename. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the per-character swallowed-quote checks with one positive rule: a value is only rewritten when it is closed, single-line, and free of quote or markup characters. Decide the star once from the unfiltered ranking, and keep a close name as a plain rename unless exactly one value is certain. Restore main's default-literal fix for correctly named properties, keeping only the shared type resolver and the value-shape guard. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse main's spelling path for names and values instead of combined name+value edits. Unknown control and property names fall back to a single related name (unique partial-name completion or one whole word added or removed), offered as an unpreferred fix. Drop the stale-diagnostic checks and guarded edits, skip already-set properties, and suggest True/False for Boolean values. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Hiding an already-set property promoted the next match to the preferred fix, so Auto Fix could silently rename MaxHieght to MinHeight. Suggesting the closest name lets the duplicate-property diagnostic surface the conflict instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Offer the one candidate sharing the most whole PascalCase words with an unknown name (at least one, no ties) instead of requiring exactly one word added or removed. This maps DataGrid-style names such as FrozenColumnCount to FrozenEdge on TableView columns while staying unpreferred. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Instead of offering nothing when several names tie, list up to three related names closest first: completions of a partially typed name, else the names sharing the most whole words, preferring fewer unrelated words. None are preferred. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Unknown control names keep main's typo and import fixes, since matching words across every type in a namespace surfaced unrelated types. Words under three letters such as Is no longer count as shared, so IsDefault-style names stop matching every IsX property. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
d2620f5 to
70535d3
Compare
PR review #2 (head 70535d3, independent model: GPT-6.1 Sol)No critical or high findings. Medium
No other significant security, performance, or docs findings. Builds and tests were not run in this review. |
An unterminated value such as Visibility="Visbile/> pulls the tag terminator into the value, so a spelling or default-value fix would delete it. Offer value replacements only for closed, single-line literals without quote or markup characters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Thanks Jaylyn Barbee (@Jaylyn-Barbee)! Responses to both reviews: Swallowed markup (review #2, medium): fixed in d7e9b1d. Reproduced: Default-value fix skipped for enums (review #1, medium): no behavior change for enums. Low items, not changing:
|
PR review #3 (head d7e9b1d, independent model: Claude Opus 5.5)No critical, high, or medium findings. The latest commit fully fixes the earlier swallowed-markup finding: unterminated values (run to EOF) are rejected by the closing-quote check, and values closed by a later quote are rejected via Low
Builds and tests were not run in this review. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jaylyn Barbee (Jaylyn-Barbee)
left a comment
There was a problem hiding this comment.
LGTM
Description
Improves the non-AI XAML Quick Fixes for misspelled property names and values. Name and value fixes stay separate, reusing the existing spelling-fix path:
Visib->Visibility), or else the names sharing the most whole words with it (FrozenColumnCount->FrozenEdge,BackgroundColor->Background). Related names are never the preferred (Auto Fix) action.Txet->Text).True/False(Ture->True) instead of always replacing withFalse.Usage Example
Related Issue
N/A
Type of Change
Checklist
.\scripts\build-vsce.ps1locallyScreenshots / Demo
N/A
Additional Notes
Validation run on the current head:
dotnet test server\test\WinUiXaml.LanguageServer.Tests(full language-server suite): passed (1036/1036) after rebasing onto main.npm run test:xaml-smoke: passed, including real-SDK casesGird,Txet,Ture,Strech,MaxHieght(preferred typo fixes),VisibilityCount,Visib,ForegroundColor, andBackgroundColor(unpreferred related names)..\scripts\build-vsce.ps1 -Package: passed (72.5 MB VSIX with the Native AOT server for win-x64 and win-arm64).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.