Skip to content

[Android] Let ScrollView content scroll under safe-area padding - #40389

Merged
kubaflo merged 3 commits into
dotnet:candidate/11.0.1xx-sr2from
MykhailoDav:fix-37306-android-scrollview-clip-to-padding
Nov 18, 2026
Merged

kubaflo merged 3 commits into
dotnet:candidate/11.0.1xx-sr2from
MykhailoDav:fix-37306-android-scrollview-clip-to-padding

Conversation

@MykhailoDav

Copy link
Copy Markdown
Contributor

Description of Change

On Android, a ScrollView that applies safe-area insets clips its content at those insets while scrolling. Mid-scroll, the ScrollView's background shows as a band below the status bar and above the navigation bar, and the items are cut off at the band's edge. On iOS the content scrolls under the bars and comes to rest clear of them at either end.

MauiScrollView.HandleWindowInsets applies the safe-area insets through SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx, which calls SetPadding on the NestedScrollView. The keyboard path (ApplyAnimatedSoftInputInsetsPx) does the same. Android's default clipToPadding is true, so the scrolling child is clipped at that padding.

The fix calls SetClipToPadding(false) once, when the handler creates the platform view. (ClipToPadding is read-only in the binding, so it can't go in the object initializer.) The native padding on a MauiScrollView only ever comes from safe-area or keyboard insets: ScrollView.Padding has no mapper and is applied to the content by MAUI's own layout. The only other SetPadding that can reach a MauiScrollView is the Shell flyout footer, and it already calls SetClipToPadding(false) on the same view. MauiSwipeView uses the same setting.

The scroll range doesn't change, because NestedScrollView computes it from the padding, not from clipToPadding. On the emulator with 3-button navigation, the last item comes to rest at y=2276 px both with and without the fix. At the top, the first item starts below the status bar as before. Overscroll glow now covers the full height of the view instead of stopping at the padding.

Horizontal and Both orientations still clip at the left and right padding, because the inner HorizontalScrollView is laid out inside it. I left that out of this PR.

Tests

ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled (Controls device test, ScrollView category, Android) puts a blue ScrollView with tall red content on a page with SafeAreaEdges.None. It waits for the safe-area padding, scrolls to 1000 and draws the MauiScrollView into a bitmap with the scroll offset applied, the way its parent draws it. The pixel in the middle of each padding band must match the content in the middle of the viewport, and ClipToPadding must be false. MauiBot's repro in #37524 checked only the property; the pixel check covers the behavior itself.

Total Passed Failed Skipped
Controls ScrollView, without the fix 14 13 1 0
Controls ScrollView, with the fix 14 14 0 0
Core ScrollView, with the fix 87 85 0 2

Without the fix the new test fails with Expected Color [A=255, R=255, G=0, B=0] at point 540,71: the band shows the blue background. The two Core skips are existing Skip attributes. With the fix the Controls run passed with both 3-button and gesture navigation. Runs were on an API 37 emulator, Release arm64.

Before / after (sandbox app, Android emulator API 37, 3-button navigation): the issue's page with SafeAreaEdges="None", an amber ScrollView and white items, scrolled slowly to the middle and then to the end.

Before: mid-scroll, item 4 is cut off below the status bar and only amber shows above the navigation bar After: items 3 and 16 show under the status bar and the navigation bar
before after

Full clips: before.mp4 · after.mp4

Not covered: a real keyboard, Shell, and a NavigationPage with a toolbar. The change is Android-only.

Issues Fixed

Fixes #37306

kubaflo and others added 3 commits November 18, 2026 14:19
…up (dotnet#40381)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Android UI test jobs can lose all tests when the emulator wedges before
it finishes booting. `uitest-prepare` already retries five times
(`RunUITestSetupWithRetry`), but each retry reuses the same emulator.
Every attempt waits another 600 s on that wedged instance. The restart
added in dotnet#40273 runs only before test attempts, not before setup
retries.

Examples:
- net11 UI build 1687571, Android API30 Shadow (log 6089): the emulator
shows `offline` and then "no devices" for about an hour. All 5 setup
attempts wait on the same process, which stays alive until final
cleanup. No tests run.
- Candidate UI build 1686311 CV2 (log 3682) has the same five attempts
with no relaunch. There the device was stuck `unauthorized`.

Change (`eng/devices/android.cake`):
- I extracted the existing dotnet#40273 restart logic into
`RestartEmulatorIfNotBooted(nextStep)`.
- `uitest-prepare` calls it before setup attempts 2–5.
- It restarts only an emulator this script launched, and only when
`sys.boot_completed` is not set. Booted devices and externally provided
devices are untouched.
- `EnsureDeviceForUITestAttempt` keeps its behavior.

The root cause of the emulator wedge is unknown. This change only lets
the retries recover from it.

### Validation

Local, API30 `google_apis_playstore` arm64 AVD, with CI retries enabled
(`AGENT_NAME` set) and an isolated ADB server and home directory. To
simulate the wedge, a watcher sends SIGSTOP to the emulator process 2 s
after launch. This reproduces the CI shape: adb shows `device offline`
and the boot wait fails at 600 s.
- **Baseline (net11 `android.cake`):** attempt 1 failed with "The
emulator did not finish booting in time". Attempt 2 waited again on the
same stopped PID, with no relaunch. **Red.**
- **This PR:** attempt 1 failed the same way. Then "The Android emulator
is not booted; restarting it before retrying UI test setup." The
emulator was killed and relaunched, booted in 15 s, and the APK
installed. Exit 0. **Green.**
- **Control (no wedge):** normal boot, no restart. Exit 0.

The `unauthorized` mode (log 3682) was not reproduced locally. A
relaunch is expected to help it as well, but that is not validated.

### Issues Fixed

Fixes net11 Android UI test jobs lost to an emulator that wedges during
boot (no tracking issue).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

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 -- 40389

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Nov 18, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

This comment has been minimized.

@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 Nov 18, 2026
@kubaflo

kubaflo commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

/rebase

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@MauiBot

MauiBot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@MykhailoDav — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Android


🧪 Gate analysis — click to expand

⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 18, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Expert Review — 1 finding

Reviewed commit ed3f177.

See inline comments for details.

// Mid-scroll, the padding bands must show the same content as the middle of the viewport,
// not the ScrollView's background.
var x = bitmap.Width / 2;
var content = bitmap.ColorAtPoint(x, bitmap.Height / 2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[moderate] Regression Prevention and Test Coverage - The pixel oracle never proves that the red content was drawn: it derives the expected color from the same capture. If the measured inset content host is invisible (retaining its size and scroll range), the center and both padding bands are all blue, so every pixel assertion passes; ScrollY > 0 and ClipToPadding == false do not distinguish this case either. Assert that the center is Colors.Red before comparing the bands, or assert the known red color directly at all sampled points, so missing content cannot satisfy this regression test.

@kubaflo
kubaflo changed the base branch from net11 to candidate/11.0.1xx-sr2 November 18, 2026 19:34
@kubaflo
kubaflo merged commit 86f3abf into dotnet:candidate/11.0.1xx-sr2 Nov 18, 2026
85 of 188 checks passed
kubaflo added a commit that referenced this pull request Nov 18, 2026
### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in #37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes #37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kubaflo kubaflo mentioned this pull request Nov 18, 2026
1 task
kubaflo added a commit that referenced this pull request Nov 18, 2026
### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in #37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes #37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 19, 2026
### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in #37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes #37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 22, 2026
### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in #37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes #37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…40389 (#40512)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This PR targets the SR2 release candidate, `candidate/11.0.1xx-sr2`.
That is where both #39898 (which added the test and baseline) and #40389
(which changed the rendering) merged. The failure exists only on the
candidate. It is the remaining deterministic UI-test failure on #40116.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Test-only change. It refreshes one Android baseline,
`TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`.
The test, tolerance, crop and comparer are unchanged.

**Why the baseline is stale**

- #39898 (merged 11-12) added
`Issue35410.TextRemainsVisibleAfterLandscapeRotation` and its API 36
landscape baseline.
- #40389 ("[Android] Let ScrollView content scroll under safe-area
padding", merged 11-18) made the Android ScrollView stop clipping to its
safe-area padding. Content now draws into the bottom inset while the
padding still applies at the scroll extents. That change did not update
this baseline.
- Since #40389, every candidate run of `Controls SafeAreaEdges (API 36
Pixel 3 XL)` fails this test at **0.54%**, on both the original attempt
and the in-job retry. Examples: UI builds 1688778, 1689023, 1690796,
1694038 and 1694047. The same job passed 185/185 on 1688241, the last
candidate build before #40389.

**What changed in the image** (old baseline vs CI actual, both
2960x1276)

- 89,248 pixels differ by more than 16 levels, all in the bottom 32 rows
(1244–1275). The next row's label is now drawn there instead of the page
background, which is #40389's intended behaviour.
- Above row 1244, 1,104 pixels differ, none by more than 1 level. The
notch-side horizontal inset and all visible text are unchanged, so what
#39898 protects (text staying visible and clear of the notch after
rotation) is still covered.

**The new baseline is deterministic.** It is the CI actual from
candidate UI build 1694038 (run 47304978, result 100184, attachment 11;
sha256 `c80e438e…`). It is pixel-identical (max channel difference 0) to
the actuals from build 1694047 (run 47303796) and build 1690796. Only
the PNG date metadata differs.

**Causal check.** I compiled the repo's unchanged `VisualTestUtils` +
`MagickNetVisualComparer` sources (Magick.NET-Q8-AnyCPU 14.17.2, same
0.005 threshold) into a small harness. I then compared each baseline
revision against the three independent CI actuals:

| Stage | Baseline | 1694038 actual | 1694047 actual | 1690796 actual |
| --- | --- | --- | --- | --- |
| Before (`a61b68cb`) | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Fix (this PR) | new | PASS | PASS | PASS |
| Fix reverted | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Restored | new | PASS | PASS | PASS |

I retried the failed job on builds 1694038 and 1694047 (runs 47309610
and 47309596), producing five more landscape actuals. All five pass
against the new baseline and fail at 0.54% against the old one.

The `Controls SafeAreaEdges (API 36 Pixel 3 XL)` job on this PR's own
UI-test CI is the on-device confirmation.

Maintainers: please confirm the new bottom-inset rendering is the
intended post-#40389 appearance (cc author of #40389). If it is not, the
fix belongs in `ScrollViewHandler.Android.cs`, not in this baseline.

### Issues Fixed

Fixes the candidate-only `Issue35410` Android API 36 UI-test failure on
#40116. There is no separate issue for it. Related: #35410, #39898,
#40389.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…aseline (#40539)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This is a coordinated rollback on `candidate/11.0.1xx-sr2`, where both
reverted PRs landed. Their changes are not present on `net11`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

<!-- Enter description of the fix in this section -->

Restore the Android ScrollView behavior from before #40389 while the
compatibility impact and any future opt-in/opt-out design are
considered.

Revert, in reverse dependency order:

- #40512 (`e3c8b2ec8cb9e6e78a4ddf90aca9dda177c27aa5`): restore the
previous `android-notch-36/Issue35410_Landscape.png` baseline.
- #40389 (candidate commit `93995479185ce7594f4b771cc99a26745e0d23e7`):
remove the unconditional `SetClipToPadding(false)` and remove the device
test requiring content to draw under safe-area padding.

**Behavior:** ordinary Android ScrollViews once again use Android's
default padding clipping. Scrolling content no longer draws into the
native safe-area/keyboard padding bands. Existing special-case behavior,
including Shell flyout overrides, is unchanged.

The three changed paths exactly match their versions immediately before
#40389. The original issue #37306 is intentionally no longer fixed by
this change. The earlier #39898 landscape/notch fix and all unrelated
changes are preserved. Searches for #40389, #37306, clipping-related
follow-ups, and subsequent changes to the affected paths identified
#40512 as the only merged dependent follow-up.

No feature flag or review-workflow changes are included.

**Validation**

- `git diff --cached --check` - passed.
- `git diff --cached --quiet 9399547^ --
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
src/Controls/tests/DeviceTests/Elements/ScrollView/ScrollViewTests.Android.cs
src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`
- passed; exact pre-change source/test/baseline restoration.
- `dotnet format whitespace --folder --include
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
--verify-no-changes` - passed.
- `dotnet build Microsoft.Maui.BuildTasks.slnf -c Release
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false
-p:IncludeMacOSTargetFrameworks=false -v:q` - passed.
- `pwsh -NoProfile -File
.github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project
Controls -Platform android -TestFilter 'Category=ScrollView' -Rebuild
-OutputDirectory <session-artifacts>/scrollview-rollback-final -Timeout
00:10:00` - passed, **13 passed / 0 failed / 0 skipped**, Release arm64
Android API 34 emulator; verified from fresh result XML. The same
full-rebuild command with the candidate's production handler temporarily
restored also passed 13/13. The final source contains the rollback.

Earlier incremental attempts encountered a missing-result-file error and
`DoesNotLeak` GC failures (12/13); these are disclosed rather than
counted as passing. Both full-rebuild comparison runs passed. The
full-solution formatter could not complete with missing unrelated
project references and was stopped; the targeted formatting check above
passed. The default all-platform BuildTasks command failed because the
installed Apple workloads support 27.2 rather than the branch's 27.0;
the Android-scoped prerequisite build passed without repository
configuration changes.

The API 36 notch screenshot UI test was **not run locally**; its
baseline is restored byte-for-byte, and CI still needs to validate that
configuration.

### 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. -->

Reverts #40389 and its dependent baseline update #40512.
Related: #37306, #35410, #39898, #40116.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
#40541)

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

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

#40389 added an unconditional `SetClipToPadding(false)` to the Android
`ScrollViewHandler`. That changed rendering for every Android
`ScrollView` with safe-area padding, without an opt-in, and was reverted
by #40539 (analysis:
#37306 (comment)).
None of the existing 31 expert-reviewer dimensions flags this: #12
covers API removal and Xamarin migration, and #14 covers
restore-on-clear of native defaults.

This PR adds dimension **#32 Behavioral Change Disclosure `[major]`** to
`maui-expert-reviewer.md`:
- It flags unconditional native-default overrides in
`CreatePlatformView`/`ConnectHandler`, changed default values, modified
`snapshots/**` baselines, and observable event order/timing changes.
- Every finding must state the before → after behavior, the triggering
configuration, and the missing opt-in/opt-out.
- Servicing targets need an opt-in that keeps the old behavior by
default; `main` needs an opt-out plus a breaking-change note. Aligning
with native behavior is not a reason to skip the opt-in.
- Routing: `src/{Core,Controls,Essentials}/src/**` → #32;
`src/Controls/tests/*/snapshots/**` images → #32 and Regression
Prevention.
- Its severity is capped at `[major]`, like #31.

The trusted collector `.github/scripts/Review-Expert.ps1` is updated to
match: the dimension bounds go from 31 to 32, the two routing rules are
added, the `[major]` cap is enforced for #32, and the routing-section
SHA256 pin is recomputed. The adapter and docs now say 32. No
`.lock.yml` changes are needed.

**Validation** (pwsh, loading the script's functions from its AST):
- Recomputing the routing hash on `main`'s rulebook reproduces the old
pin `b1cf5130…`. The new pin is `f565395e…`.
- `Get-ExpertDimensionNames` → 32 names; #32 = "Behavioral Change
Disclosure".
- `Get-ExpertExpectedDimensions` for #40389's files → includes 32. For
#40512's refreshed snapshot PNG → `5,6,16,32`. For a docs-only change →
`5,6,16`, unchanged.
- `Get-ExpertDimensions @(1..32)` passes; `@(33)` is rejected.
- `git diff --check` is clean.

### Issues Fixed

Relates to #37306

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).
Review tooling runs from the default branch, so this targets `main`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

**Depends on #40541; merge after it.** #40541 adds dimension 32,
*Behavioral Change Disclosure* `[major]`, to the expert reviewer. This
PR makes those findings visible in the review's summary comment (the one
with the finding count), so a change existing apps didn't opt into
doesn't get lost among the inline comments.

When a review has Behavioral Change Disclosure findings, the summary
comment:

- counts them as breaking changes in the heading, e.g. `## Expert Review
— 3 findings · ⚠️ 2 breaking changes`;
- adds a warning callout that links each location in the reviewed
commit. Findings that couldn't be attached inline are counted rather
than linked.

Example from a DryRun against #40389 with synthetic findings:

```markdown
## Expert Review — 3 findings · ⚠️ 2 breaking changes

> [!WARNING]
> Existing apps would look or behave differently without opting in. See the `Behavioral Change Disclosure` findings at:
> - [`src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs` line 22](https://github.com/dotnet/maui/blob/ed3f177ab37a77e4ae68498fc35198bf07f36239/src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs?plain=1#L22)
> - 1 more could not be attached inline.

See inline comments for details.
```

Details:

- The summary gets only counts and location links, never finding text;
the inline comments keep the details. In the gh-aw lane the body still
goes through the pinned gh-aw sanitizer, and paths the sanitizer would
alter are labelled "changed file".
- A finding counts only when the dimension's label starts a line
(case-sensitive). A grouped entry counts when its #32 part starts on its
own line; mentions in prose don't count. #40541's `[major]` cap check is
unchanged.
- Reviews without such findings get the same summary as today; in the
gh-aw lane it is byte-identical.
- The Azure DevOps lane (`post-inline-review.ps1`) generates the same
heading and callout when no `review-summary.md` is supplied, which is
the normal path. Its fallback heading now says "1 finding" instead of "1
findings".
- The rulebook and workflow prompt tell reviewers to start the #32 part
of a grouped entry on its own line, and to keep #32 findings first among
equal-severity findings when trimming to 15.
- In the lock file, only `body_hash` changes (gh-aw v0.86.2).

Why: the expert review of #40389 ([review
5960194563](#40389 (review)))
posted one test-coverage finding and said nothing about its
`scrollView.SetClipToPadding(false)` change to Android `ScrollView`
clipping. #40512 later had to refresh an Android screenshot baseline
after #40389. #40541 adds the dimension that catches this; this PR
surfaces it in the summary.

#### Validation

- `gh aw compile copilot-review-expert` (gh-aw v0.86.2): **passed**, 0
warnings. Only the lock's `body_hash` changed.
- `pwsh -Command "Invoke-Pester -Path
.github/scripts/Post-InlineReview.Tests.ps1"`: **passed**, 7/7.
- `pwsh .github/scripts/post-inline-review.ps1 -PRNumber 40389
-FindingsFile <3 synthetic findings> -ReviewedCommit
ed3f177 -DryRun`: **passed** (exit 0),
output shown above. The diff filter dropped the out-of-diff finding,
which was counted as "1 more".
- Local throwaway harnesses that run the extracted publisher code: **0
failures**. They aren't committed because this repo doesn't add tests
for CI scripts. Cases:
  - mixed, singular and withheld-only findings;
  - wrong case, plural and mid-line labels, none of which are counted;
  - no #32 findings, byte-identical to `main`;
  - a round trip through the pinned gh-aw `sanitize_content.cjs`.
- The same checks with this diff applied on #40541's head (`85fc7f1e`):
the diff applied cleanly and the routing pin `f565395e…` still matches
with 32 dimensions. `Get-ExpertFindings` accepts a `[major]` #32
finding, which is counted, and rejects `[moderate]`. Harnesses had 0
failures, Pester passed 7/7, and the recompiled lock was identical.
- `git diff --check`: **clean**.

Not run: a live `/review expert-review`. The workflow runs from the
default branch, so it needs a canary run after merge.

### 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. -->

None filed; follow-up to #40541.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in #37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes #37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…40389 (#40512)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This PR targets the SR2 release candidate, `candidate/11.0.1xx-sr2`.
That is where both #39898 (which added the test and baseline) and #40389
(which changed the rendering) merged. The failure exists only on the
candidate. It is the remaining deterministic UI-test failure on #40116.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Test-only change. It refreshes one Android baseline,
`TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`.
The test, tolerance, crop and comparer are unchanged.

**Why the baseline is stale**

- #39898 (merged 11-12) added
`Issue35410.TextRemainsVisibleAfterLandscapeRotation` and its API 36
landscape baseline.
- #40389 ("[Android] Let ScrollView content scroll under safe-area
padding", merged 11-18) made the Android ScrollView stop clipping to its
safe-area padding. Content now draws into the bottom inset while the
padding still applies at the scroll extents. That change did not update
this baseline.
- Since #40389, every candidate run of `Controls SafeAreaEdges (API 36
Pixel 3 XL)` fails this test at **0.54%**, on both the original attempt
and the in-job retry. Examples: UI builds 1688778, 1689023, 1690796,
1694038 and 1694047. The same job passed 185/185 on 1688241, the last
candidate build before #40389.

**What changed in the image** (old baseline vs CI actual, both
2960x1276)

- 89,248 pixels differ by more than 16 levels, all in the bottom 32 rows
(1244–1275). The next row's label is now drawn there instead of the page
background, which is #40389's intended behaviour.
- Above row 1244, 1,104 pixels differ, none by more than 1 level. The
notch-side horizontal inset and all visible text are unchanged, so what
#39898 protects (text staying visible and clear of the notch after
rotation) is still covered.

**The new baseline is deterministic.** It is the CI actual from
candidate UI build 1694038 (run 47304978, result 100184, attachment 11;
sha256 `c80e438e…`). It is pixel-identical (max channel difference 0) to
the actuals from build 1694047 (run 47303796) and build 1690796. Only
the PNG date metadata differs.

**Causal check.** I compiled the repo's unchanged `VisualTestUtils` +
`MagickNetVisualComparer` sources (Magick.NET-Q8-AnyCPU 14.17.2, same
0.005 threshold) into a small harness. I then compared each baseline
revision against the three independent CI actuals:

| Stage | Baseline | 1694038 actual | 1694047 actual | 1690796 actual |
| --- | --- | --- | --- | --- |
| Before (`a61b68cb`) | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Fix (this PR) | new | PASS | PASS | PASS |
| Fix reverted | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Restored | new | PASS | PASS | PASS |

I retried the failed job on builds 1694038 and 1694047 (runs 47309610
and 47309596), producing five more landscape actuals. All five pass
against the new baseline and fail at 0.54% against the old one.

The `Controls SafeAreaEdges (API 36 Pixel 3 XL)` job on this PR's own
UI-test CI is the on-device confirmation.

Maintainers: please confirm the new bottom-inset rendering is the
intended post-#40389 appearance (cc author of #40389). If it is not, the
fix belongs in `ScrollViewHandler.Android.cs`, not in this baseline.

### Issues Fixed

Fixes the candidate-only `Issue35410` Android API 36 UI-test failure on
#40116. There is no separate issue for it. Related: #35410, #39898,
#40389.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…aseline (#40539)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This is a coordinated rollback on `candidate/11.0.1xx-sr2`, where both
reverted PRs landed. Their changes are not present on `net11`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

<!-- Enter description of the fix in this section -->

Restore the Android ScrollView behavior from before #40389 while the
compatibility impact and any future opt-in/opt-out design are
considered.

Revert, in reverse dependency order:

- #40512 (`e3c8b2ec8cb9e6e78a4ddf90aca9dda177c27aa5`): restore the
previous `android-notch-36/Issue35410_Landscape.png` baseline.
- #40389 (candidate commit `93995479185ce7594f4b771cc99a26745e0d23e7`):
remove the unconditional `SetClipToPadding(false)` and remove the device
test requiring content to draw under safe-area padding.

**Behavior:** ordinary Android ScrollViews once again use Android's
default padding clipping. Scrolling content no longer draws into the
native safe-area/keyboard padding bands. Existing special-case behavior,
including Shell flyout overrides, is unchanged.

The three changed paths exactly match their versions immediately before
#40389. The original issue #37306 is intentionally no longer fixed by
this change. The earlier #39898 landscape/notch fix and all unrelated
changes are preserved. Searches for #40389, #37306, clipping-related
follow-ups, and subsequent changes to the affected paths identified
#40512 as the only merged dependent follow-up.

No feature flag or review-workflow changes are included.

**Validation**

- `git diff --cached --check` - passed.
- `git diff --cached --quiet 9399547^ --
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
src/Controls/tests/DeviceTests/Elements/ScrollView/ScrollViewTests.Android.cs
src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`
- passed; exact pre-change source/test/baseline restoration.
- `dotnet format whitespace --folder --include
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
--verify-no-changes` - passed.
- `dotnet build Microsoft.Maui.BuildTasks.slnf -c Release
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false
-p:IncludeMacOSTargetFrameworks=false -v:q` - passed.
- `pwsh -NoProfile -File
.github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project
Controls -Platform android -TestFilter 'Category=ScrollView' -Rebuild
-OutputDirectory <session-artifacts>/scrollview-rollback-final -Timeout
00:10:00` - passed, **13 passed / 0 failed / 0 skipped**, Release arm64
Android API 34 emulator; verified from fresh result XML. The same
full-rebuild command with the candidate's production handler temporarily
restored also passed 13/13. The final source contains the rollback.

Earlier incremental attempts encountered a missing-result-file error and
`DoesNotLeak` GC failures (12/13); these are disclosed rather than
counted as passing. Both full-rebuild comparison runs passed. The
full-solution formatter could not complete with missing unrelated
project references and was stopped; the targeted formatting check above
passed. The default all-platform BuildTasks command failed because the
installed Apple workloads support 27.2 rather than the branch's 27.0;
the Android-scoped prerequisite build passed without repository
configuration changes.

The API 36 notch screenshot UI test was **not run locally**; its
baseline is restored byte-for-byte, and CI still needs to validate that
configuration.

### 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. -->

Reverts #40389 and its dependent baseline update #40512.
Related: #37306, #35410, #39898, #40116.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Nov 24, 2026
dotnet#40541)

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

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

dotnet#40389 added an unconditional `SetClipToPadding(false)` to the Android
`ScrollViewHandler`. That changed rendering for every Android
`ScrollView` with safe-area padding, without an opt-in, and was reverted
by dotnet#40539 (analysis:
dotnet#37306 (comment)).
None of the existing 31 expert-reviewer dimensions flags this: #12
covers API removal and Xamarin migration, and #14 covers
restore-on-clear of native defaults.

This PR adds dimension **#32 Behavioral Change Disclosure `[major]`** to
`maui-expert-reviewer.md`:
- It flags unconditional native-default overrides in
`CreatePlatformView`/`ConnectHandler`, changed default values, modified
`snapshots/**` baselines, and observable event order/timing changes.
- Every finding must state the before → after behavior, the triggering
configuration, and the missing opt-in/opt-out.
- Servicing targets need an opt-in that keeps the old behavior by
default; `main` needs an opt-out plus a breaking-change note. Aligning
with native behavior is not a reason to skip the opt-in.
- Routing: `src/{Core,Controls,Essentials}/src/**` → #32;
`src/Controls/tests/*/snapshots/**` images → #32 and Regression
Prevention.
- Its severity is capped at `[major]`, like #31.

The trusted collector `.github/scripts/Review-Expert.ps1` is updated to
match: the dimension bounds go from 31 to 32, the two routing rules are
added, the `[major]` cap is enforced for #32, and the routing-section
SHA256 pin is recomputed. The adapter and docs now say 32. No
`.lock.yml` changes are needed.

**Validation** (pwsh, loading the script's functions from its AST):
- Recomputing the routing hash on `main`'s rulebook reproduces the old
pin `b1cf5130…`. The new pin is `f565395e…`.
- `Get-ExpertDimensionNames` → 32 names; #32 = "Behavioral Change
Disclosure".
- `Get-ExpertExpectedDimensions` for dotnet#40389's files → includes 32. For
dotnet#40512's refreshed snapshot PNG → `5,6,16,32`. For a docs-only change →
`5,6,16`, unchanged.
- `Get-ExpertDimensions @(1..32)` passes; `@(33)` is rejected.
- `git diff --check` is clean.

### Issues Fixed

Relates to dotnet#37306

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Nov 24, 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).
Review tooling runs from the default branch, so this targets `main`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

**Depends on dotnet#40541; merge after it.** dotnet#40541 adds dimension 32,
*Behavioral Change Disclosure* `[major]`, to the expert reviewer. This
PR makes those findings visible in the review's summary comment (the one
with the finding count), so a change existing apps didn't opt into
doesn't get lost among the inline comments.

When a review has Behavioral Change Disclosure findings, the summary
comment:

- counts them as breaking changes in the heading, e.g. `## Expert Review
— 3 findings · ⚠️ 2 breaking changes`;
- adds a warning callout that links each location in the reviewed
commit. Findings that couldn't be attached inline are counted rather
than linked.

Example from a DryRun against dotnet#40389 with synthetic findings:

```markdown
## Expert Review — 3 findings · ⚠️ 2 breaking changes

> [!WARNING]
> Existing apps would look or behave differently without opting in. See the `Behavioral Change Disclosure` findings at:
> - [`src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs` line 22](https://github.com/dotnet/maui/blob/ed3f177ab37a77e4ae68498fc35198bf07f36239/src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs?plain=1#L22)
> - 1 more could not be attached inline.

See inline comments for details.
```

Details:

- The summary gets only counts and location links, never finding text;
the inline comments keep the details. In the gh-aw lane the body still
goes through the pinned gh-aw sanitizer, and paths the sanitizer would
alter are labelled "changed file".
- A finding counts only when the dimension's label starts a line
(case-sensitive). A grouped entry counts when its #32 part starts on its
own line; mentions in prose don't count. dotnet#40541's `[major]` cap check is
unchanged.
- Reviews without such findings get the same summary as today; in the
gh-aw lane it is byte-identical.
- The Azure DevOps lane (`post-inline-review.ps1`) generates the same
heading and callout when no `review-summary.md` is supplied, which is
the normal path. Its fallback heading now says "1 finding" instead of "1
findings".
- The rulebook and workflow prompt tell reviewers to start the #32 part
of a grouped entry on its own line, and to keep #32 findings first among
equal-severity findings when trimming to 15.
- In the lock file, only `body_hash` changes (gh-aw v0.86.2).

Why: the expert review of dotnet#40389 ([review
5960194563](dotnet#40389 (review)))
posted one test-coverage finding and said nothing about its
`scrollView.SetClipToPadding(false)` change to Android `ScrollView`
clipping. dotnet#40512 later had to refresh an Android screenshot baseline
after dotnet#40389. dotnet#40541 adds the dimension that catches this; this PR
surfaces it in the summary.

#### Validation

- `gh aw compile copilot-review-expert` (gh-aw v0.86.2): **passed**, 0
warnings. Only the lock's `body_hash` changed.
- `pwsh -Command "Invoke-Pester -Path
.github/scripts/Post-InlineReview.Tests.ps1"`: **passed**, 7/7.
- `pwsh .github/scripts/post-inline-review.ps1 -PRNumber 40389
-FindingsFile <3 synthetic findings> -ReviewedCommit
ed3f177 -DryRun`: **passed** (exit 0),
output shown above. The diff filter dropped the out-of-diff finding,
which was counted as "1 more".
- Local throwaway harnesses that run the extracted publisher code: **0
failures**. They aren't committed because this repo doesn't add tests
for CI scripts. Cases:
  - mixed, singular and withheld-only findings;
  - wrong case, plural and mid-line labels, none of which are counted;
  - no #32 findings, byte-identical to `main`;
  - a round trip through the pinned gh-aw `sanitize_content.cjs`.
- The same checks with this diff applied on dotnet#40541's head (`85fc7f1e`):
the diff applied cleanly and the routing pin `f565395e…` still matches
with 32 dimensions. `Get-ExpertFindings` accepts a `[major]` #32
finding, which is counted, and rejects `[moderate]`. Harnesses had 0
failures, Pester passed 7/7, and the recompiled lock was identical.
- `git diff --check`: **clean**.

Not run: a live `/review expert-review`. The workflow runs from the
default branch, so it needs a canary run after merge.

### 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. -->

None filed; follow-up to dotnet#40541.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Nov 24, 2026
…aseline (dotnet#40539)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This is a coordinated rollback on `candidate/11.0.1xx-sr2`, where both
reverted PRs landed. Their changes are not present on `net11`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

<!-- Enter description of the fix in this section -->

Restore the Android ScrollView behavior from before dotnet#40389 while the
compatibility impact and any future opt-in/opt-out design are
considered.

Revert, in reverse dependency order:

- dotnet#40512 (`e3c8b2ec8cb9e6e78a4ddf90aca9dda177c27aa5`): restore the
previous `android-notch-36/Issue35410_Landscape.png` baseline.
- dotnet#40389 (candidate commit `93995479185ce7594f4b771cc99a26745e0d23e7`):
remove the unconditional `SetClipToPadding(false)` and remove the device
test requiring content to draw under safe-area padding.

**Behavior:** ordinary Android ScrollViews once again use Android's
default padding clipping. Scrolling content no longer draws into the
native safe-area/keyboard padding bands. Existing special-case behavior,
including Shell flyout overrides, is unchanged.

The three changed paths exactly match their versions immediately before
dotnet#40389. The original issue dotnet#37306 is intentionally no longer fixed by
this change. The earlier dotnet#39898 landscape/notch fix and all unrelated
changes are preserved. Searches for dotnet#40389, dotnet#37306, clipping-related
follow-ups, and subsequent changes to the affected paths identified
dotnet#40512 as the only merged dependent follow-up.

No feature flag or review-workflow changes are included.

**Validation**

- `git diff --cached --check` - passed.
- `git diff --cached --quiet 9399547^ --
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
src/Controls/tests/DeviceTests/Elements/ScrollView/ScrollViewTests.Android.cs
src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`
- passed; exact pre-change source/test/baseline restoration.
- `dotnet format whitespace --folder --include
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
--verify-no-changes` - passed.
- `dotnet build Microsoft.Maui.BuildTasks.slnf -c Release
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false
-p:IncludeMacOSTargetFrameworks=false -v:q` - passed.
- `pwsh -NoProfile -File
.github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project
Controls -Platform android -TestFilter 'Category=ScrollView' -Rebuild
-OutputDirectory <session-artifacts>/scrollview-rollback-final -Timeout
00:10:00` - passed, **13 passed / 0 failed / 0 skipped**, Release arm64
Android API 34 emulator; verified from fresh result XML. The same
full-rebuild command with the candidate's production handler temporarily
restored also passed 13/13. The final source contains the rollback.

Earlier incremental attempts encountered a missing-result-file error and
`DoesNotLeak` GC failures (12/13); these are disclosed rather than
counted as passing. Both full-rebuild comparison runs passed. The
full-solution formatter could not complete with missing unrelated
project references and was stopped; the targeted formatting check above
passed. The default all-platform BuildTasks command failed because the
installed Apple workloads support 27.2 rather than the branch's 27.0;
the Android-scoped prerequisite build passed without repository
configuration changes.

The API 36 notch screenshot UI test was **not run locally**; its
baseline is restored byte-for-byte, and CI still needs to validate that
configuration.

### 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. -->

Reverts dotnet#40389 and its dependent baseline update dotnet#40512.
Related: dotnet#37306, dotnet#35410, dotnet#39898, dotnet#40116.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
HarishwaranVijayakumar pushed a commit to HarishwaranVijayakumar/maui that referenced this pull request Nov 24, 2026
dotnet#40541)

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

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

dotnet#40389 added an unconditional `SetClipToPadding(false)` to the Android
`ScrollViewHandler`. That changed rendering for every Android
`ScrollView` with safe-area padding, without an opt-in, and was reverted
by dotnet#40539 (analysis:
dotnet#37306 (comment)).
None of the existing 31 expert-reviewer dimensions flags this: #12
covers API removal and Xamarin migration, and #14 covers
restore-on-clear of native defaults.

This PR adds dimension **#32 Behavioral Change Disclosure `[major]`** to
`maui-expert-reviewer.md`:
- It flags unconditional native-default overrides in
`CreatePlatformView`/`ConnectHandler`, changed default values, modified
`snapshots/**` baselines, and observable event order/timing changes.
- Every finding must state the before → after behavior, the triggering
configuration, and the missing opt-in/opt-out.
- Servicing targets need an opt-in that keeps the old behavior by
default; `main` needs an opt-out plus a breaking-change note. Aligning
with native behavior is not a reason to skip the opt-in.
- Routing: `src/{Core,Controls,Essentials}/src/**` → #32;
`src/Controls/tests/*/snapshots/**` images → #32 and Regression
Prevention.
- Its severity is capped at `[major]`, like #31.

The trusted collector `.github/scripts/Review-Expert.ps1` is updated to
match: the dimension bounds go from 31 to 32, the two routing rules are
added, the `[major]` cap is enforced for #32, and the routing-section
SHA256 pin is recomputed. The adapter and docs now say 32. No
`.lock.yml` changes are needed.

**Validation** (pwsh, loading the script's functions from its AST):
- Recomputing the routing hash on `main`'s rulebook reproduces the old
pin `b1cf5130…`. The new pin is `f565395e…`.
- `Get-ExpertDimensionNames` → 32 names; #32 = "Behavioral Change
Disclosure".
- `Get-ExpertExpectedDimensions` for dotnet#40389's files → includes 32. For
dotnet#40512's refreshed snapshot PNG → `5,6,16,32`. For a docs-only change →
`5,6,16`, unchanged.
- `Get-ExpertDimensions @(1..32)` passes; `@(33)` is rejected.
- `git diff --check` is clean.

### Issues Fixed

Relates to dotnet#37306

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
HarishwaranVijayakumar pushed a commit to HarishwaranVijayakumar/maui that referenced this pull request Nov 24, 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).
Review tooling runs from the default branch, so this targets `main`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

**Depends on dotnet#40541; merge after it.** dotnet#40541 adds dimension 32,
*Behavioral Change Disclosure* `[major]`, to the expert reviewer. This
PR makes those findings visible in the review's summary comment (the one
with the finding count), so a change existing apps didn't opt into
doesn't get lost among the inline comments.

When a review has Behavioral Change Disclosure findings, the summary
comment:

- counts them as breaking changes in the heading, e.g. `## Expert Review
— 3 findings · ⚠️ 2 breaking changes`;
- adds a warning callout that links each location in the reviewed
commit. Findings that couldn't be attached inline are counted rather
than linked.

Example from a DryRun against dotnet#40389 with synthetic findings:

```markdown
## Expert Review — 3 findings · ⚠️ 2 breaking changes

> [!WARNING]
> Existing apps would look or behave differently without opting in. See the `Behavioral Change Disclosure` findings at:
> - [`src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs` line 22](https://github.com/dotnet/maui/blob/ed3f177ab37a77e4ae68498fc35198bf07f36239/src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs?plain=1#L22)
> - 1 more could not be attached inline.

See inline comments for details.
```

Details:

- The summary gets only counts and location links, never finding text;
the inline comments keep the details. In the gh-aw lane the body still
goes through the pinned gh-aw sanitizer, and paths the sanitizer would
alter are labelled "changed file".
- A finding counts only when the dimension's label starts a line
(case-sensitive). A grouped entry counts when its #32 part starts on its
own line; mentions in prose don't count. dotnet#40541's `[major]` cap check is
unchanged.
- Reviews without such findings get the same summary as today; in the
gh-aw lane it is byte-identical.
- The Azure DevOps lane (`post-inline-review.ps1`) generates the same
heading and callout when no `review-summary.md` is supplied, which is
the normal path. Its fallback heading now says "1 finding" instead of "1
findings".
- The rulebook and workflow prompt tell reviewers to start the #32 part
of a grouped entry on its own line, and to keep #32 findings first among
equal-severity findings when trimming to 15.
- In the lock file, only `body_hash` changes (gh-aw v0.86.2).

Why: the expert review of dotnet#40389 ([review
5960194563](dotnet#40389 (review)))
posted one test-coverage finding and said nothing about its
`scrollView.SetClipToPadding(false)` change to Android `ScrollView`
clipping. dotnet#40512 later had to refresh an Android screenshot baseline
after dotnet#40389. dotnet#40541 adds the dimension that catches this; this PR
surfaces it in the summary.

#### Validation

- `gh aw compile copilot-review-expert` (gh-aw v0.86.2): **passed**, 0
warnings. Only the lock's `body_hash` changed.
- `pwsh -Command "Invoke-Pester -Path
.github/scripts/Post-InlineReview.Tests.ps1"`: **passed**, 7/7.
- `pwsh .github/scripts/post-inline-review.ps1 -PRNumber 40389
-FindingsFile <3 synthetic findings> -ReviewedCommit
ed3f177 -DryRun`: **passed** (exit 0),
output shown above. The diff filter dropped the out-of-diff finding,
which was counted as "1 more".
- Local throwaway harnesses that run the extracted publisher code: **0
failures**. They aren't committed because this repo doesn't add tests
for CI scripts. Cases:
  - mixed, singular and withheld-only findings;
  - wrong case, plural and mid-line labels, none of which are counted;
  - no #32 findings, byte-identical to `main`;
  - a round trip through the pinned gh-aw `sanitize_content.cjs`.
- The same checks with this diff applied on dotnet#40541's head (`85fc7f1e`):
the diff applied cleanly and the routing pin `f565395e…` still matches
with 32 dimensions. `Get-ExpertFindings` accepts a `[major]` #32
finding, which is counted, and rejects `[moderate]`. Harnesses had 0
failures, Pester passed 7/7, and the recompiled lock was identical.
- `git diff --check`: **clean**.

Not run: a live `/review expert-review`. The workflow runs from the
default branch, so it needs a canary run after merge.

### 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. -->

None filed; follow-up to dotnet#40541.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
dotnet#40541)

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

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

dotnet#40389 added an unconditional `SetClipToPadding(false)` to the Android
`ScrollViewHandler`. That changed rendering for every Android
`ScrollView` with safe-area padding, without an opt-in, and was reverted
by dotnet#40539 (analysis:
dotnet#37306 (comment)).
None of the existing 31 expert-reviewer dimensions flags this: #12
covers API removal and Xamarin migration, and #14 covers
restore-on-clear of native defaults.

This PR adds dimension **#32 Behavioral Change Disclosure `[major]`** to
`maui-expert-reviewer.md`:
- It flags unconditional native-default overrides in
`CreatePlatformView`/`ConnectHandler`, changed default values, modified
`snapshots/**` baselines, and observable event order/timing changes.
- Every finding must state the before → after behavior, the triggering
configuration, and the missing opt-in/opt-out.
- Servicing targets need an opt-in that keeps the old behavior by
default; `main` needs an opt-out plus a breaking-change note. Aligning
with native behavior is not a reason to skip the opt-in.
- Routing: `src/{Core,Controls,Essentials}/src/**` → #32;
`src/Controls/tests/*/snapshots/**` images → #32 and Regression
Prevention.
- Its severity is capped at `[major]`, like #31.

The trusted collector `.github/scripts/Review-Expert.ps1` is updated to
match: the dimension bounds go from 31 to 32, the two routing rules are
added, the `[major]` cap is enforced for #32, and the routing-section
SHA256 pin is recomputed. The adapter and docs now say 32. No
`.lock.yml` changes are needed.

**Validation** (pwsh, loading the script's functions from its AST):
- Recomputing the routing hash on `main`'s rulebook reproduces the old
pin `b1cf5130…`. The new pin is `f565395e…`.
- `Get-ExpertDimensionNames` → 32 names; #32 = "Behavioral Change
Disclosure".
- `Get-ExpertExpectedDimensions` for dotnet#40389's files → includes 32. For
dotnet#40512's refreshed snapshot PNG → `5,6,16,32`. For a docs-only change →
`5,6,16`, unchanged.
- `Get-ExpertDimensions @(1..32)` passes; `@(33)` is rejected.
- `git diff --check` is clean.

### Issues Fixed

Relates to dotnet#37306

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).
Review tooling runs from the default branch, so this targets `main`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

**Depends on dotnet#40541; merge after it.** dotnet#40541 adds dimension 32,
*Behavioral Change Disclosure* `[major]`, to the expert reviewer. This
PR makes those findings visible in the review's summary comment (the one
with the finding count), so a change existing apps didn't opt into
doesn't get lost among the inline comments.

When a review has Behavioral Change Disclosure findings, the summary
comment:

- counts them as breaking changes in the heading, e.g. `## Expert Review
— 3 findings · ⚠️ 2 breaking changes`;
- adds a warning callout that links each location in the reviewed
commit. Findings that couldn't be attached inline are counted rather
than linked.

Example from a DryRun against dotnet#40389 with synthetic findings:

```markdown
## Expert Review — 3 findings · ⚠️ 2 breaking changes

> [!WARNING]
> Existing apps would look or behave differently without opting in. See the `Behavioral Change Disclosure` findings at:
> - [`src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs` line 22](https://github.com/dotnet/maui/blob/ed3f177ab37a77e4ae68498fc35198bf07f36239/src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs?plain=1#L22)
> - 1 more could not be attached inline.

See inline comments for details.
```

Details:

- The summary gets only counts and location links, never finding text;
the inline comments keep the details. In the gh-aw lane the body still
goes through the pinned gh-aw sanitizer, and paths the sanitizer would
alter are labelled "changed file".
- A finding counts only when the dimension's label starts a line
(case-sensitive). A grouped entry counts when its #32 part starts on its
own line; mentions in prose don't count. dotnet#40541's `[major]` cap check is
unchanged.
- Reviews without such findings get the same summary as today; in the
gh-aw lane it is byte-identical.
- The Azure DevOps lane (`post-inline-review.ps1`) generates the same
heading and callout when no `review-summary.md` is supplied, which is
the normal path. Its fallback heading now says "1 finding" instead of "1
findings".
- The rulebook and workflow prompt tell reviewers to start the #32 part
of a grouped entry on its own line, and to keep #32 findings first among
equal-severity findings when trimming to 15.
- In the lock file, only `body_hash` changes (gh-aw v0.86.2).

Why: the expert review of dotnet#40389 ([review
5960194563](dotnet#40389 (review)))
posted one test-coverage finding and said nothing about its
`scrollView.SetClipToPadding(false)` change to Android `ScrollView`
clipping. dotnet#40512 later had to refresh an Android screenshot baseline
after dotnet#40389. dotnet#40541 adds the dimension that catches this; this PR
surfaces it in the summary.

#### Validation

- `gh aw compile copilot-review-expert` (gh-aw v0.86.2): **passed**, 0
warnings. Only the lock's `body_hash` changed.
- `pwsh -Command "Invoke-Pester -Path
.github/scripts/Post-InlineReview.Tests.ps1"`: **passed**, 7/7.
- `pwsh .github/scripts/post-inline-review.ps1 -PRNumber 40389
-FindingsFile <3 synthetic findings> -ReviewedCommit
ed3f177 -DryRun`: **passed** (exit 0),
output shown above. The diff filter dropped the out-of-diff finding,
which was counted as "1 more".
- Local throwaway harnesses that run the extracted publisher code: **0
failures**. They aren't committed because this repo doesn't add tests
for CI scripts. Cases:
  - mixed, singular and withheld-only findings;
  - wrong case, plural and mid-line labels, none of which are counted;
  - no #32 findings, byte-identical to `main`;
  - a round trip through the pinned gh-aw `sanitize_content.cjs`.
- The same checks with this diff applied on dotnet#40541's head (`85fc7f1e`):
the diff applied cleanly and the routing pin `f565395e…` still matches
with 32 dimensions. `Get-ExpertFindings` accepts a `[major]` #32
finding, which is counted, and rejects `[moderate]`. Harnesses had 0
failures, Pester passed 7/7, and the recompiled lock was identical.
- `git diff --check`: **clean**.

Not run: a live `/review expert-review`. The workflow runs from the
default branch, so it needs a canary run after merge.

### 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. -->

None filed; follow-up to dotnet#40541.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…et#40389)

### Description of Change

On Android, a ScrollView that applies safe-area insets clips its content
at those insets while scrolling. Mid-scroll, the ScrollView's background
shows as a band below the status bar and above the navigation bar, and
the items are cut off at the band's edge. On iOS the content scrolls
under the bars and comes to rest clear of them at either end.

`MauiScrollView.HandleWindowInsets` applies the safe-area insets through
`SafeAreaExtensions.ApplyAdjustedSafeAreaInsetsPx`, which calls
`SetPadding` on the `NestedScrollView`. The keyboard path
(`ApplyAnimatedSoftInputInsetsPx`) does the same. Android's default
`clipToPadding` is true, so the scrolling child is clipped at that
padding.

The fix calls `SetClipToPadding(false)` once, when the handler creates
the platform view. (`ClipToPadding` is read-only in the binding, so it
can't go in the object initializer.) The native padding on a
`MauiScrollView` only ever comes from safe-area or keyboard insets:
`ScrollView.Padding` has no mapper and is applied to the content by
MAUI's own layout. The only other `SetPadding` that can reach a
`MauiScrollView` is the Shell flyout footer, and it already calls
`SetClipToPadding(false)` on the same view. `MauiSwipeView` uses the
same setting.

The scroll range doesn't change, because `NestedScrollView` computes it
from the padding, not from `clipToPadding`. On the emulator with
3-button navigation, the last item comes to rest at y=2276 px both with
and without the fix. At the top, the first item starts below the status
bar as before. Overscroll glow now covers the full height of the view
instead of stopping at the padding.

Horizontal and `Both` orientations still clip at the left and right
padding, because the inner `HorizontalScrollView` is laid out inside it.
I left that out of this PR.

### Tests

`ScrollViewTests.ContentDrawsUnderSafeAreaPaddingWhileScrolled`
(Controls device test, ScrollView category, Android) puts a blue
ScrollView with tall red content on a page with `SafeAreaEdges.None`. It
waits for the safe-area padding, scrolls to 1000 and draws the
`MauiScrollView` into a bitmap with the scroll offset applied, the way
its parent draws it. The pixel in the middle of each padding band must
match the content in the middle of the viewport, and `ClipToPadding`
must be false. MauiBot's repro in dotnet#37524 checked only the property; the
pixel check covers the behavior itself.

| | Total | Passed | Failed | Skipped |
|---|---|---|---|---|
| Controls ScrollView, without the fix | 14 | 13 | 1 | 0 |
| Controls ScrollView, with the fix | 14 | 14 | 0 | 0 |
| Core ScrollView, with the fix | 87 | 85 | 0 | 2 |

Without the fix the new test fails with `Expected Color [A=255, R=255,
G=0, B=0] at point 540,71`: the band shows the blue background. The two
Core skips are existing `Skip` attributes. With the fix the Controls run
passed with both 3-button and gesture navigation. Runs were on an API 37
emulator, Release arm64.

**Before / after** (sandbox app, Android emulator API 37, 3-button
navigation): the issue's page with `SafeAreaEdges="None"`, an amber
ScrollView and white items, scrolled slowly to the middle and then to
the end.

| Before: mid-scroll, item 4 is cut off below the status bar and only
amber shows above the navigation bar | After: items 3 and 16 show under
the status bar and the navigation bar |
|---|---|
|
![before](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.png)
|
![after](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.png)
|

Full clips:
[before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-before.mp4)
·
[after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/37306-after.mp4)

Not covered: a real keyboard, Shell, and a NavigationPage with a
toolbar. The change is Android-only.

### Issues Fixed

Fixes dotnet#37306

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…otnet#40389 (dotnet#40512)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This PR targets the SR2 release candidate, `candidate/11.0.1xx-sr2`.
That is where both dotnet#39898 (which added the test and baseline) and dotnet#40389
(which changed the rendering) merged. The failure exists only on the
candidate. It is the remaining deterministic UI-test failure on dotnet#40116.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Test-only change. It refreshes one Android baseline,
`TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`.
The test, tolerance, crop and comparer are unchanged.

**Why the baseline is stale**

- dotnet#39898 (merged 11-12) added
`Issue35410.TextRemainsVisibleAfterLandscapeRotation` and its API 36
landscape baseline.
- dotnet#40389 ("[Android] Let ScrollView content scroll under safe-area
padding", merged 11-18) made the Android ScrollView stop clipping to its
safe-area padding. Content now draws into the bottom inset while the
padding still applies at the scroll extents. That change did not update
this baseline.
- Since dotnet#40389, every candidate run of `Controls SafeAreaEdges (API 36
Pixel 3 XL)` fails this test at **0.54%**, on both the original attempt
and the in-job retry. Examples: UI builds 1688778, 1689023, 1690796,
1694038 and 1694047. The same job passed 185/185 on 1688241, the last
candidate build before dotnet#40389.

**What changed in the image** (old baseline vs CI actual, both
2960x1276)

- 89,248 pixels differ by more than 16 levels, all in the bottom 32 rows
(1244–1275). The next row's label is now drawn there instead of the page
background, which is dotnet#40389's intended behaviour.
- Above row 1244, 1,104 pixels differ, none by more than 1 level. The
notch-side horizontal inset and all visible text are unchanged, so what
dotnet#39898 protects (text staying visible and clear of the notch after
rotation) is still covered.

**The new baseline is deterministic.** It is the CI actual from
candidate UI build 1694038 (run 47304978, result 100184, attachment 11;
sha256 `c80e438e…`). It is pixel-identical (max channel difference 0) to
the actuals from build 1694047 (run 47303796) and build 1690796. Only
the PNG date metadata differs.

**Causal check.** I compiled the repo's unchanged `VisualTestUtils` +
`MagickNetVisualComparer` sources (Magick.NET-Q8-AnyCPU 14.17.2, same
0.005 threshold) into a small harness. I then compared each baseline
revision against the three independent CI actuals:

| Stage | Baseline | 1694038 actual | 1694047 actual | 1690796 actual |
| --- | --- | --- | --- | --- |
| Before (`a61b68cb`) | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Fix (this PR) | new | PASS | PASS | PASS |
| Fix reverted | old | FAIL 0.54% | FAIL 0.54% | FAIL 0.54% |
| Restored | new | PASS | PASS | PASS |

I retried the failed job on builds 1694038 and 1694047 (runs 47309610
and 47309596), producing five more landscape actuals. All five pass
against the new baseline and fail at 0.54% against the old one.

The `Controls SafeAreaEdges (API 36 Pixel 3 XL)` job on this PR's own
UI-test CI is the on-device confirmation.

Maintainers: please confirm the new bottom-inset rendering is the
intended post-dotnet#40389 appearance (cc author of dotnet#40389). If it is not, the
fix belongs in `ScrollViewHandler.Android.cs`, not in this baseline.

### Issues Fixed

Fixes the candidate-only `Issue35410` Android API 36 UI-test failure on
dotnet#40116. There is no separate issue for it. Related: dotnet#35410, dotnet#39898,
dotnet#40389.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…aseline (dotnet#40539)

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

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

This is a coordinated rollback on `candidate/11.0.1xx-sr2`, where both
reverted PRs landed. Their changes are not present on `net11`.

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

<!-- Enter description of the fix in this section -->

Restore the Android ScrollView behavior from before dotnet#40389 while the
compatibility impact and any future opt-in/opt-out design are
considered.

Revert, in reverse dependency order:

- dotnet#40512 (`e3c8b2ec8cb9e6e78a4ddf90aca9dda177c27aa5`): restore the
previous `android-notch-36/Issue35410_Landscape.png` baseline.
- dotnet#40389 (candidate commit `93995479185ce7594f4b771cc99a26745e0d23e7`):
remove the unconditional `SetClipToPadding(false)` and remove the device
test requiring content to draw under safe-area padding.

**Behavior:** ordinary Android ScrollViews once again use Android's
default padding clipping. Scrolling content no longer draws into the
native safe-area/keyboard padding bands. Existing special-case behavior,
including Shell flyout overrides, is unchanged.

The three changed paths exactly match their versions immediately before
dotnet#40389. The original issue dotnet#37306 is intentionally no longer fixed by
this change. The earlier dotnet#39898 landscape/notch fix and all unrelated
changes are preserved. Searches for dotnet#40389, dotnet#37306, clipping-related
follow-ups, and subsequent changes to the affected paths identified
dotnet#40512 as the only merged dependent follow-up.

No feature flag or review-workflow changes are included.

**Validation**

- `git diff --cached --check` - passed.
- `git diff --cached --quiet 9399547^ --
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
src/Controls/tests/DeviceTests/Elements/ScrollView/ScrollViewTests.Android.cs
src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/Issue35410_Landscape.png`
- passed; exact pre-change source/test/baseline restoration.
- `dotnet format whitespace --folder --include
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs
--verify-no-changes` - passed.
- `dotnet build Microsoft.Maui.BuildTasks.slnf -c Release
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false
-p:IncludeMacOSTargetFrameworks=false -v:q` - passed.
- `pwsh -NoProfile -File
.github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project
Controls -Platform android -TestFilter 'Category=ScrollView' -Rebuild
-OutputDirectory <session-artifacts>/scrollview-rollback-final -Timeout
00:10:00` - passed, **13 passed / 0 failed / 0 skipped**, Release arm64
Android API 34 emulator; verified from fresh result XML. The same
full-rebuild command with the candidate's production handler temporarily
restored also passed 13/13. The final source contains the rollback.

Earlier incremental attempts encountered a missing-result-file error and
`DoesNotLeak` GC failures (12/13); these are disclosed rather than
counted as passing. Both full-rebuild comparison runs passed. The
full-solution formatter could not complete with missing unrelated
project references and was stopped; the targeted formatting check above
passed. The default all-platform BuildTasks command failed because the
installed Apple workloads support 27.2 rather than the branch's 27.0;
the Android-scoped prerequisite build passed without repository
configuration changes.

The API 36 notch screenshot UI test was **not run locally**; its
baseline is restored byte-for-byte, and CI still needs to validate that
configuration.

### 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. -->

Reverts dotnet#40389 and its dependent baseline update dotnet#40512.
Related: dotnet#37306, dotnet#35410, dotnet#39898, dotnet#40116.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — ed3f177a Deployed Nov 18, 2026 by MykhailoDav via conclusion #3090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants