Repository navigation
Fix DevTools value-source reporting for unset properties, live edits and XAML lines - #1160
Zach Teutsch (zateutsch) wants to merge 6 commits into
Conversation
- Unset runtime facade properties (Translation, Scale, RasterizationScale...) no longer read as Local. - A Local chain entry only points at the element's XAML line when that tag sets the property. - A value changed live in DevTools reads as 'DevTools' instead of the replaced XAML binding; clear and undo forget the live write. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: feacea66-381f-4e4e-b7bb-4f5cebe088d3
…x parse, XAML line, tooltip - A live edit is labelled DevTools only while the property still holds the value DevTools wrote; once the app writes its own value it reads as Local again. - Binding.restore/clear over the protocol forget the live edit. - An identity TransformMatrix in nested-brace or labelled form reads as unset. - A local value keeps its XAML line unless the tag was read and has no matching attribute (x:Name counts for Name). - The window tooltip for a live edit says it came from DevTools. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: feacea66-381f-4e4e-b7bb-4f5cebe088d3
There was a problem hiding this comment.
🟡 Changes recommended
Failed binding restores and later app writes can still produce incorrect value-source labels.
3 open issues
What changed in this PR
This PR addresses #1140 by improving how DevTools explains property values in the inspector and CLI.
Changes:
- Classifies runtime starting values as Default rather than Local.
- Labels live edits as DevTools and limits XAML source lines to tags that set the property.
- Adds regression tests and documents the live-edit value source.
| File | Description |
|---|---|
| src/winapp-devtools/test/read-tests.cpp | Tests origin labels and unset-value detection. |
| src/winapp-devtools/test/native-runtime-tests.cpp | Tests XAML locations and live-edit attribution. |
| src/winapp-devtools/test/bindingrow-tests.cpp | Tests recorded live-edit values. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.State.inc | Includes live edits in the Set view. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.PropsLayout.inc | Adds a live-edit source tooltip. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsWindow.PaneSinks.inc | Clears live-edit tracking after successful undo. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsTap.UiDispatch.inc | Records written values and clears tracking after property clears. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsTap.PropertyRead.inc | Adjusts value sources and XAML locations. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsTap.ElementCommands.inc | Adds tracking cleanup for binding operations. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsRead.h | Declares the live-edit label and unset-value helper. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsRead.cpp | Implements unset-value detection and label precedence. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsBindingRow.h | Declares value-aware live-edit tracking. |
| src/winapp-devtools/native/WinApp.DevTools.Native/DevToolsBindingRow.cpp | Stores and compares live-edit snapshots. |
| docs/guides/devtools-advanced.md | Documents the DevTools value source. |
Review effort: Balanced
Build Metrics ReportValidation passed. All required build and validation jobs succeeded. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 10669 passed, 43 skipped out of 10712 tests in 1922.2s (+5 tests, -662.1s vs. baseline) Test Coverage✅ 87.4% line coverage, 81.5% branch coverage · ✅ no change vs. baseline CLI Startup Time72ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 1160Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 1160Run Updated 2026-10-23 00:15:54 UTC · commit |
- An app write ends a live edit for good, so writing the edited value back later doesn't credit DevTools again. - The edit records the value the property read shows, so values without chain text (CornerRadius, enums) detect an app overwrite. - A binding restore or clear forgets the edit only after it reports restored or cleared. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: feacea66-381f-4e4e-b7bb-4f5cebe088d3
PR Review — zateutsch-devtools-value-source-validation vs mainDecisionmerge — No blocking problems found. The native build passes, and both the unit tests and the dispatcher tests pass on a real ARM64 run. The two items below are optional. Must fixNone. You can merge this as it is. Non-blockingProperties set in the element's body lose their XAML line
The docs list only two of the ways the
|
Jaylyn Barbee (Jaylyn-Barbee)
left a comment
There was a problem hiding this comment.
LGTM pending your review of the option items
…lue-source-validation
A Local value set by a <Type.Property> child or as content keeps its file and line again. The position is dropped only when the opening tag self-closes or the body sets other properties. Docs list every way the DevTools label goes away. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: feacea66-381f-4e4e-b7bb-4f5cebe088d3
|
Fixed both in d1e9e06: values set by a |

What and why
DevTools shows where each property value came from: XAML, default, style, and so on. It got this wrong in three ways, so you couldn't trust it to show what the developer actually set.
[Local]. Windows App SDK writes a starting value for CenterPoint, RasterizationScale, Rotation, RotationAxis, Scale, TransformMatrix and Translation on every element. DevTools listed them as "set on this element". Now a starting value that matches the unset value reads as Default, and the Set view no longer lists it.x:Namecounts forName). A value set by a live edit is labelled DevTools, and the window tooltip says so. If the app later writes its own value, the property reads asLocalagain.get-propertydescribed a binding that a live edit had already replaced. Now it describes the current value. Restoring the binding from the inspector or over the protocol clears the live-edit label.Fixes #1140
Before / after
Not captured from a running app. These use the repro steps from the issue; the "after" lines are what the new tests check, not observed output.
Before
After (expected)
Not tested / risks
<TextBlock.Text>) or as element content lose their XAML line when DevTools can read the XAML file. Keeping them would mean parsing the element body.Checklist
plugins/winapp/skills/updated if user-facing behavior changedNotes for reviewers
DevTools records the value each live edit writes. The
DevToolslabel applies only while the property still holds that value, so a later write by the app isn't credited to DevTools. A starting-value property counts as unset only when it equals its unset value, such as an identity matrix. Any other value still reads as Local.