Skip to content

Gate SafeArea inset listeners in recycler items#35664

Merged
kubaflo merged 9 commits into
dotnet:inflight/currentfrom
AdamEssenmacher:safearea-listener-gating-fix
Jun 1, 2026
Merged

Gate SafeArea inset listeners in recycler items#35664
kubaflo merged 9 commits into
dotnet:inflight/currentfrom
AdamEssenmacher:safearea-listener-gating-fix

Conversation

@AdamEssenmacher
Copy link
Copy Markdown

Description of Change

This PR reduces Android CollectionView/CarouselView item allocation overhead from SafeArea inset listener attachment.

The Android SafeArea implementation currently attaches inset listeners to item views under IMauiRecyclerView, even when those item views have default SafeAreaEdges behavior. This is expensive during item realization/recycling and materially increases allocations and GC pressure in scroll-heavy CollectionView scenarios.

This change gates Android inset listener attachment for descendants of IMauiRecyclerView so listeners are only attached when the target platform view backs an ISafeAreaView2 with explicitly configured SafeAreaEdges.

The fix also preserves behavior for dynamic SafeArea changes:

  • default item views do not attach inset listeners;
  • explicit SafeAreaEdges values, including SafeAreaEdges.None, remain eligible;
  • changing from default to explicit refreshes and attaches the listener;
  • clearing/changing back to default removes the listener and resets applied padding;
  • existing AppBarLayout, MaterialToolbar, and MauiScrollView exclusions are preserved.

Validation completed:

  • dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter FullyQualifiedName~SafeAreaTests --nologo
  • Android device test build and CollectionView SafeArea listener tests
  • MauiAppGC repro, Release Android, explicit APK install, Reset -> End -> Start -> End, 5 repeats:
    • 10.0.70: ~270 MB allocated, 65/2/2 GCs
    • SafeArea gating patch: ~151 MB allocated, 38/0/0 GCs

Issues Fixed

Fixes #35344

PureWeen and others added 5 commits May 21, 2026 16:04
<!-- 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!

## What
Restrict the agentic-labeler to apply **exactly one `area-*` label** per
item, while still allowing multiple `platform/*` labels.

## Why
Backfilling the 26 items affected by the `max:1` bug (fixed in dotnet#35540)
revealed that the labeler occasionally applies multiple `area-*` labels
for ambiguous cases:

- **dotnet#35501** got both `area-layout` and `area-safearea`
- **dotnet#35490** got both `area-navigation` and `area-controls-tabbedpage`

The intended behavior is exactly one best-fit `area-*` per item (a
label-quota distinction not expressible via
`safe-outputs.add-labels.max:` — that field counts total labels, not
labels per prefix). The fix has to live in the agent's instructions.

## Changes

### `.github/skills/agentic-labeler/SKILL.md`
- Scope section: "Exactly one `area-*`" / "One or more `platform/*`".
- Area rules section: renamed heading, changed "pick one or more" →
"apply exactly one".
- New **tie-breaking heuristics** for the area-* selection:
- Specific control beats generic area (`area-controls-tabbedpage` over
`area-navigation`)
  - Sub-area beats parent area (`area-safearea` over `area-layout`)
  - Subject-matter focus beats incidental touch
  - When genuinely tied, prefer the user-visible feature
- Mixed-PR rule clarified: infra-primary PRs get only
`area-infrastructure` (no second product area).

### `.github/workflows/agentic-labeler.md`
- Added explicit reinforcement in the workflow prompt: "Apply exactly
one `area-*` label … and one or more `platform/*` labels".
- Fixed two stale `max: 1` comments left over from dotnet#35540 (the cap is
now `max: 10`).

### `.github/workflows/agentic-labeler.lock.yml`
- Regenerated via `gh aw compile`. Diff is frontmatter-hash + heredoc
rotations only — no semantic change to the compiled config.

## Validation
- Reviewed all 21 existing eval scenarios in `tests/eval.yaml` — none
assert multiple `area-*` labels, so no test updates needed.
- The `max: 10` cap in `safe-outputs` is preserved as a blast-radius
safeguard (one area + several platforms still fit comfortably).

## Follow-ups (not in this PR)
If accuracy of the "one area" rule drops below ~95% in eval runs,
consider adding a deterministic post-step that strips extra `area-*`
labels per a known precedence list (Option B from the design
discussion).

Co-authored-by: bot <bot@test>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Description

Extends the `maui-copilot` DevDiv pipeline (pipeline 27723) with a
3-stage architecture that runs real UI tests on platform-pool agents and
reports results directly in the AI summary PR comment.

### Pipeline Workflow

```
┌─────────────────────────────────────────────────────────┐
│  Stage 1: ReviewPR                                      │
│                                                         │
│  STEP 1: Branch Setup (checkout + cherry-pick PR)       │
│  STEP 2: Detect UI Test Categories                      │
│  STEP 3: Run Detected UI Tests (in-process, fast)       │
│  STEP 4: Regression Cross-Reference                     │
│  STEP 5: Gate — verify tests fail/pass before/after fix │
│  STEP 6: Code Review — deep analysis via Copilot agent  │
│                                                         │
│  Outputs → CopilotLogs artifact + detectedCategories    │
└──────────────────────┬──────────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────────┐
│  Stage 2: RunDeepUITests (platform-pool agent)          │
│                                                         │
│  iOS: AcesShared Tahoe + iOS 26.4                       │
│  Android: ubuntu-22.04 + KVM + AVD                      │
│                                                         │
│  Runs BuildAndRunHostApp.ps1 per detected category      │
│  Outputs → drop-deep-uitests artifact (TRX + diffs)     │
└──────────────────────┬──────────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────────┐
│  Stage 3: PostResults                                   │
│                                                         │
│  1. Download CopilotLogs (review content files)         │
│  2. Download drop-deep-uitests (TRX results)            │
│  3. Merge deep results into uitests/content.md          │
│  4. Post full AI Summary comment on PR                  │
│  5. Apply labels (s/agent-reviewed, etc.)               │
│                                                         │
│  One comment with everything — no patching needed       │
└─────────────────────────────────────────────────────────┘
```

### What's New

**Deep UI Test Execution (Stage 2)**
- Runs detected UI test categories on proper platform-pool agents (not
in-process on Linux)
- **iOS**: AcesShared Tahoe agents with iOS 26.4 simulator, iPhone 11
Pro (matching `ios-26` baselines from PR dotnet#35061)
- **Android**: ubuntu-22.04 with KVM, AVD boot with `-partition-size
2048`, `ignoreHiddenApiPolicyError` capability
- TRX results + snapshot-diff PNGs published as `drop-deep-uitests`
artifact

**Unified Comment Posting (Stage 3)**
- Comment posting and label application deferred to Stage 3 (after deep
tests complete)
- Single AI summary comment includes ALL results: code review + deep
test results
- Nested collapsible `<details>` for failed tests with full error +
stack trace
- Dynamic section title: `🧪 UI Tests — CollectionView, TabbedPage`
- Artifact download link for snapshot-diff PNGs

**Android Emulator Improvements**
- AVD boot step with proper partition size, ADB key pre-authorization,
boot wait
- `DEVICE_UDID` pass-through prevents double emulator boot
- Disk cleanup on hosted ubuntu agents (frees ~22GB)
- KVM enablement + `appium:ignoreHiddenApiPolicyError` for API 30

**iOS Simulator Improvements**
- Tahoe pool demand ensures macOS 26.x agents
- Explicit iOS 26.4 download via latest Xcode
- Auto-creates iPhone 11 Pro for baseline resolution match

### Validation

Tested across 30+ pipeline iterations on 6 PRs:

| PR | iOS | Android |
|---|---|---|
| 35358 (ViewBaseTests) | **112/112 ALL PASS** ✅ | **118/119 PASS** ✅ |
| 35359 (TabbedPage) | 44/50 (1 real failure) | 74/75 (1 real failure) |
| 35356 (CollectionView) | **415/417 PASS** ✅ | 593/619 (26 real
failures) |

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…35589)

> [!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!

Backport of dotnet#35460 to `main`.

/cc @PureWeen

Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

🚀 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 -- 35664

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label May 29, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@AdamEssenmacher! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @AdamEssenmacher! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@github-actions github-actions Bot added area-safearea Issues/PRs that have to do with the SafeArea functionality platform/android labels May 29, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 29, 2026

/review -b feature/refactor-copilot-yml

@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels May 29, 2026
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Could you check the failing tests?

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 30, 2026

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

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 30, 2026

/review -b feature/refactor-copilot-yml -p android

Copy link
Copy Markdown
Collaborator

@MauiBot MauiBot left a comment

Choose a reason for hiding this comment

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

Expert Review — 4 findings

See inline comments for details.

Comment thread src/Core/src/Platform/Android/MauiWindowInsetListener.cs
Comment thread src/Core/src/Platform/Android/MauiWindowInsetListener.cs
Comment thread src/Controls/src/Core/Page/Page.cs
Comment thread src/Controls/src/Core/BindableObject.cs
@AdamEssenmacher
Copy link
Copy Markdown
Author

@kubaflo failing tests were real. Fixed in efa21fe

@kubaflo kubaflo added the s/agent-fix-win AI found a better alternative fix than the PR label May 31, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 31, 2026

/review -b feature/enhanced-reviewer

Copy link
Copy Markdown
Collaborator

@MauiBot MauiBot left a comment

Choose a reason for hiding this comment

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

Expert Review — 3 findings

See inline comments for details.

isInsideRecyclerEmptyView = true;
}

// MaterialToolbar needs its own inset handling, so it is exempt from all listener-suppression branches.
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.

[minor] Complexity Reduction -- ShouldSetMauiWindowInsetListener sets isInsideRecyclerEmptyView while walking upward and then uses that state to exempt empty-view content from RecyclerView suppression. The set-then-check ordering is easy to misread. A brief comment explaining that once the walk passes an empty-view container, RecyclerView suppression must stay disabled for ancestors above it would make this policy safer to maintain.

@MauiBot MauiBot removed the s/agent-fix-win AI found a better alternative fix than the PR label May 31, 2026
@dotnet dotnet deleted a comment from MauiBot May 31, 2026
MauiBot

This comment was marked as outdated.

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented May 31, 2026

/azp run

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Looks like the tests still fail

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Jun 1, 2026

/review -b feature/enhanced-reviewer

Copy link
Copy Markdown
Collaborator

@MauiBot MauiBot left a comment

Choose a reason for hiding this comment

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

AI Review Summary

@AdamEssenmacher — new AI review results are available based on this last commit: 97a7f68.
Add CollectionView safe-area handler path test To request a deterministic rerun after new comments or commits, comment /review rerun.

Gate Passed Code Review In Review Confidence Medium Platform Android

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

Gate Result: ✅ PASSED

Platform: ANDROID · Base: main · Merge base: b0ea772f

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 CollectionViewTests (RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener, RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener, RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener, RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit, RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared, RecyclerItemSafeAreaEdgesChangeThroughHandlerAppliesAndResetsPadding) Category=CollectionView 🛠️ BUILD ERROR ✅ PASS — 598s
🧪 SafeAreaTests SafeAreaTests 🛠️ BUILD ERROR ✅ PASS — 91s
🔴 Without fix — 📱 CollectionViewTests (RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener, RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener, RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener, RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit, RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared, RecyclerItemSafeAreaEdgesChangeThroughHandlerAppliesAndResetsPadding): 🛠️ BUILD ERROR · 420s
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 1.17 sec).
  Restored /home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 11.91 sec).
  Restored /home/vsts/work/1/s/src/Core/maps/src/Maps.csproj (in 52 ms).
  Restored /home/vsts/work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 10.77 sec).
  Restored /home/vsts/work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 58 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests/TestUtils.DeviceTests.csproj (in 1.66 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests.Runners/TestUtils.DeviceTests.Runners.csproj (in 520 ms).
  Restored /home/vsts/work/1/s/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj (in 2.45 sec).
  Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 26 ms).
  Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 35 ms).
  Restored /home/vsts/work/1/s/src/Core/tests/DeviceTests.Shared/Core.DeviceTests.Shared.csproj (in 66 ms).
  Restored /home/vsts/work/1/s/src/Core/src/Core.csproj (in 108 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/DeviceTests.Runners.SourceGen/TestUtils.DeviceTests.Runners.SourceGen.csproj (in 1.55 sec).
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Release/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Release/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Release/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Release/net10.0-android36.0/Microsoft.Maui.Controls.dll
  TestUtils.DeviceTests -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-android/Microsoft.Maui.TestUtils.DeviceTests.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Release/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils.DeviceTests.Runners -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners/Release/net10.0-android/Microsoft.Maui.TestUtils.DeviceTests.Runners.dll
  Core.DeviceTests.Shared -> /home/vsts/work/1/s/artifacts/bin/Core.DeviceTests.Shared/Release/net10.0-android/Microsoft.Maui.DeviceTests.Shared.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Release/net10.0-android36.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Release/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  TestUtils.DeviceTests.Runners.SourceGen -> /home/vsts/work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners.SourceGen/Release/netstandard2.0/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen.dll
/home/vsts/work/1/s/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs(593,46): error CS0246: The type or namespace name 'IMauiRecyclerViewEmptyView' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj::TargetFramework=net10.0-android]

Build FAILED.

/home/vsts/work/1/s/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs(593,46): error CS0246: The type or namespace name 'IMauiRecyclerViewEmptyView' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj::TargetFramework=net10.0-android]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:06:30.99

🟢 With fix — 📱 CollectionViewTests (RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener, RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener, RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener, RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit, RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared, RecyclerItemSafeAreaEdgesChangeThroughHandlerAppliesAndResetsPadding): PASS ✅ · 598s

(truncated to last 15,000 chars)

rait; 'Category':'SwipeView'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TabbedPage'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TextInput'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Toolbar'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TemplatedView'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElement'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElementTree'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'WebView'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Window'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'WindowOverlay'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Xaml'): [Memory] Gesture Does Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Accessibility'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Application'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Behavior'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Border'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'BoxView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CarouselView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Compatibility'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlexLayout'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutPage'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Frame'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Gesture'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'HybridWebView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Lifecycle'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ListView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Map'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'MenuFlyout'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Mapper'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Excluded test (filtered by Trait; 'Category':'Memory'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Modal'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'NavigationPage'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Path'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Picker'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shape'): [Memory] Cells Do Not Leak
      06-01 04:12:16.099 15118 15149 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shell'): [Memory] Cells Do Not Leak
      06-01 04:12:16.140 15118 15149 I DOTNET  : [Test environment: 64-bit .NET .NET 10.0 [collection-per-class, non-parallel]]
      06-01 04:12:16.140 15118 15149 I DOTNET  : [Test framework: xUnit.net 2.9.0.0]
      06-01 04:12:16.163 15118 15149 I DOTNET  : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
      06-01 04:12:16.596 15118 15149 I DOTNET  : 	[PASS] AlertDialogButtonColorDarkTheme
      06-01 04:12:16.651 15118 15149 I DOTNET  : 	[PASS] AlertDialogButtonColorLightTheme
      06-01 04:12:16.660 15118 15149 I DOTNET  : Microsoft.Maui.DeviceTests.AlertDialogTests 0.3878974 ms
      06-01 04:12:16.662 15118 15149 I DOTNET  : Serialize test because it has to add itself to the main window
      06-01 04:12:16.973 15118 15172 I DOTNET  : 	[PASS] CollectionView SelectionMode None → Single attaches click listeners
      06-01 04:12:17.457 15118 15178 I DOTNET  : 	[PASS] SafeAreaBehaviorConsistency
      06-01 04:12:17.876 15118 15183 I DOTNET  : 	[PASS] SafeAreaBehaviorConsistency
      06-01 04:12:17.891 15118 15183 I DOTNET  : 	[PASS] ObservableCollection modifications are reflected after UI thread processes them
      06-01 04:12:21.702 15118 15189 I DOTNET  : 	[PASS] PushAndPopPageWithCollectionView
      06-01 04:12:21.711 15118 15189 I DOTNET  : 	[IGNORED] CellSizeAccountsForMargin
      06-01 04:12:21.811 15118 15189 I DOTNET  : 	[PASS] RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit
      06-01 04:12:21.813 15118 15189 I DOTNET  : 	[PASS] RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit
      06-01 04:12:21.820 15118 15189 I DOTNET  : 	[PASS] RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener
      06-01 04:12:21.821 15118 15189 I DOTNET  : 	[PASS] RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener
      06-01 04:12:23.213 15118 15195 I DOTNET  : 	[PASS] SwipeView in CollectionView does not crash
      06-01 04:12:23.741 15118 15200 I DOTNET  : 	[PASS] NullItemsSourceDisplaysHeaderFooterAndEmptyView
      06-01 04:12:24.081 15118 15205 I DOTNET  : 	[PASS] RecyclerItemSafeAreaEdgesChangeThroughHandlerAppliesAndResetsPadding
      06-01 04:12:24.085 15118 15205 I DOTNET  : 	[PASS] RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener
      06-01 04:12:24.090 15118 15205 I DOTNET  : 	[PASS] RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener
      06-01 04:12:24.176 15118 15210 I DOTNET  : 	[PASS] CollectionView with SnapPointsType set should not crash
      06-01 04:12:37.370 15118 15342 I DOTNET  : 	[PASS] ItemsSourceDoesNotLeak
      06-01 04:12:37.375 15118 15342 I DOTNET  : 	[PASS] CollectionView SelectionMode Single → None removes click listeners
      06-01 04:12:37.379 15118 15342 I DOTNET  : 	[PASS] CollectionView SelectionMode Single → Multiple keeps click listeners
      06-01 04:12:38.255 15118 15347 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:39.309 15118 15352 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:40.251 15118 15357 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:41.264 15118 15362 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:42.216 15118 15367 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:43.227 15118 15372 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:44.099 15118 15377 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:44.941 15118 15382 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:45.981 15118 15387 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:47.036 15118 15392 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:47.917 15118 15397 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:48.913 15118 15402 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:52.877 15118 15407 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:12:56.750 15118 15414 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:13:00.646 15118 15419 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:13:04.480 15118 15424 I DOTNET  : 	[PASS] CollectionViewCanSizeToContent
      06-01 04:13:04.750 15118 15429 I DOTNET  : 	[PASS] SettingSelectedItemAfterModifyingCollectionDoesntCrash
      06-01 04:13:04.920 15118 15429 I DOTNET  : 	[PASS] RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener
      06-01 04:13:04.921 15118 15429 I DOTNET  : 	[PASS] RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener
      06-01 04:13:05.748 15118 15434 I DOTNET  : 	[PASS] CollectionScrollToUngroupedWorks
      06-01 04:13:06.091 15118 15439 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:06.372 15118 15444 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:06.813 15118 15449 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:07.137 15118 15454 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:07.466 15118 15459 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:07.769 15118 15464 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:08.085 15118 15469 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:08.448 15118 15474 I DOTNET  : 	[PASS] CollectionViewStructuralItems
      06-01 04:13:08.458 15118 15474 I DOTNET  : 	[PASS] CollectionView with SelectionMode None should not have click listeners
      06-01 04:13:08.855 15118 15479 I DOTNET  : 	[PASS] CollectionViewItemsWithFixedWidthAndDifferentHeight
      06-01 04:13:08.858 15118 15479 I DOTNET  : 	[PASS] EmptySource should have a count of zero
      06-01 04:13:09.780 15118 15484 I DOTNET  : 	[PASS] CollectionScrollToGroupWorks
      06-01 04:13:09.782 15118 15484 I DOTNET  : 	[PASS] RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared
      06-01 04:13:09.783 15118 15484 I DOTNET  : 	[PASS] RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared
      06-01 04:13:10.429 15118 15489 I DOTNET  : 	[PASS] ClearingItemsSourceClearsBindingContext
      06-01 04:13:10.436 15118 15489 I DOTNET  : Microsoft.Maui.DeviceTests.CollectionViewTests 53.4236257 ms
      06-01 04:13:10.535 15118 15142 I DOTNET  : Xml file was written to the provided writer.
      06-01 04:13:10.535 15118 15142 I DOTNET  : Tests run: 593 Passed: 55 Inconclusive: 0 Failed: 0 Ignored: 537
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmm79r7",
        "exitCode": 0,
        "exitCodeName": "SUCCESS",
        "platform": "android",
        "instrumentationExitCode": 0,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
  Tests completed successfully

🔴 Without fix — 🧪 SafeAreaTests: 🛠️ BUILD ERROR · 151s
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 1.68 sec).
  Restored /home/vsts/work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 162 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 120 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 74 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/TestUtils/TestUtils.csproj (in 137 ms).
  Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 18 ms).
  Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 53 ms).
  Restored /home/vsts/work/1/s/src/Core/src/Core.csproj (in 171 ms).
  Restored /home/vsts/work/1/s/src/Core/maps/src/Maps.csproj (in 80 ms).
  Restored /home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj (in 4.31 sec).
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0/Microsoft.Maui.Maps.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0/Microsoft.Maui.Controls.Xaml.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0/Microsoft.Maui.Controls.Maps.dll
  TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(260,31): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(265,31): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(276,39): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(297,41): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(307,41): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(315,40): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension method 'HasExplicitSafeAreaEdges' accepting a first argument of type 'ISafeAreaView2' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]

🟢 With fix — 🧪 SafeAreaTests: PASS ✅ · 91s
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 1.52 sec).
  Restored /home/vsts/work/1/s/src/Core/maps/src/Maps.csproj (in 1.66 sec).
  Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 38 ms).
  Restored /home/vsts/work/1/s/src/Core/src/Core.csproj (in 169 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 105 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 69 ms).
  Restored /home/vsts/work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 71 ms).
  Restored /home/vsts/work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 66 ms).
  2 of 10 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0/Microsoft.Maui.Controls.Xaml.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247216
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0/Microsoft.Maui.Controls.Maps.dll
  TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
  Controls.Core.UnitTests -> /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net10.0/Microsoft.Maui.Controls.Core.UnitTests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net10.0/Microsoft.Maui.Controls.Core.UnitTests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.14]   Discovering: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:01.45]   Discovered:  Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:01.46]   Starting:    Microsoft.Maui.Controls.Core.UnitTests
  Passed HasExplicitSafeAreaEdges_BasePageDoesNotCountLegacySafeAreaAsExplicit [8 ms]
  Passed StackLayout_VerticalOrientation_BehavesLikeRegularLayout [7 ms]
  Passed SafeAreaEdgesTypeConverter_AllEnumValues_ConvertCorrectly [8 ms]
  Passed SafeAreaEdges_Equality_WorksCorrectly [< 1 ms]
  Passed Page_ImplementsISafeAreaView [< 1 ms]
  Passed Layout_GetSafeAreaRegionsForEdge_FallsBackToLegacyProperty [1 ms]
  Passed SafeAreaEdges_PropertyAssignment_WorksDirectly [< 1 ms]
  Passed SafeAreaEdges_IndividualConstructor_AppliesCorrectly [< 1 ms]
  Passed SafeAreaEdges_ToString_FormatsCorrectly [3 ms]
  Passed SafeAreaEdgesTypeConverter_CanConvertFromString [< 1 ms]
  Passed HasExplicitSafeAreaEdges_DefaultValueCreationDoesNotCountAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ContentPage)) [3 ms]
  Passed HasExplicitSafeAreaEdges_DefaultValueCreationDoesNotCountAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ScrollView)) [5 ms]
  Passed HasExplicitSafeAreaEdges_DefaultValueCreationDoesNotCountAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.Border)) [4 ms]
  Passed HasExplicitSafeAreaEdges_DefaultValueCreationDoesNotCountAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ContentView)) [2 ms]
  Passed HasExplicitSafeAreaEdges_DefaultValueCreationDoesNotCountAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.Grid)) [< 1 ms]
  Passed HorizontalStackLayout_RespectsDirectProperty_RTL [6 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertToString [3 ms]
  Passed SafeAreaEdges_GetEdge_ReturnsCorrectValues [< 1 ms]
  Passed HasExplicitSafeAreaEdges_ExplicitNoneCountsAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ContentPage)) [< 1 ms]
  Passed HasExplicitSafeAreaEdges_ExplicitNoneCountsAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.Grid)) [< 1 ms]
  Passed HasExplicitSafeAreaEdges_ExplicitNoneCountsAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.Border)) [< 1 ms]
  Passed HasExplicitSafeAreaEdges_ExplicitNoneCountsAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ContentView)) [< 1 ms]
  Passed HasExplicitSafeAreaEdges_ExplicitNoneCountsAsExplicit(safeAreaViewType: typeof(Microsoft.Maui.Controls.ScrollView)) [< 1 ms]
  Passed Page_GetSafeAreaRegionsForEdge_UsesDirectProperty [< 1 ms]
  Passed SafeAreaEdges_TypeConverterWithBinding_SimulatedConversion [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_MixedEnumValues_ConvertCorrectly [< 1 ms]
  Passed SafeArea_CanReplaceUseSafeAreaScenario [16 ms]
  Passed Page_GetSafeAreaRegionsForEdge_DefaultsToNoneForContentPage [< 1 ms]
  Passed GetEdgeValue_UniformValue_AppliesAllEdges [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertFromSingleValue [< 1 ms]
  Passed Layout_GetSafeAreaRegionsForEdge_UsesDirectProperty [< 1 ms]
  Passed SafeAreaEdges_DefaultConstructor_ReturnsNone [< 1 ms]
  Passed ContentView_ImplementsISafeAreaView [< 1 ms]
  Passed SafeAreaEdges_HorizontalVerticalConstructor_AppliesCorrectly [< 1 ms]
  Passed HorizontalStackLayout_BehavesLikeRegularLayout [< 1 ms]
  Passed StackLayout_HorizontalOrientation_BehavesLikeRegularLayout_LTR [< 1 ms]
  Passed ContentView_GetSafeAreaRegionsForEdge_DefaultsToNoneWhenNoPropertySet [< 1 ms]
  Passed SetEdges_SingleValue_AppliedCorrectly [< 1 ms]
  Passed HasExplicitSafeAreaEdges_BindingValueCountsAsExplicit [15 ms]
  Passed SafeAreaEdges_StaticProperties_ReturnCorrectValues [< 1 ms]
  Passed SafeArea_TwoValueShorthand_LeftRightTopBottom [< 1 ms]
  Passed VerticalStackLayout_BehavesLikeRegularLayout [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertFromTwoValues [< 1 ms]
  Passed SafeArea_SupportsPerEdgeControl_IgnoreTopAndBottom [< 1 ms]
  Passed SafeAreaEdges_EnumBitValues_AreUnique [2 ms]
  Passed GetEdgeValue_InvalidEdgeIndex_ReturnsNone [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertFromFourValues [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertFromInvalidValue_ThrowsException [< 1 ms]
  Passed SafeAreaEdges_UniformConstructor_AppliesAllEdges [< 1 ms]
  Passed StackLayouts_RespectUserSettings [13 ms]
  Passed GetEdgeValue_TwoValues_AppliesCorrectly [< 1 ms]
  Passed GetEdgeValue_FourValues_AppliesCorrectly [< 1 ms]
  Passed SafeAreaEdgesTypeConverter_ConvertFromInvalidLength_ThrowsException [< 1 ms]
  Passed Layout_ImplementsISafeAreaView [< 1 ms]
[xUnit.net 00:00:01.64]   Finished:    Microsoft.Maui.Controls.Core.UnitTests
  Passed SafeAreaEdges_AllEnumValues_WorkCorrectly [< 1 ms]
  Passed StackLayout_HorizontalOrientation_RespectsDirectProperty_RTL [< 1 ms]
  Passed GetEdges_DefaultValue_ReturnsDefault [< 1 ms]
  Passed HasExplicitSafeAreaEdges_StyleValueCountsAsExplicit [7 ms]

Test Run Successful.
Total tests: 58
     Passed: 58
 Total time: 2.1487 Seconds

⚠️ Failure Details

  • 🛠️ CollectionViewTests (RecyclerItemWithoutExplicitSafeAreaEdgesDoesNotUseInsetListener, RecyclerItemWithExplicitSafeAreaEdgesUsesInsetListener, RecyclerEmptyViewWithoutExplicitSafeAreaEdgesUsesInsetListener, RecyclerItemSafeAreaRefreshAttachesWhenSafeAreaEdgesBecomesExplicit, RecyclerItemSafeAreaRefreshResetsWhenSafeAreaEdgesIsCleared, RecyclerItemSafeAreaEdgesChangeThroughHandlerAppliesAndResetsPadding) without fix: build failed before tests could run
    • /home/vsts/work/1/s/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.Android.cs(593,46): error CS0246: The type or namespace name 'IMauiRecyclerViewEmptyView' could not be fo...
  • 🛠️ SafeAreaTests without fix: build failed before tests could run
    • /home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/SafeAreaTests.cs(260,31): error CS1061: 'ISafeAreaView2' does not contain a definition for 'HasExplicitSafeAreaEdges' and no accessible extension ...
📁 Fix files reverted (17 files)
  • eng/pipelines/ci-copilot.yml
  • src/Controls/src/Core/BindableObject.cs
  • src/Controls/src/Core/Border/Border.cs
  • src/Controls/src/Core/ContentPage/ContentPage.cs
  • src/Controls/src/Core/ContentView/ContentView.cs
  • src/Controls/src/Core/Handlers/Items/Android/Adapters/EmptyViewAdapter.cs
  • src/Controls/src/Core/Handlers/Items/Android/SimpleViewHolder.cs
  • src/Controls/src/Core/Handlers/Items/Android/SizedItemContentView.cs
  • src/Controls/src/Core/Layout/Layout.cs
  • src/Controls/src/Core/Page/Page.cs
  • src/Controls/src/Core/ScrollView/ScrollView.cs
  • src/Core/src/Core/IMauiRecyclerView.cs
  • src/Core/src/Core/ISafeAreaView2.cs
  • src/Core/src/Platform/Android/ContentViewGroup.cs
  • src/Core/src/Platform/Android/LayoutViewGroup.cs
  • src/Core/src/Platform/Android/MauiScrollView.cs
  • src/Core/src/Platform/Android/MauiWindowInsetListener.cs

UI Tests — Border,CarouselView,CollectionView,Layout,Page,SafeAreaEdges,ScrollView,ViewBaseTests

Detected UI test categories: Border,CarouselView,CollectionView,Layout,Page,SafeAreaEdges,ScrollView,ViewBaseTests

Deep UI tests — 971 passed, 27 failed across 6 categories on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Border 47/47 ✓
CarouselView 86/86 ✓
CollectionView 592/618 (26 ❌)
Layout 191/194 ✓
Page 26/26 ✓
SafeAreaEdges 29/30 (1 ❌) 1 diff PNG
CollectionView — 26 failed tests
VerifyScrollToByIndexWithEndPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByIndexWithEndPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2376
   at System.RuntimeMethodHandl
...
VerifyScrollToByItemWithCenterPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByItemWithCenterPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2628
   at System.RuntimeMethodHan
...
VerifyScrollToByItemWithMakeVisiblePositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByItemWithMakeVisiblePositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2458
   at System.RuntimeMeth
...
VerifyGroupItemScrollToByIndexWithEndPositionAndHorizontalGrid_Potato
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByIndexWithEndPositionAndHorizontalGrid_Potato() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3597
   at System.Runtime
...
VerifyGroupIndexScrollToByIndexWithStartPositionAndVerticalList_Carrot
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithStartPositionAndVerticalList_Carrot() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 1838
   at System.Runtim
...
VerifyGroupIndexScrollToByIndexWithMakeVisiblePositionAndVerticalList_Apricot
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithMakeVisiblePositionAndVerticalList_Apricot() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 1802
   at System
...
CanReorderWithItemDataTemplateSelector
Assert.That(expectedText, Is.EqualTo("Success"))
  Expected string length 7 but was 0. Strings differ at index 0.
  Expected: "Success"
  But was:  <string.Empty>
  -----------^
at Microsoft.Maui.TestCases.Tests.Issues.Issue32223.CanReorderWithItemDataTemplateSelector() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs:line 22
   at InvokeStub_Issue32223.CanReorderWithItemDataTemplateSelector(Object, Object, IntPtr*)

1)    at Microsoft.Maui.TestCases.Tests.Issues.Issue32223.CanReorderWithItemDataTemplateSelector() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs:line 22
   at InvokeStub_Issue32223.CanReorderWithItemDataTemplateSelector(Object, Object, IntPtr*)
VerifyScrollToByIndexWithStartPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByIndexWithStartPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2214
   at System.RuntimeMethodHan
...
VerifyGroupItemScrollToByItemWithMakeVisiblePositionAndVerticalList_Apricot
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByItemWithMakeVisiblePositionAndVerticalList_Apricot() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 1943
   at System.R
...
VerifyGroupItemScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3241
   at System.R
...
VerifyGroupIndexScrollToByIndexWithEndPositionAndHorizontalGrid_Potato
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithEndPositionAndHorizontalGrid_Potato() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3170
   at System.Reflec
...
VerifyGroupIndexScrollToByIndexWithEndPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithEndPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3134
   at System.Reflecti
...
VerifyScrollToByIndexWithCenterPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByIndexWithCenterPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2295
   at System.RuntimeMethodHa
...
VerifyGroupItemScrollToByItemWithStartPositionAndVerticalList_Carrot
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByItemWithStartPositionAndVerticalList_Carrot() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 1974
   at System.RuntimeM
...
VerifyGroupIndexScrollToByIndexWithCenterPositionAndHorizontalList_Tomato
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithCenterPositionAndHorizontalList_Tomato() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3026
   at System.Ref
...
VerifyGroupIndexScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2810
   at System.
...
VerifyScrollToByItemWithStartPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByItemWithStartPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2541
   at System.RuntimeMethodHand
...
VisitAndUpdateItemsSource("Observable Collection","Add/RemoveItemsGrid",19,6)
The app was expected to be running still, investigate as possible crash
TearDown : The app was expected to be running still, investigate as possible crash
at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

--TearDown
   at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

1)    at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeS
...
VerifyScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByIndexWithMakeVisiblePositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2137
   at System.RuntimeMet
...
VerifyGroupItemScrollToByIndexWithEndPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByIndexWithEndPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3561
   at System.RuntimeMe
...
VerifyScrollToByItemWithEndPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyScrollToByItemWithEndPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2715
   at System.RuntimeMethodHandle
...
VerifyGroupIndexScrollToByIndexWithStartPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithStartPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2918
   at System.Runtim
...
VerifyGroupItemScrollToByIndexWithStartPositionAndHorizontalList_Kiwi
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByIndexWithStartPositionAndHorizontalList_Kiwi() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 3345
   at System.Runtime
...
VerifyGroupIndexScrollToByIndexWithCenterPositionAndVerticalList_Potato
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupIndexScrollToByIndexWithCenterPositionAndVerticalList_Potato() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 1874
   at System.Refle
...
VerifyGroupItemScrollToByItemWithCenterPositionAndVerticalList_Potato
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests.CollectionView_ScrollingFeatureTests.VerifyGroupItemScrollToByItemWithCenterPositionAndVerticalList_Potato() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_ScrollingFeatureTests.cs:line 2007
   at System.Runtime
...
CollectionViewHeaderShouldNotScroll
OpenQA.Selenium.StaleElementReferenceException : Cached elements 'By.id: com.microsoft.maui.uitests:id/HeaderEntry' do not exist in DOM anymore; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebElement.Execute(String commandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebElement.get_Location()
   at OpenQA.Selenium.Appium.AppiumElement.get_Rect()
   at UITest.Appium.AppiumGeneralActions.GetRect(IDictionary`2 parameters) in /_/src/TestUtils/src/UITest.Appium/Actions/AppiumGeneralActions.cs:line 51
   at UITest.Appium.AppiumGeneralActions.Execute(St
...
SafeAreaEdges — 1 failed test
LayoutShouldBeCorrectOnFirstNavigation
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: LayoutShouldBeCorrectOnFirstNavigation.png (1.50% 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 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 123
   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 ret
...

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


Pre-Flight — Context & Validation

Issue: #35344 - [10.0.60] CollectionView scrolling performance regression
PR: #35664 - Gate SafeArea inset listeners in recycler items
Platforms Affected: Android
Files Changed: 17 implementation, 2 test

Key Findings

  • The linked issue reports Android CollectionView scrolling GC/allocation regression starting in 10.0.60, with complex item templates amplifying the regression.
  • The PR reduces per-item SafeArea inset listener attachment for CollectionView/CarouselView recycler item descendants, while preserving explicit SafeAreaEdges, EmptyView, AppBarLayout, MaterialToolbar, and MauiScrollView behavior.
  • Test coverage added includes SafeArea explicitness unit tests and Android CollectionView device tests for listener gating, dynamic attach/reset, and EmptyView behavior.

Code Review Summary

Verdict: LGTM
Confidence: medium
Errors: 0 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • No ❌ errors, ⚠️ warnings, or 💡 suggestions.
  • Failure-mode probes: RecyclerView EmptyView and runtime SafeAreaEdges changes are the main subtle Android hierarchy risks; PR tests cover those paths.
  • Blast radius: Android SafeArea listener attachment for platform views under registered parent listener hierarchies, especially CollectionView/CarouselView item views.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35664 Add explicit SafeAreaEdges detection and gate Android recycler item inset listeners unless explicit, preserving EmptyView and dynamic refresh behavior ✅ PASSED (Gate) 17 implementation, 2 test Original PR

Code Review — Deep Analysis

Code Review — PR #35664

Independent Assessment

What this changes: Gates Android SafeArea inset listener attachment for RecyclerView item descendants unless SafeAreaEdges was explicitly set, while preserving EmptyView handling and dynamic refresh/reset behavior.
Inferred motivation: Reduce CollectionView/CarouselView item allocation and GC overhead from unnecessary inset listeners.

Reconciliation with PR Narrative

Author claims: Performance optimization for Android recycler items, preserving explicit SafeArea behavior and EmptyView behavior.
Agreement/disagreement: Matches the code. Existing review comments appear addressed; I found no new actionable issues.

Findings

No ❌ errors, ⚠️ warnings, or 💡 suggestions.

Devil's Advocate

Main risk is Android inset hierarchy subtlety, especially RecyclerView EmptyView and runtime SafeAreaEdges changes. The added tests cover direct refresh and an end-to-end handler-path change. Expert reviewer returned no actionable findings.

CI note: gh is unauthenticated, so I used public API fallback. Public check-runs show no failures, but Build Analysis is still in progress.

Verdict: LGTM

Confidence: medium
Summary: Code approach looks sound and consistent with MAUI Android SafeArea patterns. Do not merge until required CI completes successfully.


Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Value-based recycler gating using SafeAreaEdges != SafeAreaEdges.Default ❌ Failed 12 files Fails because default-value creation can materialize non-default effective values that are not explicit
2 try-fix SafeArea-specific explicitness helper using local-value metadata, no generic BindableObject helper ⚠️ Blocked 18 files Unit tests pass; Android instrumentation hung after build/install
3 try-fix Cached SafeArea explicitness state updated from Element.OnBindablePropertySet ⚠️ Blocked 19 files Unit tests pass; Android XHarness run timed out after executing unrelated tests
PR PR #35664 Generic BindableObject.IsSetExplicitly + Android recycler listener gating, EmptyView marker, dynamic refresh/reset ✅ PASSED (Gate) 17 implementation, 2 test Original PR; gate already passed before this phase

Cross-Pollination

Model Round New Ideas? Details
maui-expert-reviewer 1 Yes Recycler-owned SafeArea inset dispatcher; rejected as too broad/risky for a surgical alternative
maui-expert-reviewer 2 Yes SafeArea-specific explicitness helper using local-value metadata; implemented as candidate #2
maui-expert-reviewer 3 Yes Cached SafeArea explicitness state; implemented as candidate #3
maui-expert-reviewer 4 No Remaining ideas are variations of explicitness detection or a broad recycler dispatcher, not meaningfully better than the PR

Exhausted: Yes
Selected Fix: PR's fix — Gate passed, code review found no issues, and alternatives were either failed or blocked and not demonstrably better. Candidate #2 is the closest alternative but trades the PR's simple specificity helper for SafeArea-specific enumeration and lacks completed Android validation.


Report — Final Recommendation

Comparative Report — PR #35664

Candidates Reviewed

Rank Candidate Result Assessment
1 pr ✅ Passed gate Best candidate. It directly fixes the Android recycler-item SafeArea listener regression, preserves explicit SafeArea behavior and EmptyView semantics, and has completed Android validation.
2 pr-plus-reviewer ✅ Equivalent to pr No actionable reviewer feedback was available to apply, so this candidate is identical to the raw PR. It is safe, but provides no improvement over pr.
3 try-fix-3 ⚠️ Blocked Core SafeArea tests passed, but Android device validation timed out. It also adds Element-level cached explicitness state and cache invalidation complexity that is not justified over the PR.
4 try-fix-2 ⚠️ Blocked Core SafeArea tests passed, but Android instrumentation did not complete. It avoids a generic helper, but is not demonstrably better than the validated PR.
5 try-fix-1 ❌ Failed Failed SafeArea explicitness tests because value-based detection cannot distinguish default-value creation from explicit configuration. This candidate would not reliably fix the recycler listener allocation regression.

Winner

Winner: pr

The raw PR fix is the only non-blocked candidate with completed Android gate validation and no actionable review findings. pr-plus-reviewer is equivalent because no reviewer changes were applied, while all try-fix candidates either failed or lacked completed regression validation; the failed candidate is ranked below all candidates that passed or were merely blocked.


Future Action — review latest findings

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

@kubaflo kubaflo changed the base branch from main to inflight/current June 1, 2026 18:01
Resolve CollectionView Android device test conflict by keeping SafeArea listener coverage and grouped rebind coverage, qualifying the handler ItemViewType reference to avoid Android.Widget ambiguity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kubaflo kubaflo merged commit 8079709 into dotnet:inflight/current Jun 1, 2026
2 of 3 checks passed
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone Jun 1, 2026
@AdamEssenmacher AdamEssenmacher deleted the safearea-listener-gating-fix branch June 1, 2026 18:38
@praveenkumarkarunanithi
Copy link
Copy Markdown
Contributor

praveenkumarkarunanithi commented Jun 2, 2026

Validated locally — issue #34634 is also resolved with this fix.

PureWeen pushed a commit that referenced this pull request Jun 2, 2026
### Description of Change

This PR reduces Android `CollectionView`/`CarouselView` item allocation
overhead from SafeArea inset listener attachment.

The Android SafeArea implementation currently attaches inset listeners
to item views under `IMauiRecyclerView`, even when those item views have
default `SafeAreaEdges` behavior. This is expensive during item
realization/recycling and materially increases allocations and GC
pressure in scroll-heavy CollectionView scenarios.

This change gates Android inset listener attachment for descendants of
`IMauiRecyclerView` so listeners are only attached when the target
platform view backs an `ISafeAreaView2` with explicitly configured
`SafeAreaEdges`.

The fix also preserves behavior for dynamic SafeArea changes:

- default item views do not attach inset listeners;
- explicit `SafeAreaEdges` values, including `SafeAreaEdges.None`,
remain eligible;
- changing from default to explicit refreshes and attaches the listener;
- clearing/changing back to default removes the listener and resets
applied padding;
- existing `AppBarLayout`, `MaterialToolbar`, and `MauiScrollView`
exclusions are preserved.

Validation completed:

- `dotnet test
src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj
--filter FullyQualifiedName~SafeAreaTests --nologo`
- Android device test build and CollectionView SafeArea listener tests
- MauiAppGC repro, Release Android, explicit APK install, `Reset -> End
-> Start -> End`, 5 repeats:
  - `10.0.70`: ~270 MB allocated, `65/2/2` GCs
  - SafeArea gating patch: ~151 MB allocated, `38/0/0` GCs

### Issues Fixed

Fixes #35344

---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jun 2, 2026
#35693)

> [!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!

Backport of #35664 to `release/10.0.1xx-sr7`.
/cc @PureWeen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-safearea Issues/PRs that have to do with the SafeArea functionality community ✨ Community Contribution platform/android s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates 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.

[10.0.60] CollectionView scrolling performance regression

6 participants