Repository navigation
fix(wasm): Request a record so the splash is removed - #24260
Conversation
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Pull request overview
This PR fixes an intermittent Skia WebAssembly startup hang where the bootstrap loader (“splash”) is never removed because WebAssemblyWindowWrapper.ShowCore waits for CompositionTarget.FrameRendered, but the code previously only requested a present (via InvalidateRender) instead of forcing a record pass that actually raises FrameRendered.
Changes:
- Replace
IXamlRootHost.InvalidateRender()withICompositionTarget.RequestNewFrame()after subscribing toCompositionTarget.FrameRendered. - Add the required
Uno.UI.Compositionimport and document why a “record” (not just a “present”) is required to guaranteeFrameRenderedfor splash removal.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24260/wasm-skia-net9/index.html |
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Source review: RequestNewFrame is the appropriate dirty-record request for a completion path that waits on FrameRendered; a present-only host invalidation can leave that event unfired. The existing unsubscribe/removal callback remains in place. This browser splash lifecycle has no direct native WinUI source analogue, so I am not claiming a literal WinUI port. No blocking issue found in the changed call, but the current master conflict and failed review check must be handled before merge readiness.
7d2cb99 to
cb8b50a
Compare
|
Claude finished @MartinZikmund's task in 2m 9s —— View job Claude's ReviewVerdict: Ship — no blocking issues found. This is a minimal, well-justified root-cause fix. What I verified against the source:
Non-blocking observation:
Cross-cutting note: |
There was a problem hiding this comment.
🟡 Changes recommended
Add deterministic regression coverage for the rendered-ahead-of-time scheduling path.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24260/wasm-skia-net9/index.html |
|
The build 233744 found UI Test snapshots differences: Details
|
|
|
ShowCore waits for CompositionTarget.FrameRendered, which is raised only from the record pass, but asked for it with IXamlRootHost.InvalidateRender - a present request that never sets RenderRequested. When the target has already painted ahead of time, the resulting tick records nothing, the event never fires, and the bootstrap loader stays up forever. Route the request through ICompositionTarget.RequestNewFrame, whose every state converges on a Render, so FrameRendered is guaranteed after the handler subscribes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Up3PthZrnrxxYK2g8NVgWD
cb8b50a to
9656bf8
Compare
|
Claude finished @MartinZikmund's task in 1m 59s —— View job Claude's Review Progress
Verdict: Ship — no blocking issues foundI independently traced the fix against
Non-blocking, cross-cutting notes (not new inline comments — already raised in this thread)
|
There was a problem hiding this comment.
🔵 Needs a closer look
Add a deterministic regression test covering the ahead-of-time render state.
Review details
Suppressed comments (1)
src/Uno.UI.Runtime.Skia.WebAssembly.Browser/UI/Xaml/Window/WebAssemblyWindowWrapper.cs:166
- This changes a stateful render-scheduling path that is only exercised by the WASM startup race, but there is no regression test for the
_renderedAheadOfTime/RequestNewFramecase. The existingGiven_CompositionTargettest only covers a normal property invalidation and would pass with the old call, so please add a deterministic WASM-Skia test (or a small seam around the state machine) that subscribes toFrameRenderedin the ahead-of-time state and verifies that this request still produces the event and permits splash removal.
((ICompositionTarget)compositionTarget).RequestNewFrame();
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24260/wasm-skia-net9/index.html |
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 9656bf89223177e3fdc0a8c08b70f79d56102e0e. The force-push was rebase-only and the patch remains correct: subscription precedes RequestNewFrame, scheduler coalescing still produces the required record, and the callback unsubscribes before removing the splash. The previous conflict and review-check blockers are resolved; no blocking code issue found.
|
The build 233980 found UI Test snapshots differences: Details
|
|
|
|
@Mergifyio backport servicing/6.8 |
✅ Backports have been createdDetails
|
Port of unoplatform#24260 (9656bf8), which is on master only: the splash was only removed after a record pass, but only a present was requested, so the app stayed on the loading screen until an interaction triggered a render (unoplatform#23586).
…r-24260 fix(wasm): Request a record so the splash is removed (backport #24260)
Upgrade the Basic Uno sample to SDK 6.8.0-dev.66, which ships the servicing backport of unoplatform/uno#24260. The pinned host could wait forever for a recorded frame while requesting only a present. Map Uno and its unmirrored desktop dependencies to their publishing feed without allowing SkiaSharp or HarfBuzzSharp consumers to bypass staged artifacts. Cover both repository and generated feed mappings. Review and update only navigation pixels for the newer theme; preserve all canvas/control reference pixels and existing rendering tolerances. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 1d3be5b1-5a0b-452c-8a04-703fc4dd1ae1
Upgrade the Basic Uno sample to SDK 6.8.0-dev.66, which ships the servicing backport of unoplatform/uno#24260. The pinned host could wait forever for a recorded frame while requesting only a present. Map Uno and its unmirrored desktop dependencies to their publishing feed without allowing SkiaSharp or HarfBuzzSharp consumers to bypass staged artifacts. Cover both repository and generated feed mappings. Review and update only navigation pixels for the newer theme; preserve all canvas/control reference pixels and existing rendering tolerances. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 1d3be5b1-5a0b-452c-8a04-703fc4dd1ae1
) Stabilize browser sample captures and stable Uno startup (#5361) Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1636281 Context: #5353 Context: https://github.com/mono/SkiaSharp/pull/5293/checks?check_run_id=116262705576 Context: unoplatform/uno#24260 Changes: unoplatform/uno@f4d493c...da217df Handle CSS transitions, eventual image readiness, and Uno splash dismissal at their respective boundaries rather than relaxing golden comparisons. Keep the Basic Uno sample on a stable SDK and retain repository mirrors for dependency resolution. ~~ Finish CSS transitions before screenshot capture ~~ The Windows Blazor drawing test cleared its canvas correctly, but its cleared-page screenshot differed by 1906 pixels inside the Clear button. Its hover-exit background transition was still running after the canvas readiness assertions had passed. Set ScreenshotAnimations.Disabled in BrowserRunningApp.Screenshot so Playwright finishes finite CSS transitions during capture. This does not wait for WASM canvas painting. Retain the drawing pixel assertions and existing comparison thresholds; no Blazor references change. Verify the capture behavior with a transition paused halfway: the captured 100x100 swatch must contain its final color, not the intermediate color. ~~ Give eventual image readiness one bounded comparison loop ~~ A visible Blazor CPU canvas can precede its first raster presentation. The pixel-readiness fix in #5353 addressed that gap, but separate pixel and image checks give startup different readiness conditions and deadlines. Add an opt-in SampleImage.Validate capture-delegate overload that returns the matching image path. Retry dimension and pixel mismatches against the reviewed reference, using the existing comparison options. Default to a two-second budget with 100ms polling; the CPU startup test explicitly allows ten seconds and returns on the first matching capture. Replace BlazorWebAssemblyCpuSampleRuns(delayFirstPaint), its one-second module-delay case, and its opaque-pixel probe with a normal startup test using the complete golden image as its readiness condition. Do not apply eventual matching globally to drawing or GPU assertions: a matching frame does not establish that every intermediate frame was correct. Limit each capture await to the remaining budget and test cancellation. WaitAsync stops waiting; it does not cancel the underlying capture. Propagate capture errors and cancellation rather than treating them as image mismatches. Missing references and corrupt images also fail without retrying. Preserve one-shot validation and produce the usual diagnostics when a completed mismatch persists until the deadline. Exercise transient and persistent mismatches, dimension changes, retained diagnostics, invalid deadlines, stalled captures, and error propagation. A browser test captures an incorrect frame followed by the expected frame; the console-error test verifies browser errors still escape through the capture loop. ~~ Adopt stable Uno without accepting unrelated image changes ~~ Update the Basic Uno sample from Uno.Sdk 6.6.0-dev.208 to stable 6.7.30, which selects runtime 6.7.135. Keep repository package sources unchanged: the required dependencies are supplied through the existing mirrors. Add a contract test for the artifacts, dotnet-public, and dotnet-eng source/mapping keys; generated SkiaSharp and HarfBuzzSharp consumers remain restricted to staged artifacts. The newer navigation template changes top-navigation spacing. Review and update the nine Uno references for that layout change: 1556 CPU navigation pixels and 1582 Drawing navigation pixels per reference. Every pixel below the 49-pixel navigation header remains unchanged, including scene content, strokes, the Clear button, and drawing controls. Stable CPU and drawing tests pass these references without changing their tolerances. ~~ Keep recording until Uno dismisses its startup splash ~~ The Windows Uno failure remained on .uno-loader until startup timed out. Reproduce the symptom locally on stable 6.7.30 with 4x Chromium CPU throttling: the loader stays visible for 60 seconds despite an existing canvas and no browser errors. Uno subscribes to CompositionTarget.FrameRendered, then requests a presentation through IXamlRootHost.InvalidateRender. Presentation can reuse an existing recording without raising the event needed to remove the splash. The upstream correction requests a new recorded frame, but that correction is absent from the selected stable runtime. Add a WebAssembly-only partial App hook before window activation. Temporarily subscribe to the public CompositionTarget.Rendering event, whose stable implementation requests recorded frames. Let Uno remove its own loader, then unsubscribe. Also stop on window close. An independent non-repeating 60-second dispatcher timer unsubscribes and reports an explicit error if dismissal never completes. Do not hide the loader or substitute screenshot retries for application recovery. The workaround passed 32 local cold starts, including 20 consecutive 4x-throttled starts. Observation confirmed cleanup after natural dismissal. A fault-injected observer that never reported dismissal triggered the timeout error and stopped observing. These checks support the workaround, not a guarantee over every scheduling interleaving. Retain the existing normal Uno startup, rendering, navigation, drawing, and clear tests without permanent loader-query instrumentation. Remove the workaround when the sample adopts a runtime containing the upstream recorded-frame correction. The final head passes the Windows, Linux, and macOS sample Host and Build checks and both sample Docker checks. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Virgil Ming <[email protected]> Co-authored-by: Copilot App <[email protected]>
Every published SkiaSharp.Views.Uno.WinUI is built against Uno.WinUI 5.2 and references the Uno and Uno.UI.Toolkit assemblies, which Uno Platform 7 renamed to Uno.WinRT and Uno.UI.Extras without forwarders. On 7.0 the app throws FileNotFoundException from SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() at startup. Build the package against Uno.WinUI 7.0, as one plain netX assembly instead of one per platform: - the Android, iOS, macOS, Mac Catalyst and WebAssembly variants and the uno-runtime packaging split are removed; - the package targets net10.0 and later plus -windows, since Uno Platform 7 does not support net9.0. - with one implementation left, each view is a single file in the project: the shared folder and its .Skia.cs partials are merged. This drops Uno Platform 5 and 6 support. SKSwapChainPanel stays unsupported outside Windows App SDK; Uno's SKCanvasElement is the GPU-backed control there. The Uno samples move to Uno.Sdk 7.0.0-dev.79 and its conditional XAML prefixes. Earlier 7.0 SDKs bring a Hot Design build that still references the pre-7 assemblies. The Gallery also stops declaring SkiaSharp.Views.WinUI twice, which the 7.0 SDK's package resolver rejects. The in-tree samples also exclude the Uno.Sdk's Win32, Android and iOS SkiaSharp native packages, as they already did the Linux, macOS and WebAssembly ones, so they load the natives built in the tree instead of the SDK's older ones. The samples' Android heads move to Uno.UI.Runtime.Android's NativeApplication and ApplicationActivity and build their host in CreateHost, as Uno Platform 7 requires. SkiaFiddle moves to Uno.Monaco.Editor 7.0.0-dev.3, the first build for Uno Platform 7; earlier ones depend on a CommunityToolkit build that references Uno.UI.Toolkit and fail at startup the same way. The Basic sample drops the WebAssembly splash workaround it carried for Uno 6.7: Uno 7 requests a recorded frame for the splash itself (unoplatform/uno#24260). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every published SkiaSharp.Views.Uno.WinUI is built against Uno.WinUI 5.2 and references the Uno and Uno.UI.Toolkit assemblies, which Uno Platform 7 renamed to Uno.WinRT and Uno.UI.Extras without forwarders. On 7.0 the app throws FileNotFoundException from SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() at startup. Build the package against Uno.WinUI 7.0, as one plain netX assembly instead of one per platform: - the Android, iOS, macOS, Mac Catalyst and WebAssembly variants and the uno-runtime packaging split are removed; - the package targets net10.0 and later plus -windows, since Uno Platform 7 does not support net9.0. - with one implementation left, each view is a single file in the project: the shared folder and its .Skia.cs partials are merged. This drops Uno Platform 5 and 6 support. SKSwapChainPanel stays unsupported outside Windows App SDK; Uno's SKCanvasElement is the GPU-backed control there. The Uno samples move to Uno.Sdk 7.0.0-dev.79 and its conditional XAML prefixes. Earlier 7.0 SDKs bring a Hot Design build that still references the pre-7 assemblies. The Gallery also stops declaring SkiaSharp.Views.WinUI twice, which the 7.0 SDK's package resolver rejects. The in-tree samples also exclude the Uno.Sdk's Win32, Android and iOS SkiaSharp native packages, as they already did the Linux, macOS and WebAssembly ones, so they load the natives built in the tree instead of the SDK's older ones. The samples' Android heads move to Uno.UI.Runtime.Android's NativeApplication and ApplicationActivity and build their host in CreateHost, as Uno Platform 7 requires. SkiaFiddle moves to Uno.Monaco.Editor 7.0.0-dev.3, the first build for Uno Platform 7; earlier ones depend on a CommunityToolkit build that references Uno.UI.Toolkit and fail at startup the same way. The Basic sample drops the WebAssembly splash workaround it carried for Uno 6.7: Uno 7 requests a recorded frame for the splash itself (unoplatform/uno#24260). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every published SkiaSharp.Views.Uno.WinUI is built against Uno.WinUI 5.2 and references the Uno and Uno.UI.Toolkit assemblies, which Uno Platform 7 renamed to Uno.WinRT and Uno.UI.Extras without forwarders. On 7.0 the app throws FileNotFoundException from SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() at startup. Build the package against Uno.WinUI 7.0, as one plain netX assembly instead of one per platform: - the Android, iOS, macOS, Mac Catalyst and WebAssembly variants and the uno-runtime packaging split are removed; - the package targets net10.0 and later plus -windows, since Uno Platform 7 does not support net9.0. - with one implementation left, each view is a single file in the project: the shared folder and its .Skia.cs partials are merged. This drops Uno Platform 5 and 6 support. SKSwapChainPanel stays unsupported outside Windows App SDK; Uno's SKCanvasElement is the GPU-backed control there. The Uno samples move to Uno.Sdk 7.0.0-dev.79 and its conditional XAML prefixes. Earlier 7.0 SDKs bring a Hot Design build that still references the pre-7 assemblies. The Gallery also stops declaring SkiaSharp.Views.WinUI twice, which the 7.0 SDK's package resolver rejects. The in-tree samples also exclude the Uno.Sdk's Win32, Android and iOS SkiaSharp native packages, as they already did the Linux, macOS and WebAssembly ones, so they load the natives built in the tree instead of the SDK's older ones. The samples' Android heads move to Uno.UI.Runtime.Android's NativeApplication and ApplicationActivity and build their host in CreateHost, as Uno Platform 7 requires. SkiaFiddle moves to Uno.Monaco.Editor 7.0.0-dev.3, the first build for Uno Platform 7; earlier ones depend on a CommunityToolkit build that references Uno.UI.Toolkit and fail at startup the same way. The Basic sample drops the WebAssembly splash workaround it carried for Uno 6.7: Uno 7 requests a recorded frame for the splash itself (unoplatform/uno#24260). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every published SkiaSharp.Views.Uno.WinUI is built against Uno.WinUI 5.2 and references the Uno and Uno.UI.Toolkit assemblies, which Uno Platform 7 renamed to Uno.WinRT and Uno.UI.Extras without forwarders. On 7.0 the app throws FileNotFoundException from SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() at startup. Build the package against Uno.WinUI 7.0, as one plain netX assembly instead of one per platform: - the Android, iOS, macOS, Mac Catalyst and WebAssembly variants and the uno-runtime packaging split are removed; - the package targets net10.0 and later plus -windows, since Uno Platform 7 does not support net9.0. - with one implementation left, each view is a single file in the project: the shared folder and its .Skia.cs partials are merged. This drops Uno Platform 5 and 6 support. SKSwapChainPanel stays unsupported outside Windows App SDK; Uno's SKCanvasElement is the GPU-backed control there. The Uno samples move to Uno.Sdk 7.0.0-dev.79 and its conditional XAML prefixes. Earlier 7.0 SDKs bring a Hot Design build that still references the pre-7 assemblies. The Gallery also stops declaring SkiaSharp.Views.WinUI twice, which the 7.0 SDK's package resolver rejects. The in-tree samples also exclude the Uno.Sdk's Win32, Android and iOS SkiaSharp native packages, as they already did the Linux, macOS and WebAssembly ones, so they load the natives built in the tree instead of the SDK's older ones. The samples' Android heads move to Uno.UI.Runtime.Android's NativeApplication and ApplicationActivity and build their host in CreateHost, as Uno Platform 7 requires. SkiaFiddle moves to Uno.Monaco.Editor 7.0.0-dev.3, the first build for Uno Platform 7; earlier ones depend on a CommunityToolkit build that references Uno.UI.Toolkit and fail at startup the same way. The Basic sample drops the WebAssembly splash workaround it carried for Uno 6.7: Uno 7 requests a recorded frame for the splash itself (unoplatform/uno#24260). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every published SkiaSharp.Views.Uno.WinUI is built against Uno.WinUI 5.2 and references the Uno and Uno.UI.Toolkit assemblies, which Uno Platform 7 renamed to Uno.WinRT and Uno.UI.Extras without forwarders. On 7.0 the app throws FileNotFoundException from SkiaSharp.Views.Windows.GlobalStaticResources.Initialize() at startup. Build the package against Uno.WinUI 7.0, as one plain netX assembly instead of one per platform: - the Android, iOS, macOS, Mac Catalyst and WebAssembly variants and the uno-runtime packaging split are removed; - the package targets net10.0 and later plus -windows, since Uno Platform 7 does not support net9.0. - with one implementation left, each view is a single file in the project: the shared folder and its .Skia.cs partials are merged. This drops Uno Platform 5 and 6 support. SKSwapChainPanel stays unsupported outside Windows App SDK; Uno's SKCanvasElement is the GPU-backed control there. The Uno samples move to Uno.Sdk 7.0.0-dev.79 and its conditional XAML prefixes. Earlier 7.0 SDKs bring a Hot Design build that still references the pre-7 assemblies. The Gallery also stops declaring SkiaSharp.Views.WinUI twice, which the 7.0 SDK's package resolver rejects. The in-tree samples also exclude the Uno.Sdk's Win32, Android and iOS SkiaSharp native packages, as they already did the Linux, macOS and WebAssembly ones, so they load the natives built in the tree instead of the SDK's older ones. The samples' Android heads move to Uno.UI.Runtime.Android's NativeApplication and ApplicationActivity and build their host in CreateHost, as Uno Platform 7 requires. SkiaFiddle moves to Uno.Monaco.Editor 7.0.0-dev.3, the first build for Uno Platform 7; earlier ones depend on a CommunityToolkit build that references Uno.UI.Toolkit and fail at startup the same way. The Basic sample drops the WebAssembly splash workaround it carried for Uno 6.7: Uno 7 requests a recorded frame for the splash itself (unoplatform/uno#24260). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@Mergifyio backport release/stable/6.7 |
✅ Backports have been createdDetails
|
…6.7/pr-24260 fix(wasm): Request a record so the splash is removed (backport #24260)
Build SkiaSharp.Views.Uno.WinUI against Uno Platform 7 (#5377) Fixes: #5174 Context: unoplatform/uno#24260 Rebuild the Uno views package and samples around Uno Platform 7's unified renderer and .NET 10 baseline. Replace the obsolete per-platform runtime packaging with one common Uno implementation, preserve existing control usage with a CPU fallback where Uno exposes no swap chain, and keep generated samples on the same managed and native product cohort. ~~ Rebuild the package for the Uno 7 assembly model ~~ The base package referenced Uno.WinUI 5.2.175 and the `Uno` and `Uno.UI.Toolkit` assemblies. Uno 7 renamed those assemblies to `Uno.WinRT` and `Uno.UI.Extras` without forwarders, so startup failed while initializing `SkiaSharp.Views.Windows.GlobalStaticResources` before `OnLaunched` ran. Build the common implementation against Uno.WinUI 7.0.0-dev.2333 and require net10.0 for the non-Windows assembly. Keep the existing Windows TFMs as package facades over `SkiaSharp.Views.WinUI`. Remove the Android, iOS, macOS, and Mac Catalyst platform implementations, plus the separate Skia and WASM runtime projects, their `uno-runtime` packaging, and the WASM JavaScript bridge. Uno 7 no longer selects those native-renderer variants, and Uno.Sdk now supplies the platform native assets. Move the applications to Uno.Sdk 7.0.0-dev.79, its `Skia` feature name, and its Android `UnoPlatformHost` startup model. Use Uno.Monaco.Editor 7.0.0-dev.3 for SkiaFiddle. Remove the Basic sample's WASM splash workaround because the merged upstream fix requests a record and raises the frame notification used to remove the loader. ~~ Preserve SKSwapChainPanel compatibility without a swap chain ~~ Non-Windows Uno targets no longer expose the swap chain or GPU context used by the former platform implementations. Make `SKSwapChainPanel` a `Grid` that hosts `SKXamlCanvas`, reports a null `GRContext`, and raises `PaintSurface` with the raster surface plus a size-and-format `GRBackendRenderTarget` whose framebuffer is zero. `SKCanvasElement` remains the GPU-backed choice on Uno; the WinAppSDK facade continues to use the ANGLE-backed Windows control. The Uno control now derives from `Grid` instead of `FrameworkElement` and drops `RaiseOnUnsupported`, which only controlled the previous unsupported-platform exception. `DrawInBackground` remains unsupported. `EnableRenderLoop` attaches to `CompositionTarget.Rendering` only while the control is loaded and visible. Review found re-entry and unload-lifetime hazards in the replacement redraw path. Keep `Invalidate()` deferred and coalesced so a handler cannot synchronously re-enter `PaintSurface`, and discard canvas redraws that execute after the final unload. The latter guard runs before bitmap allocation, preventing detached work from creating a pinned pixel buffer that no later unload would release. A subsequent load invalidates again, so reattached controls still redraw. ~~ Keep generated samples on one product cohort ~~ Uno.Sdk 7 brings HarfBuzzSharp native assets at its own stable version, while generated samples restore only the staged PR artifact cohort. Add an unconditional `HarfBuzzSharpVersion` override beside `SkiaSharpVersion`, teach the sample generator to stamp both product versions, and verify both packages exist in the generated artifact set. This prevents the previous NU1103 restore failure. The generator removes `_UnoPlatformSamples.targets`, so SkiaFiddle previously had no managed product reference after generation: its native assets could be stamped at the current version while normal feeds could select an older managed SkiaSharp. Add direct SkiaSharp and HarfBuzzSharp project references so the generator emits matching managed package references. Explicitly reference the Uno views from Gallery because Uno.Sdk 7 no longer supplies them, while keeping the generated WinUI package reference out of the in-tree build to avoid a duplicate SDK reference. ~~ Retire the WasmShell native-asset path ~~ Remove the `IsUnoHead` and `UnoRuntimeIdentifier=WebAssembly` branches that fed static libraries and `WasmShell*` linker items to Uno.Wasm.Bootstrap's former emcc pipeline. Uno 7 builds WASM through the .NET SDK, which continues to use the existing `UsingMicrosoftNETSdkWebAssembly` path for SkiaSharp and HarfBuzzSharp native assets. Delete `utils/NativeLibraryMiniTest/wasm`, its Uno.Wasm.Bootstrap 2.1 project, and its bootstrap page. Nothing invoked that utility, while the maintained Uno samples and browser sample tests exercise the .NET SDK WebAssembly integration. This intentionally ends compatibility with pre-Uno 7 WasmShell pipelines. ~~ Make the samples usable on phone-sized targets ~~ Uno 7's Android heads render edge to edge, so apply visible-bounds padding on all sides instead of leaving the Basic drawing toolbar under the navigation bar and the Gallery header under the status bar. Below 720 pixels, move the Gallery's controls below the canvas and collapse them vertically so the fixed 290-pixel sidebar does not consume most of a phone-width layout. Subscribe to Android `BackRequested` only while a sample page is active. Any subscriber makes Uno consume the native back callback, even when the handler does not mark it handled, so retaining the subscription on the Gallery root prevented system back from leaving the application. Use `SKCanvasElement` for the GPU sample on Uno targets and retain `SKSwapChainPanel` for WinAppSDK. ~~ Keep browser validation strict under Uno 7 ~~ Uno.Wasm.Bootstrap probes the HTTP cache with `only-if-cached`; Chromium reports a handled miss as the exact console error `Failed to load resource: net::ERR_CACHE_MISS`. Ignore only that message while continuing to fail browser tests for other console errors. Refresh the drawn and cleared Uno references for Linux, macOS, and Windows. Uno 7 shifted rounded-control antialiasing and the tab indicator enough to produce about 0.125% differing pixels against the existing 0.075% comparison budget. The references now capture the settled Uno 7 output without relaxing comparison policy. Azure build 1651574 and the current-head GitHub checks passed, including managed and native builds, NuGet packaging, WASM tests, and sample build and host jobs. ~~ Remove unsupported compatibility branches ~~ Drop `WINDOWS_UWP`, `UAP10_0_10240`, and `NETSTANDARD1_3` conditionals from the shared binding code. Remove `HAS_UNO`, `HAS_UNO_WINUI`, UWP-namespace, and Uno visibility branches that existed to compile shared Android, iOS, and macOS views into the deleted native-renderer projects. The active Android, Apple, Blazor, Windows, and current managed branches remain in their owning projects. Remove the deleted runtime projects from solution filters and update package and .NET-version guidance to describe the Uno 7 package shape, CPU fallback, and Uno.Sdk-owned WASM native assets. Co-authored-by: Ramez Ragaa <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Copilot App <[email protected]> Co-authored-by: Alex Soto <[email protected]>
GitHub Issue: closes #23586
PR Type:
🐞 Bugfix
What changed? 🚀
WASM Skia apps intermittently stay on the bootstrap loading screen. The app is fully running — and, as it turns out, fully rendered: hiding the loader on a stuck device reveals a correctly laid out, painted app underneath. Only the splash removal never happens. Tapping the screen recovers it.
WebAssemblyWindowWrapper.ShowCorewaits forCompositionTarget.FrameRendered, which is raised from exactly one place — the end ofCompositionTarget.Render(), i.e. the record pass. But to trigger it, it called((IXamlRootHost)host).InvalidateRender(), which only asks for a present. That never setsRenderRequested, andEnqueueRenderCallbackonly reachesRender()through that flag:So when the target has already painted ahead of time — the normal state once the tree has settled, which is exactly where
ShowCore's continuation runs after the font preload — the requested tick consumes_renderedAheadOfTime, records nothing, andFrameRenderedis never raised. The one-shot subscription waits forever and the loader is never removed. BecausePersistBootstrapperLoader()disables the bootstrapper's own removal, there is no timeout or fallback.This also explains the recovery asymmetry: a tap dirties the tree, which forces a record and fires the event, while a resize whose canvas dimensions are unchanged only produces a present and leaves the app stuck.
The fix routes the request through the API that actually marks the target as needing a record:
All three states in
RequestNewFrameconverge on a subsequentRender(), soFrameRenderedis guaranteed to be raised after the handler subscribes.Note this is a different defect from the one addressed by #23590 (which re-armed a dropped
requestAnimationFrame). That fix was correct as far as it went, but the render pump was not the remaining problem —requestAnimationFrameis verifiably alive and firing in ~3 ms in the stuck state, and the frame had already been produced.Validation
What is proven. On a physical device (Samsung SM-F966B, Android 16, Edge 151) driven over USB via the
DevTools protocol, a stuck instance was captured and inspected live:
requestAnimationFramefiring normally (3 ms),document.visibilityState: visible.uno-loaderrevealed the app fully rendered underneath — correct layout, text and listSo the frame exists and the render pump is healthy; only the splash removal never happens. That rules out
a dropped
requestAnimationFrameas the remaining cause and points at theFrameRenderedsubscription,which the state machine above shows cannot be guaranteed by
InvalidateRender(). The recovery asymmetrycorroborates it: a tap dirties the tree and forces a record (recovers), while a synthetic
resizewithunchanged canvas dimensions produces only a present (does not recover).
What is not proven. The hang is rare enough that I could not demonstrate the fix statistically. Using a
harness that reloads the app against a deliberately slowed origin (40 ms per asset) and checks whether
.uno-loaderclears, the observed rate was 1 stuck in 32 runs (~3%) before the fix and 0 in 24 runsafter. At a 3% rate, 0-in-24 would occur ~48% of the time by chance, so the post-fix run is not evidence
of anything on its own. The case for this change rests on the captured stuck instance and the state
machine, not on that comparison.
A deterministic regression test is the right follow-up: it needs a seam to put the target into
_renderedAheadOfTimeat the moment the handler subscribes, then assert thatFrameRenderedis stillraised. Happy to add that here or separately.
PR Checklist ✅
_renderedAheadOfTimestate at the momentShowCoresubscribes; happy to add that as a follow-up if wanted.Screenshots Compare Test Runresults.