Skip to content

[iOS] Fix CollectionView Label Truncation with MeasureFirstItem - #38338

Merged
kubaflo merged 7 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-38275
Sep 17, 2026
Merged

kubaflo merged 7 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-38275

Conversation

@devanathan-vaithiyanathan

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

MeasureFirstItem skipped measurement when the constraints remained unchanged. This behavior was introduced in PR #36159 , where measurement was skipped when the constraints had not changed. After swapping the ItemsSource, the existing constraints remained unchanged, so the measurement was skipped even though the new items required measurement. As a result, the newly loaded items were not measured correctly, causing the layout issue.

Issue Details

On iOS and MacCatalyst, CollectionView2 labels can be truncated after replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse cached constraints and skip measuring the newly bound content.

Description of Change

Updated TemplatedCell2 to detect when the ItemsSource instance changes and reset its cached constraints. This forces the rebound cell to be measured once while preserving the existing measurement optimization during normal scrolling.

Issues Fixed

Fixes #38275

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac
Before After
iOS
Before.mov
iOS
After.mov

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38338

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38338"

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 8, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan added community ✨ Community Contribution and removed partner/syncfusion Issues / PR's with Syncfusion collaboration labels Sep 8, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title [iOS] Fix CollectionView Label Truncation with MeasureFirstItem [WIP][iOS] Fix CollectionView Label Truncation with MeasureFirstItem Sep 8, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 8, 2026
@github-actions github-actions Bot added area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/ios labels Sep 8, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title [WIP][iOS] Fix CollectionView Label Truncation with MeasureFirstItem [iOS] Fix CollectionView Label Truncation with MeasureFirstItem Sep 9, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 10, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Sep 10, 2026
@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor Author

could you please resolve conflicts

@kubaflo , I have resolved the conflicts

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 16, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@devanathan-vaithiyanathan — new AI review results are available based on commit 1dc3e73.

Gate Failed Confidence Low Platform iOS


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ❌ FAILED

Platform: IOS · Base: inflight/current · Merge base: 089828aa

🩺 Fix does not pass the tests — every test still fails after applying the fix. The PR's change does not resolve the failure(s).

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue38275 Issue38275 ✅ FAIL — 293s ❌ FAIL — 309s
🔴 Without fix — 🖥️ Issue38275: FAIL ✅ · 293s

Error-relevant lines (filtered from the build log):

     at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue38275.LabelsShouldNotBeTruncatedAfterItemsSourceIsReplaced() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38275.cs:line 28
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
🟢 With fix — 🖥️ Issue38275: FAIL ❌ · 309s

Error-relevant lines (filtered from the build log):

     at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue38275.LabelsShouldNotBeTruncatedAfterItemsSourceIsReplaced() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38275.cs:line 28
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

⚠️ Failure Details

  • ❌ Issue38275 FAILED with fix (should pass)
    • LabelsShouldNotBeTruncatedAfterItemsSourceIsReplaced [4 s]
    • VisualTestUtils.VisualTestFailedException : Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios-26/LabelsShouldNot...
📁 Fix files reverted (1 files)
  • src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs

📋 Pre-Flight — Context & Validation

Pre-Flight: PR #38338

Scope

  • PR: [iOS] Fix CollectionView Label Truncation with MeasureFirstItem
  • Issue: #38275, an iOS CollectionView2 regression in 10.0.100 (last known good: 10.0.90)
  • Base / platform: inflight/current / ios
  • Affected path: active iOS/MacCatalyst Items2 handler

Problem

With ItemSizingStrategy.MeasureFirstItem, replacing ItemsSource with a new list can leave recycled cells displaying stale or truncated right-aligned label text. The affected cells reuse first-item sizing and cached per-cell constraints; the first cell is usually unaffected and later cells fail intermittently.

Existing PR Approach

The PR adds a weak reference to the last ItemsSource on each TemplatedCell2. During BindVirtualView, it compares source identity and resets _cachedConstraints when the source changes, forcing PreferredLayoutAttributesFittingAttributes to call Measure once under otherwise unchanged constraints.

Changed files:

  • src/Controls/src/Core/Handlers/Items2/iOS/TemplatedCell2.cs (+23)
  • src/Controls/tests/TestCases.HostApp/Issues/Issue38275.cs (new)
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38275.cs (new)

Direct Diff Assessment

The production change assumes every recycled cell observes the old source before observing the replacement. Its invalidation is keyed to collection-level source identity rather than to the cell's rebound content or native layout state. Alternatives must use a different root-cause mechanism and preserve the MeasureFirstItem scrolling optimization.

Test Contract

Detected primary UI test:

pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "Issue38275"

No separate mandatory regression tests were enumerated for STEP 5a. Do not run the full CollectionView category or any full suite.

The completed gate must not be rerun. It failed both without and with the PR fix because VerifyScreenshot() could not find a baseline snapshot under snapshots/ios-26; this does not establish whether either implementation visually fixes the truncation. Each candidate must report the actual bounded test result honestly.

Attempt Constraints

  • Modify only files permitted by .github/.baseline-state.json after EstablishBrokenBaseline.ps1.
  • Preserve the new issue page and UI test; do not create or overwrite gate/content.md.
  • One implementation/test pass per candidate, with at most one focused correction/retest.
  • Candidate 2 must consume candidate 1's recorded result and use a mechanism-level different approach.

🔬 Code Review — Deep Analysis

Code Review — PR #38338

Independent Assessment

What this changes: The submitted iOS/MacCatalyst Items2 handler change remembers the ItemsSource last observed by each TemplatedCell2. When that source identity changes, the cell clears _cachedConstraints, causing the next fitting pass to call Measure once even when the collection's width or height constraint is unchanged. Rebinding within the same source continues to reuse the cached constraints and preserves the MeasureFirstItem scrolling optimization.

Inferred motivation: Replacing ItemsSource can rebind already-created cells without changing their native layout constraints. The existing constraint-only optimization therefore skips the managed measure needed to refresh newly bound label layout, leaving recycled content truncated.

Reconciliation with PR Narrative

The implementation matches the stated root cause and scope: it targets the active iOS/MacCatalyst Items2 cell, invalidates only per-cell constraints on source replacement, and leaves first-item size reuse intact. The added UI scenario repeatedly replaces the source and captures the resulting labels.

Blast Radius Assessment

  • Runs for all TemplatedCell2 binds, but the extra work is a reference-identity check; a forced measure occurs only when the observed source changes.
  • No startup or page-initialization path is added.
  • No static/shared state is introduced. The weak reference is cell-local and does not retain an obsolete source.
  • Empty and null sources are handled without dereference; transitioning to null clears both the remembered source and cached constraints.

Findings

The expert reviewer produced no actionable file:line findings. inline-findings.json contains a valid empty array.

Failure-Mode Probing

  • Normal scrolling/reuse with the same source: PrepareForReuse retains _cachedConstraints; the still-live source compares by reference, so the existing optimization remains active.
  • Repeated source replacements: Each cell resets its cache the first time it binds against each new source, then records that source and avoids repeated resets.
  • Source transitions through null: A previously observed source is cleared and constraints are invalidated; the next non-null source is treated as new.
  • Collected weak target: The active source is also strongly held by ItemsView.ItemsSource, so a weak target for the current source cannot ordinarily disappear. An expired target is conservatively treated as a source change.
  • Header/footer or non-MeasureFirstItem cells: Clearing _cachedConstraints is harmless; those paths already measure directly or have no first-item cache.
  • Same-source collection reset or item-property mutation: This patch intentionally does not invalidate solely because content changes. The submitted reproduction is source replacement, and the expert review found no concrete added-line defect, but the screenshot Gate did not provide behavioral evidence for this or adjacent CollectionView scenarios.

External Output Contract

Not applicable.

Validation Evidence

The trusted Gate failed both without and with the production fix because VerifyScreenshot() could not find an ios-26 baseline. This is not evidence that the implementation failed or succeeded, and the Gate was not rerun.

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: The code-only approach is localized, consistent with the reported lifecycle, and has no expert-review findings. Approval is not supportable from this run because the required regression test did not reach a visual comparison, so the fix remains behaviorally unverified.


🛠️ Try-Fix — Analysis & Comparison

Try-Fix Candidate 1 (PR #38338)

Approach Description

Planned a cell-local intrinsic-size invalidation on rebind in TemplatedCell2: clear _cachedConstraints only when recycled content indicates stale truncation risk, preserving MeasureFirstItem optimization otherwise.

Prior Approach Avoided and Mechanism-Level Difference

Avoided PR approach: ItemsSource-identity invalidation via weak source reference. This candidate is mechanism-level different: it keys invalidation to per-cell content/layout mismatch (intrinsic-size pressure on reused cells) rather than collection-level source replacement identity.

Files Changed

  • None (blocked before implementation)

Complete Captured Diff

Test Command and Result

  • Command: pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "Issue38275"
  • Result: Not run (Blocked before test)

Relevant Test Output Summary

EstablishBrokenBaseline.ps1 failed with DIRTY WORKING DIRECTORY; .github/.baseline-state.json was not created.

Failure Analysis

Without baseline state, RevertedFiles allow-list could not be determined. Per bounded rules, candidate was marked Blocked and no code/test mutation was performed.

Inline Self-Review Finding Count

  • 0

Restore Status

  • Ran exact command: pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore
  • Output: No baseline state found, Restored False

Try-Fix Candidate 2 (PR #38338)

Approach Description

Planned bound-state lifecycle invalidation in TemplatedCell2: capture whether the cell is already bound before ResetArrangeState, and expire _cachedConstraints only for an in-place rebind. After the new binding context is applied, the existing end-of-bind invalidation would force one fresh measure on the next fitting pass. Cells routed through PrepareForReuse are already unbound, so normal scrolling would retain the MeasureFirstItem optimization.

Prior Approaches Avoided and Mechanism-Level Difference

The PR's approach keys invalidation to ItemsSource object identity through a per-cell weak reference. Candidate 1 planned cell-local intrinsic-size/layout-mismatch detection. Candidate 2 uses neither source identity nor content geometry: its root-cause hypothesis is lifecycle timing and existing invalidation-state semantics. An already-visible cell can be rebound while _bound remains true; because ResetArrangeState retains _cachedConstraints, the subsequent measure invalidation reaches fitting but skips Measure at unchanged constraints. The pre-reset bound state would distinguish that in-place transition from a scrolling reuse that first passed through PrepareForReuse.

Candidate 1 was not reopened, rerun, modified, or reinterpreted. Its planned mechanism was not repeated.

Files Changed

  • None (blocked before implementation)

Complete Captured Diff

Test Command and Result

  • Required command: pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "Issue38275"
  • Result: Not run; Candidate 2 is Blocked before implementation/testing.

Relevant Test Output Summary

No test output exists because the baseline safety gate failed first. The existing gate's missing iOS 26 screenshot baseline was not reached and is not treated as behavioral proof.

Failure Analysis

pwsh .github/scripts/EstablishBrokenBaseline.ps1 rejected the pre-existing harness-dirty worktree with DIRTY WORKING DIRECTORY. A subsequent state check returned STATE_ABSENT; .github/.baseline-state.json did not exist, so no RevertedFiles allow-list was available. Per the safety boundary, no tracked edit or test was permitted. All pre-existing .github/** and eng/** modifications were preserved exactly, with no cleanup or workaround.

Inline Self-Review Finding Count

  • 0 findings. There was no candidate code diff; the required overarching and always-active review dimensions were applied to the empty attempt diff.

Restore Status

  • Exact command run: pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore
  • Completed output: No baseline state found. Nothing to restore. / Restored False
  • This is the permitted no-state outcome because baseline creation was rejected before any tracked edit.

Attempt Artifacts

  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/baseline.log
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/approach.md
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/reviewer-findings.json
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/reviewer-findings.diff
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/result.txt
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/fix.diff
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/test-output.log
  • CustomAgentLogsTmp/PRState/38338/PRAgent/try-fix/attempt-2/analysis.md

🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winner: pr

The raw submitted PR is the only implemented fix candidate and the single expert pass found no actionable file:line defect. Its per-cell ItemsSource identity invalidation directly addresses unchanged constraints after source replacement while preserving cached measurement during normal same-source scrolling. However, the trusted Gate did not permit approval: the regression test failed before visual comparison because its ios-26 snapshot baseline was unavailable.

Comparative ranking

Rank Candidate Implementation Review result Regression evidence Assessment
1 pr Complete submitted fix and UI reproduction 0 expert findings Gate failed before comparison: missing ios-26 baseline Best available candidate; localized and technically coherent, but not behaviorally verified
2 pr-plus-reviewer Byte-for-byte production/test behavior of pr; empty reviewer delta No actionable feedback to apply No separate run required; inherits the same blocked visual evidence Equivalent to pr; loses the tie because it adds no improvement
3 try-fix-2 No patch; proposed _bound lifecycle invalidation 0 findings on an empty diff Not run; blocked before implementation by missing baseline state More concrete than candidate 1, but neither executable nor validated
4 try-fix-1 No patch; proposed intrinsic-size mismatch invalidation 0 findings on an empty diff Not run; blocked before implementation by missing baseline state Mechanism remained conceptual and supplied no comparable code or evidence

No candidate passed the required regression test, so the rule preferring passing candidates does not distinguish this field. A missing-baseline test failure is not proof that pr is functionally wrong, but it is stronger negative evidence than a passing result and prevents an approval recommendation. The two try-fix attempts are ranked below implemented candidates because being blocked before code or test execution is not better evidence than a bounded run that exposed an unavailable oracle.

Why the alternatives do not win

  • pr-plus-reviewer contains no refinement; selecting it would imply an unsubmitted improvement that does not exist.
  • try-fix-1 offers no precise executable condition for detecting intrinsic-size pressure and no diff.
  • try-fix-2 could potentially cover same-source in-place rebinds, but its lifecycle hypothesis was never implemented or tested. It cannot displace reviewed code on design intent alone.

Required disposition

Keep the submitted implementation as the preferred fix, but do not approve from this evidence set. The focused Issue38275 test must reach a valid visual comparison with the expected iOS baseline before the regression is considered verified.


📱 UI Tests — CollectionView

Detected UI test categories: CollectionView

❌ Deep UI tests — 430 passed, 2 failed, 5 skipped across 1 category on platform-pool agent (replaces in-process counts above). 1 new snapshot test need a baseline PNG (added separately by a maintainer — not a regression).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
CollectionView 430/438 (2 ❌, 1 ⚠ new baseline, 5 skipped) 2 diff PNGs
🔍 AI analysis of failures — PR-related vs unrelated

🔍 AI-generated triage (GitHub Copilot CLI) — a heuristic judgement of whether each deep UI test failure is connected to this PR's changes. Verify before relying on it.

Likely PR-related: one or more failures appear connected to this PR's changes.

  • ✗ PR-related — New Issue 38275 visual coverage (~1 test): the PR adds this screenshot test but does not add its required iOS-26 baseline, directly causing the missing-baseline failure.
  • ✗ PR-related — CollectionView2 preselection visuals (~2 tests): both tests render through the modified iOS Items2 handler after configuring an observable ItemsSource, so the new cell constraint-cache reset plausibly caused their matching 1.25% screenshot differences.
❌ CollectionView — 2 failed tests
VerifyModelItemsObservableCollectionWhenSingleModePreSelection
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyModelItemsObservableCollectionWhenSingleModePreSelection.png (1.25% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.CollectionView_ItemsSourceFeatureTests.VerifyModelItemsObservableCollectionWhenSingleModePreSelection() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ItemsSourceFeatureTests.cs:line 651
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** argu
...
VerifyModelItemsObservableCollectionWhenMultipleModePreSelection
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyModelItemsObservableCollectionWhenMultipleModePreSelection.png (1.25% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.CollectionView_ItemsSourceFeatureTests.VerifyModelItemsObservableCollectionWhenMultipleModePreSelection() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ItemsSourceFeatureTests.cs:line 673
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** 
...
⚠️ CollectionView — 1 new snapshot test need a baseline PNG

These tests call VerifyScreenshot but their baseline image isn't committed yet (brand-new snapshot tests get their baseline added separately by a maintainer). There's nothing to compare against, so this is not a regression — download the drop-deep-uitests artifact, confirm the rendering, and commit the baseline PNG.

  • LabelsShouldNotBeTruncatedAfterItemsSourceIsReplaced

📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-gate-failed AI could not verify tests catch the bug s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR s/agent-review-in-progress AI review is currently running for this PR labels Sep 16, 2026
@kubaflo
kubaflo merged commit fac640c into dotnet:inflight/current Sep 17, 2026
37 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Sep 17, 2026
kubaflo pushed a commit that referenced this pull request Sep 18, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Sep 21, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 6, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 6, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 13, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 13, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 14, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
kubaflo pushed a commit that referenced this pull request Oct 14, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause
MeasureFirstItem skipped measurement when the constraints remained
unchanged. This behavior was introduced in PR #36159 , where measurement
was skipped when the constraints had not changed. After swapping the
ItemsSource, the existing constraints remained unchanged, so the
measurement was skipped even though the new items required measurement.
As a result, the newly loaded items were not measured correctly, causing
the layout issue.

### Issue Details
On iOS and MacCatalyst, CollectionView2 labels can be truncated after
replacing ItemsSource when using MeasureFirstItem. Recycled cells reuse
cached constraints and skip measuring the newly bound content.

### Description of Change

<!-- Enter description of the fix in this section -->
Updated TemplatedCell2 to detect when the ItemsSource instance changes
and reset its cached constraints. This forces the rebound cell to be
measured once while preserving the existing measurement optimization
during normal scrolling.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

 **Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [x] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/69b03e7c-488d-47a9-8aae-dae02e7510a5"
width="300" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/4c68515d-04cd-4f06-9e7b-d5d5bcb3f731"
width="300" height="600"> |

---------
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-failed AI could not verify tests catch the bug s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] CollectionView Label renders truncated after ItemsSource is swapped with ItemSizingStrategy="MeasureFirstItem" (regression in 10.0.100)

6 participants