Repository navigation
test: Let scroll tests wait out slow WebGPU frames - #25140
MartinZikmund wants to merge 3 commits into
Conversation
|
The build 238511 found UI Test snapshots differences: Details
|
|
Claude finished @MartinZikmund's task in 22s —— View job Review summaryVerdict: ship, with minor notes.
|
| var frameMs = (samples[^1].Ms - samples[0].Ms) / (samples.Count - 1); | ||
| if (frameMs > durationMs / 3) | ||
| { | ||
| Assert.Inconclusive($"frames ({frameMs:F0} ms) are too long to sample a {durationMs:F0} ms curve"); |
There was a problem hiding this comment.
Assert.Inconclusive turns a potential regression in the wheel-notch curve into a non-failing result on any slow lane, which is exactly the lane class this PR is stabilizing. Please confirm the threshold (durationMs / 3) can't be hit on fast lanes where the curve genuinely regressed (e.g. a one-frame jump), or gate it on a measured per-lane frame time rather than the sampled span of the very data under test.
| pacer.Dispose(); | ||
|
|
||
| pacer.RequestFrame(); | ||
| pacer.UpdateTargetFps(30); |
There was a problem hiding this comment.
Minor: Thread.Sleep(100) as a negative wait is timing-based and slow-ish; since the pacer is disposed, it's fine, but a 1 ms interval clamp means a leaked tick would fire well within 100 ms, so this is acceptable. Consider a shorter wait to keep the unit suite fast.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25140/wasm-skia-net9/index.html |
|
The build 238665 found UI Test snapshots differences: Details
|
Since #24736 the tracker advances once per frame instead of on a 17ms timer. WaitTrackerLogs returned once the logs were unchanged for 100ms, so on software-rendered lanes (WebGPU on SwiftShader), where a frame takes longer than that, it sampled the logs mid-motion and saw 0-1 ValuesChanged. Wait for IdleStateEntered instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
The animated offsets tests enabled by #24737 assume ~60fps: they expect several ViewChanged within a 50-1000ms animation, and a cancel or interrupt (queued for 3 ticks, as in WinUI) to land before it ends. On WebGPU/SwiftShader a frame takes hundreds of ms, so the animation completes in one or two frames. Lengthen offsets-change animations to 1-5s in these tests via ScrollPresenterTestHooks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
A queued ScrollTo needs a few ticks, which outlast the 1s default on software-rendered WebGPU. When frames are longer than the curve itself there is nothing to sample, so that check reports inconclusive instead of failing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L4YBGyfjv1uKVn6FUFxSEF
27c4291 to
0febd6b
Compare
|
Claude finished @MartinZikmund's task in 17s —— View job Review summaryVerdict: ship, with minor notes. This was a code-inspection review only. I did not build or run anything.
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25140/wasm-skia-net9/index.html |
|
The build 238844 found UI Test snapshots differences: Details
|
|
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Verified that the new WaitTrackerLogs predicate matches the emitted log format (TrackerLogsConstructingHelper.GetIdleStateEntered produces "IdleStateEntered: ..."), so waiting for the tracker to reach idle replaces the 100 ms quiet-period heuristic. The ScrollPresenterTestHooks Get/SetOffsetsChangeVelocityParameters signatures and Uno.Disposables.Disposable.Create exist as used. Not run locally; the author reports WASM runs.
Findings:
-
AssertOnWheelCurve (Given_ScrollView.cs around line 224-231) turns the curve-shape assertion into Assert.Inconclusive when frames are longer than a third of the curve. That skips the check on exactly the slow-frame lanes this PR targets, so those lanes stop covering the wheel curve. The github-actions bot raised this on 2026-10-09 and it has no reply. Please either justify it in the description as an accepted coverage trade-off, or assert something that is measurable at slow frame rates (for example, that the start and end offsets are reached and the curve is monotonic). Otherwise this weakens what the test asserts on those lanes.
-
UseSlowerOffsetsChangeAnimations changes the timing used by BasicOffsetChanges, BasicOffsetsChangeCancelation and the interrupt tests, so the default 50-1000 ms curve is no longer exercised on any lane. Restoring the values on dispose is correct. Please state this in the description, and confirm that none of these assertions depends on a specific duration.
-
The description says the rest of the stabilization lives in #25196, #25197, #25198 and #25201. Those are not reviewed here.
Point 1 should be resolved before approval.
|
Tick the box to add this pull request to the merge queue (same as
|
GitHub Issue: closes #25139
PR Type:
🐞 Bugfix / 🏗️ Build or CI related changes
What changed? 🚀
Stabilizes the scroll,
InteractionTrackerandScrollPresenterruntime tests on the slow-frame WebGPU lanes (SwiftShader frames of 250 ms+). The product behavior is correct on slow frames; the tests assumed ~60 fps.In the 8 days to 2026-10-09, 36 of 39 master builds had a failed WebGPU job. This is one piece of the stabilization work tracked in #25139. The PR was originally broader and was split to keep each review small. The rest lives in:
Fixes
Given_InteractionTracker×3 (since #24736)WaitTrackerLogsread "logs quiet for 100 ms" as "motion done"; since the tracker moves once per frame, a 250 ms+ software frame ends that early. The product is correct on slow framesIdleStateEnteredScrollPresenterTests×3 (un-ignored by #24737)ScrollPresenterTestHooks(restored on dispose)Given_ScrollViewwheel-notch testsScrollToneeds a few ticks, which outlast the 1 sWaitFordefault; a 125 ms curve can't be sampled by 250 ms framesBoth scroll clusters were reproduced locally on WASM + Chrome SwiftShader (same assertions as CI) and pass after the change.
Results (CI build 238511, every WebGPU lane forced on, all fixes combined)
Pre-existing, not addressed here (fail on master too)
ScrollPresenterTests.OffsetsChangeWithCustomDuration(Linux Framebuffer, every master build).PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TP1JtY64etkfxxGCms44aN