Skip to content

Update ItemsRepeater - #23406

Merged
MartinZikmund merged 43 commits into
masterfrom
dev/mazi/pending/irfixes
Sep 29, 2026
Merged

MartinZikmund merged 43 commits into
masterfrom
dev/mazi/pending/irfixes

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Jun 8, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #22906, closes #22907, closes #22908, closes #24447, closes #23624, closes #21668

PR Type:

💬 Other... — WinUI source sync: refactoring, bug fixes, and public-API alignment (includes removals)

What changed? 🚀

Syncs ItemsRepeater and its layouts with the current WinUI C++ sources, splitting each type into the .h.mux.cs / .mux.cs / .uno.cs layout the porting rules expect. This covers the three tracking sub-issues:

LinedFlowLayout (#22909) is not in scope here and remains stubbed.

Reported bugs this fixes

Each is covered by a runtime test in Given_ItemsRepeater, verified on Skia Desktop to fail on master and pass here:

API surface

Uno-only members that WinUI never projects were reduced to internal or removed (FlowLayoutAlgorithm, IFlowLayoutAlgorithmDelegates, ItemsRepeater.GetElementImpl/ClearElementImpl, StackLayout.Algorithm_OnLineArranged, and FlowLayout.MinColumnSpacing/MinRowSpacing, which are absent from FlowLayout.idl). Corresponding entries were added to the 6.7 set in build/PackageDiffIgnore.xml.

Known regressions to resolve before merge

Removing the Uno-specific firstRealizedMajor clamping in StackLayout.GetExtent for parity re-exposes viewport realization gaps that the clamp was compensating for:

  • [Skia|Android] ItemsRepeater fails to layout items when navigated back again #11626 regressed — after an unload/reload (or navigating back to a cached page) and scrolling, only the first two items of the visible window are realized. Deterministic on Skia Desktop: 6/6 runs fail here, 6/6 pass on master.
  • When_ItemSignificantlyTaller_Then_VirtualizeProperly and When_UnloadReload_Then_MaterializeItemsForCurrentViewport are [Ignore]d for the same reason.
  • Given_ItemsRepeater_FastScroll.When_WheelScrollDownThroughVarianceList_Then_OffsetMonotonicallyAdvances (uno#23041) is disabled: it fails here and passes on master. It is an Uno-only guard — NotExecuted on the WinAppSDK leg, which has no InputInjector.

PR Checklist ✅

Breaking changes: the public members listed under API surface are removed or reduced to internal to match the WinUI surface. FlowLayout.MinColumnSpacing / MinRowSpacing are the only ones likely to appear in app code; UniformGridLayout carries the equivalent properties.

@github-actions github-actions Bot added area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Jun 8, 2026
@MartinZikmund MartinZikmund changed the title Update `ItemsRepeater Update ItemsRepeater Jun 8, 2026
@MartinZikmund
MartinZikmund marked this pull request as draft June 8, 2026 14:14
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

WinAppSDK sync generator drift detected on a97b4df

The Uno.WinAppSDKSyncGenerator produced changes that are not committed on this PR.

To apply automatically (PRs from branches in this repo only): comment /apply-sync-gen on this PR and a bot will push chore: Sync generator run to the head branch.

To apply manually (required for PRs from forks):

  1. Download the sync-generator-patch artifact from this run.
  2. In your local checkout of the PR branch:
    git apply sync-generator.patch
    git add -A
    git commit -m "chore: Sync generator run"
    git push
    

Or re-run the generator locally on Windows via build\run-api-sync-tool.cmd.

@MartinZikmund

Copy link
Copy Markdown
Member Author

/apply-sync-gen

@unodevops

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Pushed chore: Sync generator run to this PR branch.

GitHub does not re-trigger workflows for commits pushed by the default bot, so the WinAppSDK Sync Generator Check will not automatically re-run. To turn it green, push any additional commit (for example git commit --allow-empty -m "ci: re-run") or ask a maintainer to re-run the check.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ MartinZikmund
❌ github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/pending/irfixes branch from f118e25 to 8f48825 Compare July 13, 2026 11:34
@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 8m 2s —— View job


PR Review: Update ItemsRepeater

Tasks:

  • Gather context and understand the PR scope
  • Review core ItemsRepeater files
  • Review FlowLayout and FlowLayoutAlgorithm
  • Review RecyclePool, RecyclingElementFactory, SelectionModel
  • Review test changes
  • Review miscellaneous files (NavigationView, PipsPager, ChildrenInTabFocusOrderIterable)
  • Post inline comments for specific findings
  • Write summary

Overall verdict: fix-first on the two ViewManager.mux.cs bugs before merge

The structural refactoring — splitting each file into .h.mux.cs (header/fields), .mux.cs (WinUI C++ port), and .uno.cs (Uno-specific additions) — is the right approach for long-term WinUI parity maintenance. The port is faithful in the vast majority of cases.

Findings by severity

# Severity File Summary
1 🔴 High ViewManager.mux.cs:25 m_lastFocusedElement = owner incorrectly translates a tracker_ref host-registration ctor; field should be null
2 🔴 High ViewManager.mux.cs:27-28 Eager ElementFactoryGetArgs/ElementFactoryRecycleArgs allocation makes downstream null guards dead code; matches another tracker_ref mistranslation
3 🟡 Medium RecyclingElementFactory.mux.cs:98 m_templates.First().Key boxes a struct enumerator on every element realization (hot path)
4 🟡 Medium Diff/StructuralDiff.md et al. 22 generated analysis docs (~6 300 lines) committed under the production source tree — consider doc/ or a GitHub issue for the confirmed bugs
5 🔵 Low NonVirtualizingLayout.mux.cs:46,56 Pure-virtual C++ methods ported as virtual … throw NotImplementedException() rather than abstract

Cross-cutting notes

  • Events: no event Action<T> — all events correctly use TypedEventHandler<T,U>. ✅
  • Async discipline: no .Result/.GetAwaiter().GetResult(), no unguarded async void. ✅
  • DependencyProperties: FlowLayout.Properties.cs and RecyclePool.Properties.cs use the correct FrameworkPropertyMetadata pattern with nameof-equivalent strings. The EnsureProperties() lazy-init factory matches WinUI C++ intent. ✅
  • Platform targeting: .mux.cs/.uno.cs/.h.mux.cs suffixes are used correctly; #if !__SKIA__ guards are appropriate. ✅
  • #pragma warning disable usage: all suppressions are narrowly scoped with explanatory comments. ✅
  • Tests: The new runtime tests (ViewManagerTests, LayoutTests, FlowLayoutTests, etc.) follow the [RunsOnUIThread] / async Task conventions. The [Ignore] on CanQueryElementFactory retains the existing issue link. ✅
  • Diff files as bug trackers: _DistilledDiffViewManagement.md documents three confirmed behavioral bugs (Setting Image.Source to local image (added as "Content" to Assets/ folder in UWP project) leads to WASM app never going past the Splashscreen #1 and Paths are either not shown or shown not as in the UWP Designer #2 above plus the CoreDispatcher.RunIdleAsync → DispatcherQueue.TryEnqueue divergence). The first two are present in this PR's code and should be fixed here or tracked as issues before merge.

Validation note

Assessment is code-review only (diff inspection + file reads). Findings #1 and #2 are confirmed by cross-checking the Uno code against the WinUI C++ behavior described in both the committed Diff files and the WinUI source. Runtime validation would require running the ViewManagerTests suite.

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 35s —— View job


PR Review: Update ItemsRepeater

Tasks:

  • Gather context and load tools
  • Read key files and verify previous findings
  • Review new commits since last review pass
  • Post inline comments for remaining findings
  • Write summary

Overall verdict: ship-after-minor — the two high-severity bugs are fixed; one medium finding remains open

The latest commit (f240682) correctly addresses both high-severity tracker_ref mistranslations from the previous review. The port is now structurally sound.

Status of prior findings

# Severity Status Summary
1 🔴 High ✅ Fixed m_lastFocusedElement now starts null (was seeded with owner)
2 🔴 High ✅ Fixed ElementFactoryGetArgs/RecycleArgs now lazily allocated by the existing null guards
3 🟡 Medium ⚠️ Open m_templates.First().Key struct-enumerator boxing on hot path — inline comment posted
4 🔵 Low ⚠️ Open 22 Diff/ markdown files still committed under production source tree
5 🔵 Low ✅ Addressed virtual throw NotImplementedException() now has an explanatory comment documenting WinUI composable-runtimeclass intent

Cross-cutting notes (no new issues found)

  • Events: no event Action<T> — all use TypedEventHandler. ✅
  • Async discipline: no .Result/.GetAwaiter().GetResult(), no unguarded async void. ✅
  • VirtualizationInfo: MustClearDataContext and IsInPinnedPool correctly present per PR description. ✅
  • Layout.h.mux.cs: CreateDefaultItemTransitionProvider correctly widened to protected internal. ✅
  • BuildTreeScheduler: [ThreadStatic] fields correctly lazy-initialized on first use (can't use inline initializers). ✅
  • Tests: new ViewManagerTests, FlowLayoutTests, LayoutTests, ItemTemplateTests follow [RunsOnUIThread]/async Task conventions. ✅

Validation note

Assessment is code-review only (diff inspection + file reads). Findings #1 and #2 are confirmed fixed by cross-checking the corrected constructor against the previous diff. Runtime validation requires running the ViewManagerTests suite.

@MartinZikmund

Copy link
Copy Markdown
Member Author

Review comments addressed — commit f240682aa6

All 5 unresolved threads were judged against the WinUI C++ source (microsoft-ui-xaml controls/dev/Repeater/) and the current code on this branch.

Validation level: code inspection only. Nothing here was built, run, or tested locally — Azure Pipelines CI will verify. The two accepted fixes are small, mechanical, and were checked against every call site of the affected fields.

Fixed (2)

file:line reviewer point what changed
ViewManager.mux.cs:25 m_lastFocusedElement = owner mistranslates tracker_ref<T>(ITrackerHandleManager*) — the field should start null Correct — removed. Confirmed against ViewManager.h:88 (tracker_ref<winrt::UIElement> m_lastFocusedElement) and ViewManager.cpp:14: the ctor-initialiser registers the tracker host, it does not seed a value. All 5 read sites are null-safe (== element, is Control, != null), so null is the correct seed. Beyond the two consequences you listed, the seeding also made the first focus change call UpdatePin(m_lastFocusedElement /* the repeater itself */, addPin: false) at line ~945.
ViewManager.mux.cs:27-28 m_ElementFactoryGetArgs / m_ElementFactoryRecycleArgs eagerly allocated; makes the downstream lazy-create guards dead code Correct — removed. Same tracker_ref host-registration overload (ViewManager.h:99-100); WinUI lazily creates them at ViewManager.cpp:171-174 / 772-774. The C# guards at lines 160-163 and 730-732 already do the lazy create, so removing the eager allocation restores WinUI behaviour without an NRE risk.

A short comment now records why those three fields are left unassigned, so the next reader doesn't "fix" it back.

No change needed (2)

file:line the point why no change
RecyclingElementFactory.mux.cs:98 m_templates.First().Key boxes the dictionary enumerator; use a foreach over templates.Keys helper instead The allocation is real, but the proposed fix does not remove it. m_templates is declared as the interface IDictionary<string, DataTemplate> (RecyclingElementFactory.h.mux.cs:12 — it's the WinRT IMap<hstring, DataTemplate> projection, and Templates is a public settable property, so the concrete type is user-supplied). Through that interface, .Keys is an ICollection<string>, so foreach dispatches IEnumerable<string>.GetEnumerator() and boxes KeyCollection.Enumerator exactly like First() does. The claim "foreach over Dictionary<K,V>.Keys uses the struct enumerator without boxing" only holds when the static type is the concrete Dictionary<K,V>, which it isn't here. Removing the box would need a is Dictionary<,> type test — a deviation from the 1:1 port of m_templates.get().First().Current().Key() for one ~40-byte box on a path that also runs DataTemplate.LoadContent() (a whole subtree realization). Not worth the parity cost.
NonVirtualizingLayout.mux.cs:46 virtual + throw new NotImplementedException() should be abstract to "match the C++ pure-virtual intent" The premise is incorrect: WinUI does not declare these pure-virtual. NonVirtualizingLayout.h:19-20 declares plain virtual methods and NonVirtualizingLayout.cpp:29-37 gives them throwing bodies (throw winrt::hresult_not_implemented()) — which is precisely what this port does. NonVirtualizingLayout is also a public, instantiable, composable runtimeclass with a public constructor; making it abstract would be a public API break against both WinUI and Uno's own surface. Left as-is, and (per your suggestion) added a comment explaining why for future maintainers.

Needs @MartinZikmund input (1) — left open

file:line the point why it needs you
Repeater/Diff/*.md (22 files, ~6 300 lines) Should the generated parity-analysis markdown live permanently under src/Uno.UI/…/Repeater/? Suggests moving to doc//specs/ or dropping them. Legitimate repo-hygiene concern, but the disposition is a judgment call only you can make: keep as long-lived parity docs (and if so, where), or treat them as one-time PR artifacts and delete. Deleting or relocating 22 files is destructive and this is a pending/ branch where the analysis may still be driving the port work, so I did not guess.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/pending/irfixes branch from f240682 to 07e6e6c Compare August 22, 2026 09:48
@unodevops

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 10s —— View job


PR Review: Update ItemsRepeater

Tasks:

  • Load tools and initialize
  • Check new commits since last review
  • Review open findings and new changes
  • Post inline comments for findings
  • Write summary

Overall verdict: ship — all blocking issues resolved; one repo-hygiene question remains the author's call

This review pass covers the commits added after the July 14 review: 07e6e6cf (tracker_ref fix), 1a346348 (trim commentary), db8d0dad (IDE0051 suppressions), 8766e4ec (Diff files), and 236b6d10 (sync generator).

Status of all prior findings

# Severity Status Summary
1 🔴 High ✅ Fixed m_lastFocusedElement now starts null; comment at lines 25-27 explains the tracker_ref host-registration pattern
2 🔴 High ✅ Fixed ElementFactoryGetArgs/RecycleArgs now lazily allocated by the existing null guards; confirmed by reading ViewManager.mux.cs:18-29
3 🟡 Medium ✅ Accepted (no change needed) m_templates.First().Key boxing: MartinZikmund's counter-argument is correct — m_templates is typed as IDictionary<string, DataTemplate> (interface), so foreach over .Keys dispatches ICollection<string>.GetEnumerator() and boxes identically. The proposed fix doesn't remove the allocation.
4 🔵 Low ⚠️ Still open 22 Diff/ markdown files (~6 300 lines) under src/Uno.UI/…/Repeater/Diff/ — disposition is author's call (keep in place, move to doc//specs/, or delete as one-time artifacts)
5 🔵 Low ✅ Fixed NonVirtualizingLayout.mux.cs — comment added at lines 45-46 explaining WinUI composable-runtimeclass intent and why virtual rather than abstract

Cross-cutting checks on new commits

  • IDE0051 suppressions (db8d0dad): all are narrowly scoped with #pragma warning disable/restore pairs and carry explanatory comments per code-style rules. ✅
  • Commentary trim (1a346348): removes verbose "Uno specific" notes for natural C# idioms; no behavior change. ✅
  • SerialDisposable revokers (649099c3): m_gotFocus/m_lostFocus correctly use SerialDisposable to replicate WinUI's auto_revoke token pattern. ✅
  • ItemsSourceView Move decomposition (2a3e0f1d): INCC Move → Remove+Add bridge correctly placed at ItemsSourceView.Impl.cs:192-197 so the ported WinUI control code never sees the unsupported Move action. ✅
  • Events: no event Action<T> — all use TypedEventHandler/EventHandler. ✅
  • Async discipline: no .Result/.GetAwaiter().GetResult(), no unguarded async void. ✅

Validation note

Assessment is code-review only (diff inspection + file reads). The two high-severity findings are confirmed fixed by reading the current ViewManager.mux.cs:18-29. Runtime validation requires running the ViewManagerTests suite — use /runtime-tests ViewManagerTests on Skia Desktop.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund changed the base branch from master to feature/breakingchanges August 22, 2026 14:57
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/pending/irfixes branch from 07e6e6c to 7d87d09 Compare August 22, 2026 14:57
@github-actions

github-actions Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 4m 30s —— View job


PR Review: Update ItemsRepeater

Tasks:

  • Load tools and initialize
  • Check new commits since last review
  • Review CodeQL findings from automated scan
  • Read affected files
  • Post inline comments for findings
  • Write summary

Overall verdict: fix-after-minor — two small production-code issues and one test NRE to address before merge

This pass covers the latest commit (7d87d09b — dead-code cleanup removing #if !__SKIA__ / #if !UNO_HAS_ENHANCED_LIFECYCLE arms that are never compiled on feature/breakingchanges) and the CodeQL findings posted by the automated scanner at the previous CI run.

Latest commit (7d87d09b)

The cleanup is correct and well-scoped: __SKIA__ and UNO_HAS_ENHANCED_LIFECYCLE are always defined on this branch, and __ANDROID__ is never defined, so all removed arms were dead. The commit message is accurate. No new issues introduced. ✅

New findings (from CodeQL / this pass)

# Severity File Summary
1 🟡 Medium FlowLayoutAlgorithm.mux.cs:765 countInLine * 2 — integer multiply in float divide expression; use 2f
2 🟡 Medium FlowLayoutAlgorithm.mux.cs:767 (... + 1) * 2 - 1 — all-int sub-expression; use 2f
3 🟡 Medium ItemTemplateTests.cs:356 itemBorder.Child accessed without null-guarding itemBorder (real NRE risk)
4 🔵 Low LayoutTests.cs:160,179 CodeQL: Verify.IsNotNull not recognised as a null-terminator; add if (child is null) { return; }
5 🔵 Low LayoutTests.cs:172-173 CodeQL: int * int widened to double; use 10.0 / 100.0
6 🔵 Low ItemTemplateTests.cs:364 CodeQL: follow-on from #3; resolved by fixing #3

Findings #1 and #2 are one-character fixes (2 → 2f). Finding #3 is a real null-dereference path in the test when the realized element is not a Border.

Status of prior findings

All high-severity findings from previous review passes remain resolved (✅). No regressions introduced by the latest commit.

Validation note

Assessment is code-review only (diff inspection + file reads). Runtime validation for the production-code changes requires running /runtime-tests FlowLayoutTests on Skia Desktop.

MartinZikmund and others added 9 commits September 29, 2026 10:13
Picks up the WinUI 2.5.1 servicing fix (WinAppSDK 62786355) for FlowLayout
and UniformGridLayout: a collection change can reach a layout that is not, or
is no longer, initialized for the context -- such as the reset ItemsRepeater
sends while unloading -- and dereferencing the null state faults. StackLayout
already guarded this; the other two now mirror it.

Point the MUX Reference lines of the files whose upstream counterpart moved
between 1.8.2 and 2.5.1 at the 2.5.1 tag, so the next sync diffs from the
revision the C# actually carries.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
When_UnloadReload_Then_MaterializeItemsForCurrentViewport was disabled for a
Uno-specific extent clamp, but it failed on item presence long before that
assertion: the stale effective viewport wiped the realization window on
reload. With the viewport fix it passes end to end, offset assertion included.

When_WheelScrollDownThroughVarianceList_Then_OffsetMonotonicallyAdvances goes
back to its platform Ignore conditions -- it was the same collapsed viewport
moving the offset backward mid-wheel.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
ValidateDataTemplateWithElementNameBinding and its nested variant cover
uno#24477, an Uno gap in resolving ElementName across a DataTemplate loaded
through XamlReader.Load. Gate the Ignore on HAS_UNO so the WinAppSDK leg,
where the binding resolves, keeps the coverage.

The two RecyclePool leak tests stay unconditional on purpose, and now say so:
they cover a fix WinUI shipped in 2.5.1 while SamplesApp builds against
WindowsAppSDK 2.4.0, so the WinUI leg does not pass them either.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
WinUI computes the layout origin as firstRealizedLayoutBounds.MajorStart minus
firstRealizedItemIndex * averageElementSize. averageElementSize is a running
mean over the realized items, so the origin drifts by a few pixels whenever a
tall item enters or leaves the realization buffer. WinUI absorbs that drift
through the viewport shift the repeater hands its scroller; Uno's ScrollViewer
does not consume ItemsRepeater's pending viewport shift, so it lands on screen
instead -- items change their repeater-local Y between two wheel ticks, and a
shrinking estimate drags the offset backward mid-gesture.

master carried a workaround for this and the port dropped it for parity, which
regressed both wheel guards on every Skia head. With the runner's three
attempts they only looked flaky; at one attempt they fail on the first
iteration.

Restore it as an Uno-specific hook so the ported GetExtent keeps the WinUI
formula in plain sight and the deviation stays in StackLayout.uno.cs, with the
reason and the condition for removing it written down.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
Out of the ported header and into StackLayoutState.uno.cs, so the .h.mux.cs
stays 1:1 with WinUI, and renamed to the _camelCase the other Uno-only fields
in this folder use.

Also widened to double. Everything it is compared against or assigned from --
MajorStart, SetMajorStart, Rect -- is double, so holding it as float truncated
on the way in and out, and the sub-pixel drift that leaked into the
itemsAboveHeld comparison is the very thing this mechanism exists to avoid.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
Defensive hardening, not a proven bug fix. The held origin is derived from the
content that produced it, and OnElementSizesReset already exists to clear the
per-content state on a collection Reset or a rasterization-scale change, so
leaving this field out of it lets an origin outlive its content.

I could not build a runtime test that fails without this line: two shapes were
tried, reassigning ItemsSource while scrolled with equal-sized items and with
items five times shorter, and both pass either way because the post-reset
anchor releases the held origin on its own.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
When_ItemSignificantlyTaller_Then_VirtualizeProperly was disabled for the same
removed extent clamping as the two wheel guards. It passes now that the held
layout origin is back.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HiJR8QDtVzGWTouX6ui79N
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/pending/irfixes branch from a7e08a7 to 4a67e6a Compare September 29, 2026 08:32
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 14s —— View job


PR Review: Update ItemsRepeater

Tasks:

  • Load tools and initialize
  • Identify commits new since the last full review pass (a7e08a7a)
  • Review the one new commit (4a67e6a7 "fix: Use cached boxes for anchor ratio defaults")
  • Verify against the repo's boxing-analyzer convention
  • Write summary

Overall verdict: ship

Only one commit landed since the last full review pass: 4a67e6a7 "fix: Use cached boxes for anchor ratio defaults", a 2-line change in ScrollViewer.Anchoring.cs.

What it does and why it's correct

HorizontalAnchorRatioProperty/VerticalAnchorRatioProperty registered their default value as the raw constant c_defaultAnchorRatio (0.0, per the earlier default-flip commit reviewed on 2026-09-03): new FrameworkPropertyMetadata(c_defaultAnchorRatio). This commit switches both to new FrameworkPropertyMetadata(Boxer.Box(c_defaultAnchorRatio)).

This isn't a style nit — it's an analyzer-mandated pattern in this repo. Boxer.Box(double) (src/Uno.UI/Helpers/Boxes.cs:117) returns a cached singleton box for the bit-exact values 0.0 and 1.0 instead of allocating a new boxed double, and BoxingDiagnosticAnalyzer's own test suite (Given_BoxingDiagnosticAnalyzer.cs:19) explicitly lists new FrameworkPropertyMetadata(defaultValue: 0.0) as the exact shape it flags, expecting Boxer.Box instead. The setters on both properties already used Boxer.Box(value) (line 61/73), so this closes the one place in the file that didn't — consistent with the same pattern used throughout ScrollViewer.cs (ExtentHeightProperty, ViewportWidthProperty, etc.).

No behavior change: c_defaultAnchorRatio is still 0.0, only the box identity changes (shared cached instance vs. a fresh allocation). No new issues found; nothing to post inline.

Status of prior findings (unchanged, not re-flagged)

All findings and discussions from the extensive prior review history (the ViewManager.mux.cs tracker_ref bugs, the P1 viewport-reset and P2 transition-provider-leak fixes, the wheel-scroll regression root-cause and fix, the held-extent-origin naming/precision/reset fixes, the RecyclingElementFactory/CustomProperty null-handling discussions declined with WinUI-parity rationale, the Diff/*.md relocation, the anchor-ratio default flip itself, etc.) remain in the state recorded in the thread — fixed, or declined with a documented rationale.

Validation note

Assessment is code-review only (diff inspection of the single new commit, cross-checking Boxer.Box's cached-value logic and the boxing analyzer's own test fixtures for the exact pattern it targets). No build or runtime tests were executed for this pass.
· branch dev/mazi/pending/irfixes

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 236183 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
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • 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 2502

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • ApplicationViewMode.png
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png-dark
    • Arrange_Performance01.png
    • Attributed_text_FontSize_Changing.png
    • AuthenticationBroker_Demo.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationPropertiesExtensions_Role.png
    • AutomationProperties_AutomationId.png-dark
    • AutoSuggestBox_Description.png
    • AutoSuggestBox_Icons.png-dark
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Battery.png-dark
    • Battery.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • 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.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • 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

@MartinZikmund
MartinZikmund merged commit 1149cf8 into master Sep 29, 2026
65 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/pending/irfixes branch September 29, 2026 12:01
@mergify

mergify Bot commented Sep 29, 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 added a commit that referenced this pull request Oct 7, 2026
FlowLayout.idl only has LineSpacing and MinItemSpacing. The
MinColumnSpacing/MinRowSpacing pair was removed on purpose by the
ItemsRepeater sync (#23406); the samples and tests that set them use
UniformGridLayout, which keeps its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011swjKyeQhuwHxAJW5R1vk8
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/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation

Projects

None yet

6 participants