Repository navigation
fix: Stabilize WinUI runtime tests on master - #26205
Conversation
The window rect is already in physical pixels, so scaling it again sent injected moves off target on displays above 100%. See #25012. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw
A framework-dependent MSIX binds to the newest runtime on the agent, so parity tests ran against 2.6.4 rather than the referenced 2.4.0. Refs #26204. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw
WinUI coalesces injected moves and the first update over an element only raises PointerEntered, so a single burst may never raise PointerMoved. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw
|
Claude finished @MartinZikmund's task in 15s —— View job Review of PR #26205Verdict: ship. I found no blocking issues, so I posted no inline comments. Issues by severity: 0 blocking, 0 major, 0 minor. I read the diff and the surrounding test code. I did not build or run anything, so this is a code review only. The runtime validation in the PR description is the author's. What I checked
Cross-cutting notes
|
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking approval of the runtime-test stabilization changes.
No open issues 🎉
What changed in this PR
Stabilizes the native WinUI runtime-test lane for #26204 by preventing Windows App Runtime version drift and making mouse-event checks deterministic. The SDK’s framework-dependent packaging default from #26106 remains unchanged.
Changes:
- Makes SamplesApp’s Windows target self-contained so tests use the referenced Windows App SDK.
- Waits for
PointerEnteredbefore injecting the move expected to raisePointerMoved. - Corrects mouse-coordinate scaling on high-DPI displays.
| File | Description |
|---|---|
src/Uno.UI.RuntimeTests/Windows/UI/Input/Preview/Injection/Given_InputInjector.cs |
Sequences injected moves using bounded pointer-event waits. |
src/Uno.UI.Extras/DevTools/Input/Mouse.cs |
Scales pointer offsets without rescaling the physical window origin. |
src/SamplesApp/SamplesApp/SamplesApp.csproj |
Bundles the referenced Windows App SDK for the WinUI test host. |
Review effort: Balanced
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 244533 found UI Test snapshots differences: Details
|
WinUI applies ChangeView zoom asynchronously, so reading ZoomFactor after WaitForIdle can still see the old value. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw
Linux snapshot runs began segfaulting on exit once #25995 added this diagnostic sample: 24 of 44 runs since, 0 of 64 before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw
|
Claude finished @MartinZikmund's task in 13s —— View job Review of PR #26205Verdict: ship. I posted no inline comments. Issues by severity: 0 blocking, 0 major, 1 minor. This is a code review only. I did not build or run anything, so the runtime validation in the description is the author's. Checked
Cross-cutting notes
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 244534 found UI Test snapshots differences: Details
|
GitHub Issue: closes #26204
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Three tests fail on the WinUI Runtime Tests leg. They have two unrelated causes.
RTF stream tests: CI stopped testing the SDK we reference. They fail on every run since #26106. SamplesApp's MSIX became framework-dependent with
MinVersion="2.4.0.0", so Windows binds it to the newest runtime on the machine. On the agent that's 2.6.4, not the referenced 2.4.0. ItsWinUIEdit.dllis a different build, and the trailing NUL of RTF output is inverted:Riched20 12.6.0005)...\r\n\0...\r\n...\r\n...\r\n\0The tests are right for the version we reference, so they stay as they are. SamplesApp now sets
WindowsAppSDKSelfContainedtotrueon the WinAppSDK target, so WinUI runs on 2.4.0 again and can't drift when the agent image changes.When_MouseMove_PointerEventsAreRaised: test bug. Flaky before #26106 too, failing 5 of the 29 full WinUI runs I sampled. WinUI delivers injected moves asynchronously and coalesces them: ten injected moves arrived as one update. The first update over an element raises onlyPointerEntered, so if just one lands on the border,PointerMovednever comes, however long the test waits. It now moves in, waits forPointerEntered, then moves again and waits forPointerMoved.Mousehelper. The WinAppSDK path computed(rect.Left + x) * scale, scaling a window offset that's already physical. At 250% the move landed about 66 DIPs past its target, so this test could never be validated on a scaled display. No effect at 100%, where CI runs.Finger.Athas the same bug and is left for #25012.Given_ScrollViewer_Zoom: test bug.When_ChangeView_With_ZoomFactorandWhen_Zoom_Respects_MinZoomFactorflake on WinUI, because the zoom is applied asynchronously andWaitForIdlecan still read the old factor. The tests next to them are already excluded on WinUI for this reason. They now poll for the expected factor, andWhen_Zoom_Respects_MaxZoomFactor, which has the same pattern, does too.Linux snapshot segfault:
IdleFrameProbeskipped in snapshots. The snapshot run started crashing on exit (code 139) once #25995 merged. Of the Linux runs sampled, 24 of 44 with #25995 crashed, against 0 of 64 without. All screenshots are already written when it happens. #25995 also added this diagnostic sample, apparently by accident, so skipping it is the first thing to try, but the native crash itself isn't understood: the numbers can't separate the probe from the rest of #25995. The first CI run with the sample skipped (build 244534) didn't crash, but one clean run isn't proof at a 55% crash rate. The sample stays available, and its author may want to remove it along with the unusedRenderDocCapture.cs.Not fixed here:
When_Touch_Selection_*_Does_Not_Lock_ScrollViewer. This flake also fails Windows and macOS desktop legs on master and unrelated PRs. The caret loses its thumbs during the drag. It didn't reproduce locally, so the cause is still open and these legs may need a re-run.Worth a look from reviewers. This takes back the side effect #26106 called out, where this lane was the first real run of a framework-dependent app. The SDK change itself stays. It did launch and run there: both framework-dependent builds ran all 6736 tests, with only these failures. A dedicated framework-dependent smoke test could be a follow-up. On the next bump to 2.6+, the two RTF tests will fail for a real reason, and RichEditBox's RTF save will need to follow.
Validation
Given_InputInjector+Given_RichEditBox532 passed, 0 failed, 102 skipped. The mouse test then passed 3 more runs, no retries. These ran at 250%.Given_ScrollViewer_Zoom: 15 of 15 passed, 3 runs.UnoFastDevBuild=true, so analyzers run only on CI.PR Checklist ✅
Screenshots Compare Test Runresults.: not applicable🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu1pmTF7nEsciGTG9rw