Skip to content

Avoid boxing allocations - #12677

Merged
MartinZikmund merged 30 commits into
unoplatform:masterfrom
Youssef1313:avoid-boxing
Sep 28, 2026
Merged

MartinZikmund merged 30 commits into
unoplatform:masterfrom
Youssef1313:avoid-boxing

Conversation

@Youssef1313

@Youssef1313 Youssef1313 commented Jun 22, 2023 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #12410

PR Type:

✨ Feature

What changed? 🚀

SetValue, FrameworkPropertyMetadata and the property store all take object, so every bool, int and double
that reaches them is boxed — on every property set, and once per registration for every primitive default. This PR
makes the framework hand out cached boxes for the common values instead, keeps the DependencyProperty value path that
way with an analyzer at error, and emits the cached boxes from the source generators.

At a glance (full numbers and method under Benchmarks):

  • Setting a bool, or a cached int/double value, is 24–48 bytes lighter per set; re-setting a bool to its current value no longer allocates at all.
  • Startup: −20 KB when all 355 DependencyProperty-owning Uno.UI types initialize (837 fewer boxes), and −73 KB (−0.2%) from process start to an idle first page.
  • Realistic UI work allocates 0.2–2% less, property-state churn 75% less, and 2,000 ListView scroll steps 2.4 MB less.
  • No CPU-time or wall-clock change is statistically significant in any workload, and gen0 counts are unchanged. This is a GC-pressure reduction, not a latency change.

Uno.UI.Helpers.Boxes

The cached boxes live in the Uno.UI.Helpers.Boxes namespace; everything is internal to Uno.UI.

using Uno.UI.Helpers.Boxes;

new FrameworkPropertyMetadata(BoolBoxes.False);   // a cached box for a constant
SetValue(OpacityProperty, Boxer.Box(opacity));    // cached when the value is one we keep
  • Types: BoolBoxes (True/False), IntBoxes (NegativeOne/Zero/One), DoubleBoxes (Zero/One), NullableDoubleBoxes, VerticalAlignmentBoxes, StretchBoxes, RoutedEventFlagBoxes. Boxer.Box(...) has overloads for bool, int, double, VerticalAlignment, Stretch and RoutedEventFlag.
  • double is matched by bit pattern, so -0.0 and NaN payloads keep their own box. 1.0 is cached because it is the default of Opacity, ScaleX and ScaleY.
  • RoutedEventFlag caches each of its 37 declared members; combinations fall through and box.
  • Fixes a live bug: VerticalAlignmentBoxes, StretchBoxes and NullableDoubleBoxes declared their fields with value types, so reading one as object re-boxed and the caches never cached anything — DependencyProperty.GetDefaultValue allocated on every call for Stretch.Fill.
  • This replaces the old Uno.UI.Helpers.Boxes class: Boxes.BooleanBoxes.BoxedFalse is now BoolBoxes.False, and Boxes.Box(value) is Boxer.Box(value).

DependencyObject.SetValue(DependencyProperty, bool)

DependencyObject gains an internal bool overload — only bool. This resolves the review thread that blocked this PR
(discussion_r1249338772): typed overloads are dangerous because implicit numeric conversions route byte/short/char
into an int overload and float/long into a double one, storing the wrong boxed type and throwing
InvalidCastException on the way out. C# has no built-in implicit conversion to bool, so that overload cannot capture
a numeric argument by accident; int and double use Boxer.Box(...) at the call site instead.

Analyzer and code fix

BoxingDiagnosticAnalyzer (in Uno.UI.SourceGenerators.Internal), both diagnostics at error for Uno.UI:

  • UnoInternal0002 — a boxing conversion to object for which a cached box exists, on the DependencyProperty value path only:
    • an argument of a call that takes a DependencyProperty (SetValue, SetCurrentValue, ...) or constructs a PropertyMetadata;
    • the result of a DP callback: returned from an object-returning function that takes a DependencyObject, DependencyProperty or DependencyPropertyValuePrecedences (coercion, PropMethodCall, per-property lookups), or assigned to the out value of one (GetDefaultValue2).
  • UnoInternal0003 — an argument reaching a typed SetValue(DependencyProperty, T) overload through an implicit conversion (numeric widening or a user-defined conversion), which would store the wrong boxed type. The value argument is matched by parameter, so reordered named arguments are handled.

It deliberately does not report:

  • boxes anywhere else: string formatting, exceptions, tracing, automation events, collections. Those are mostly cold, and their values mostly miss the cache, so a rule at error there only added noise to ported code;
  • boxing to an interface rather than object, and constants with no cached box (-0.0, 2.0, a RoutedEventFlag combination).

Framework types are matched by namespace and name, so look-alikes from other namespaces are ignored. BoxingCodeFixProvider rewrites implicit boxing and explicit (object) casts, keeping inner conversions: (object)(int)b becomes Boxer.Box((int)b).

Generators

  • DependencyPropertyGenerator, DependencyPropertyMixinGenerator and the WinAppSDK sync generator emit the cached boxes for generated setters and DefaultValue/FrameworkPropertyMetadata defaults; the 60 affected src/Uno.UI/Generated/** stubs are regenerated (boxing substitutions only).
  • The DependencyProperty generator only emits boxes when Uno.UI.Helpers.Boxes.Boxer is accessible from the compilation, so any other consumer of [GeneratedDependencyProperty] keeps compiling.
  • A DefaultValue = -0.0d now registers negative zero. Previously the generator emitted (double)-0 — integer negation — which registered positive zero.

Call sites

354 Boxer.Box(...) calls and 480 cached-box references across 201 hand-written Uno.UI files (plus the regenerated stubs). They cover every site the analyzer fires on, plus a few hand-picked hot paths outside the DP scope where the value is usually cached: binding FastConvert (string → bool/int/double, which then lands in a DP), the DependencyObject ancestors cache (bool), CornerRadiusFilterConverter (often 0.0) and the ListViewBase index repair on remove (-1). ItemsControl.ContainerFromIndex no longer boxes the index per container it compares against. .claude/rules/dependency-properties.md now points contributors at the cached boxes instead of default(T).

Benchmarks 📊

Measured on b5a968bff2, before the analyzer was narrowed to the DependencyProperty value path. The narrowing only removed boxes from non-DP code (formatting, exceptions, tracing, automation), none of which these workloads exercise in a measurable way, so the numbers still describe this PR. They have not been re-run on the current head.

Method

  • A/B: master at this PR's merge base (d70012ce06) vs this PR (b5a968bff2), built from the same tree in Release into a headless Skia console app (UseHeadless(), Fluent resources merged). The runner verifies before every pass that only the PR build contains Boxer.
  • Machine: Intel Core i9-13900H (14 cores / 20 threads, hybrid P/E cores), 64 GB RAM, Windows 11 10.0.29595, .NET 10.0.11, workstation non-concurrent GC.
  • Bytes are counted on the UI thread with GC.GetAllocatedBytesForCurrentThread, which is exact: 17 of the 25 steady-state rows and 3 of the 4 UI-thread startup measurements read the same byte count in every launch. Bold deltas are identical in every launch or have non-overlapping master/PR ranges; the rest carry a p-value.
  • CPU time is thread CPU cycles (QueryThreadCycleTime), plus wall-clock. Both are compared with a two-sided Mann-Whitney U test.
  • Launches alternate master/PR, flipping which goes first each pair, and the first pair is discarded as warm-up: 15 launches per arm for boot, 11 for type initialization, 5 for steady state. A steady-state value is the median of 7 rounds within a launch.
  • BenchmarkDotNet was not usable here: every workload needs the Uno dispatcher, and the headless host owns the UI thread.

Startup

workload master (bytes) this PR (bytes) Δ bytes
process start → OnLaunched ² 995,232 990,584 −4,648 (−0.5%)
new XamlControlsResources() 1,277,168 1,276,712 −456 (−<0.1%)
merge resources, create + activate Window 113,296 112,888 −408 (−0.4%)
first page: 40 Fluent controls, TextBox/Slider/ComboBox…, 200-item ListView, to idle 32,996,512 32,922,168 −74,344 (−0.2%) ¹ (p=0.0002)
process start → first page idle ² 35,909,120 35,836,160 −72,960 (−0.2%) ¹ (p=0.0012)
static init of all 355 DP-owning Uno.UI types 665,376 645,288 −20,088 (−3.0%)

¹ Varies slightly between launches; p is a two-sided Mann-Whitney U over 15 launches per arm.
² The headless host runs the UI thread on a different thread than Main, so these two phases use process-wide counters (all threads) and are noisier.

Per operation (detached Border)

workload master (bytes) this PR (bytes) Δ bytes
IsHitTestVisible toggled 72 24 −48 (−66.7%)
IsHitTestVisible = true (unchanged value) 48 0 −48 (−100.0%)
Opacity toggled 1.0 ↔ 0.0 24 0 −24 (−100.0%)
Canvas.SetLeft(el, 0.0) 24 0 −24 (−100.0%)
Canvas.SetLeft(el, 1.0) 24 0 −24 (−100.0%)
Canvas.SetZIndex(el, 0) 24 0 −24 (−100.0%)
Canvas.SetLeft(el, i) — uncached (control) 24 24 0
Canvas.SetZIndex(el, i) — uncached (control) 24 24 0
Canvas.GetLeft(el) (control) 0 0 0
new Border() 2,576 2,576 0
new Grid() 2,784 2,784 0
new TextBlock() 4,728 4,728 0
new Button() 5,152 5,152 0
new CheckBox() 5,184 5,184 0

Uncached values are unchanged by design: they fall outside the cached set and still box. Construction is unchanged because boxed defaults are paid once per registration, not per instance.

Realistic workloads (live tree, per iteration)

workload master (bytes) this PR (bytes) Δ bytes
build + lay out a Grid of 50 Borders (size, Opacity, hit-test, Canvas.Left/ZIndex) 295,883 289,835 −6,048 (−2.0%)
toggle IsHitTestVisible + Opacity on 50 elements, lay out 4,800 1,200 −3,600 (−75.0%)
toggle IsEnabled on 30 Fluent controls (Disabled/Normal states), lay out 478,378 474,344 −4,033 (−0.8%)
GoToState PointerOver ↔ Normal on 30 Fluent controls 79,008 79,008 0
programmatic focus across 20 TextBoxes 22,560 22,248 −312 (−1.4%)
toggle 10 CheckBox.IsChecked + 10 ToggleSwitch.IsOn 232,616 232,136 −480 (−0.2%)
add + remove a 40-control Fluent page 792,424 787,336 −5,088 (−0.6%)
create + load + unload the first page 13,980,748 13,945,988 −34,760 (−0.2%) ¹ (p=0.21, not significant)
RequestedTheme Light ↔ Dark on a 40-control page 535,780 534,340 −1,440 (−0.3%)
ListView (2,000 items) scroll step 177,117 175,929 −1,188 (−0.7%)
2,000 consecutive scroll steps (total) 378,348,816 375,926,400 −2,422,416 (−0.6%)

¹ Not identical across launches, and the difference is not statistically significant (p = 0.21, n = 5 per arm), so no claim is made for this row.

Gen0 collections over the 2,000-step scroll were 30 on both.

CPU time and startup time

No workload shows a statistically significant CPU-time or wall-clock difference. The smallest p-value across all 31 rows is 0.06, and new Button() — identical code and identical allocations in both builds — swung +230% between arms. That is the noise floor of a hybrid-core laptop, and it is larger than the time cost of the 24-byte allocations removed here. Some medians lean faster on the PR (type initialization −9%, 2,000 scroll steps −15%), but none is significant, so none is claimed.

Validation

  • Uno.UI builds with 0 errors and 0 UnoInternal0002/UnoInternal0003 diagnostics in Debug and Release, with analyzers on. Re-checked in Debug after the analyzer was narrowed; the boxing analyzer, code-fix and DependencyProperty generator tests pass (58/58).
  • Source generator tests: 521 passed, 14 skipped, 0 failed. New golden tests cover the boxed setter, boxed DefaultValue output and a -0.0 default keeping its sign. New analyzer and code-fix tests run UnoInternal0002/UnoInternal0003 and the code action end to end: the DP scope (SetValue-family and PropertyMetadata arguments, coercion/PropMethodCall results, out defaults) and what stays outside it (string.Format, AppendFormat, arrays, unrelated lambdas), implicit and explicit boxing, inner conversions, string concatenation forms, reordered named SetValue arguments, RoutedEventFlag combinations and look-alike types from other namespaces. Each regression test added in review was run failing before its fix.
  • CI: all 58 checks passed on b5a968bff2 (the benchmarked commit) after re-running two stages that failed for reasons unrelated to this PR. One was the Android agent's 45-minute timeout; the other was When_TextBox_Has_ContextFlyout_Keyboard_Trigger_Shows_Flyout on tvOS, which is already excluded as flaky on Skia iOS and WASM. The only later commit, d4dc8a642b, passes TimePicker's already-boxed values through instead of re-boxing them.

PR Checklist ✅

Other information

  • History. This PR was opened in 2023 and brought up to current master in 2026. A literal rebase was not possible (three years of drift; DependencyObjectGenerator, Uno.UWPSyncGenerator, Uno.UI.Tests and Uno.UI.Skia.csproj were gone or moved), so the change was replayed semantically and the call sites were re-found on today's code by the analyzer. The original commits are at e7f610c8c71.
  • Supersedes perf(uno-ui): Use the cached bool boxes in generated DP setters #24242, the bool-only subset of the DependencyProperty generator change; its DependencyPropertyMixinGenerator hunk is carried here.
  • Credit for the original design and implementation goes to @Youssef1313; every commit carries him as co-author.

@github-actions github-actions Bot added the area/code-generation Categorizes an issue or PR as relevant to code generation label Jun 22, 2023
@Youssef1313
Youssef1313 marked this pull request as draft June 22, 2023 11:42
Comment thread src/Uno.UI/Helpers/Boxes.cs Resolved
@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform labels Jun 22, 2023
@github-actions github-actions Bot added the platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform label Jun 23, 2023
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Jun 26, 2023
@Youssef1313
Youssef1313 force-pushed the avoid-boxing branch 3 times, most recently from f91167d to 653ae85 Compare July 1, 2023 08:29
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

@github-actions github-actions Bot added the stale This item has been marked as stale and will be closed if there is no activity. label Jan 29, 2025
@MartinZikmund

Copy link
Copy Markdown
Member

@Youssef1313 what is needed to merge this one please? I think it is worth un-stale, but need to know how to finalize

@MartinZikmund MartinZikmund removed the stale This item has been marked as stale and will be closed if there is no activity. label Jan 31, 2025
@Youssef1313

Youssef1313 commented Jan 31, 2025 •

Copy link
Copy Markdown
Member Author

@MartinZikmund Conflicts need to be resolved, as well as this comment: #12677

And if there is any build errors to get green. There were no major blockers for this one, I think.

@github-actions

github-actions Bot commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

@github-actions github-actions Bot added the stale This item has been marked as stale and will be closed if there is no activity. label Apr 4, 2025
@MartinZikmund MartinZikmund removed the stale This item has been marked as stale and will be closed if there is no activity. label Apr 22, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

@github-actions github-actions Bot added the stale This item has been marked as stale and will be closed if there is no activity. label Jul 15, 2025
@MartinZikmund

Copy link
Copy Markdown
Member

@ebariche can this be finalized and merged?

@MartinZikmund MartinZikmund removed the stale This item has been marked as stale and will be closed if there is no activity. label Jul 21, 2025
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

MartinZikmund and others added 6 commits September 28, 2026 00:02
Mechanical rename of BoolBoxes.BoxedTrue/BoxedFalse to BoolBoxes.True/False
across Uno.UI, the regenerated WinAppSDK stubs, the generators, the boxing
code fix, their tests and the DependencyProperty rule.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01UuyxCj3yRMnaT3RYDrgZfJ
Co-Authored-By: Youssef Victor <[email protected]>
The cached box classes become top-level types in the Uno.UI.Helpers.Boxes
namespace, and the Box overloads move to Boxer, so call sites read
BoolBoxes.False and Boxer.Box(value) instead of Boxes.BoolBoxes.False and
Boxes.Box(value).

The generators and the WinAppSDK stubs emit the new names, and the
DependencyProperty generator and the code fix now resolve Boxer to decide
whether the boxes are accessible. All of it is internal to Uno.UI.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01UuyxCj3yRMnaT3RYDrgZfJ
Co-Authored-By: Youssef Victor <[email protected]>
The MinuteIncrement changed callback unboxed e.OldValue and e.NewValue only to
box them again for OnMinuteIncrementChanged(object, object). Passing the
event-argument objects through removes both allocations for every value,
including the common 5/15/30 increments that have no cached box.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01UuyxCj3yRMnaT3RYDrgZfJ
Co-Authored-By: Youssef Victor <[email protected]>
Aligns the int family with BoolBoxes and DoubleBoxes, which follow the C#
keyword names. Mechanical rename across Uno.UI, the regenerated WinAppSDK
stubs, the DependencyProperty and WinAppSDK sync generators, the boxing code
fix, their tests and the DependencyProperty rule. The boxes are internal, so
there is no public API impact.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01G49thtH4UbuSE3jbKvQQvv
Co-Authored-By: Youssef Victor <[email protected]>
The GetTargetIndexFromNavigationAction stub took (object o, int i) where
WinUI's ModernCollectionBasePanel takes (BOOLEAN allowWrap,
UINT itemIndexHintForHeaderNavigation), so CalendarView had to pass a cached
box for allowWrap. With the real parameter types it passes a plain false and
nothing is boxed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01G49thtH4UbuSE3jbKvQQvv
Co-Authored-By: Youssef Victor <[email protected]>
RichTextBlock, RichTextBlockOverflow, Block and TextRangeAdapter landed on
master after this branch forked and tripped UnoInternal0002.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 27, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The analyzer and code fix do not cover cached VerticalAlignment and Stretch values, leaving the optimization contract incomplete.

Review effort: Lite
Findings: None

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 235916 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • DisplayInformation.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
  • skia-windows-screenshots: 2310 changed over 2500

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewMode.png-dark
    • AppWindowClosing.png
    • AppWindowPresenters.png-dark
    • ArcSegment.png-dark
    • Attributed_text_Simple.png
    • AutoBorderStretchwithbottommargin.png-dark
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • AutoSuggestBox_SoftKeboard.png-dark
    • AutoSuggestBox_SoftKeboard.png
    • Basics Pivot Test.png
    • Basics.png-dark
    • BeginTime_MultipleAnimations.png-dark
    • BeginTime_MultipleAnimations.png
    • BitmapIcon_Sizing.png-dark
    • BitmapIcon_Sizing.png
    • Border_Clipped_Change_Property.png-dark
    • Border_Clipped_Change_Property.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@mergify

mergify Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

MartinZikmund and others added 6 commits September 28, 2026 08:50
UnoInternal0002 flagged every cached-box candidate, so the sweep also
rewrote string formatting, tracing and automation code. Only report
boxes that flow into the property system: arguments of calls taking a
DependencyProperty or building PropertyMetadata, and results of DP
callbacks (coercion, PropMethodCall, per-property lookups).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LhNTQL2AUCVUSLN6c7AhDA
GetDefaultValue2(DependencyProperty, out object) returns the default
through its out parameter, which the DP scope missed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LhNTQL2AUCVUSLN6c7AhDA
With the analyzer scoped to DP values, drop the boxes the sweep added
to formatting, exceptions, tracing and automation code, where they only
added noise. Keep them where the path is hot and the value is cached:
binding FastConvert, the ancestors cache, CornerRadiusFilterConverter
and the ListViewBase remove path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LhNTQL2AUCVUSLN6c7AhDA
ContainerFromIndex boxed the index for every materialized container it
compared against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LhNTQL2AUCVUSLN6c7AhDA
Copilot AI review requested due to automatic review settings September 28, 2026 07:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The broad framework, analyzer, and generator changes require final human review; three stale suppression pragmas also need cleanup.

Review effort: Lite
Findings: None

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 235941 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • Buttons.png-dark
    • Buttons.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Focus_FocusVisual_Properties.png-dark
    • DisplayInformation.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 2310 changed over 2500

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AppBar_KeyBoard.png-dark
    • ApplicationViewSizing.png-dark
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png
    • Attributed_text_FontSize_Changing.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_AutomationId.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • AutoSuggestBox_Description.png-dark
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics_Automated.png
    • BasicThemeResources.png-dark
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@mergify

mergify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit 61d40c7 into unoplatform:master Sep 28, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/code-generation Categorizes an issue or PR as relevant to code generation kind/documentation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid boxing allocations in dependency properties [7.1+]

9 participants