Repository navigation
[Android] Fix incorrect top padding for translated views - #38295
Conversation
Forward-port the focused fix and Issue37418 regression coverage from #37772 to main. Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38295Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38295" |
There was a problem hiding this comment.
🟡 Changes recommended
The new HostApp animation uses an async void OnSizeAllocated that can re-run animations on subsequent layout passes, and the new UITest measures positions without waiting for navigation/animation to settle, increasing flakiness risk.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates Android safe-area inset handling to avoid treating translated, non–full-screen controls (e.g., bottom sheets) as full-screen Shell navigation transitions, preventing an incorrect top inset from being applied. It also adds a HostApp repro page and a UI regression test for #37418.
Changes:
- Android: refine the “vertical animation” heuristic in
SafeAreaExtensionsto require the view’s height to cover the usable screen before applying the full top inset during animation. - Tests: add
Issue37418HostApp scenario (bottom sheet translated in/out viaTranslateToAsync). - Tests: add
Issue37418UI test validating no extra top padding is applied.
File summaries
| File | Description |
|---|---|
| src/Core/src/Platform/Android/SafeAreaExtensions.cs | Tightens vertical animation detection to avoid false positives for smaller translated views. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue37418.cs | Adds a Shell-based HostApp repro using a translated bottom sheet modal. |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue37418.cs | Adds a UI regression test measuring top padding behavior for the translated bottom sheet. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
| protected override async void OnSizeAllocated(double width, double height) | ||
| { | ||
| base.OnSizeAllocated(width, height); | ||
|
|
||
| if (_border is null) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| _border.TranslationY = _border.Measure(double.PositiveInfinity, double.PositiveInfinity).Height; | ||
| _border.IsVisible = true; | ||
| await _border.TranslateToAsync(_border.X, 0, 300, Easing.CubicIn); | ||
| } |
| App.WaitForElement("OpenBottomSheetButton"); | ||
| App.Tap("OpenBottomSheetButton"); | ||
|
|
||
| var borderRect = App.WaitForElement("BottomSheetBorder").GetRect(); | ||
| var closeButtonRect = App.WaitForElement("CloseBottomSheetButton").GetRect(); |
|
@dalexsoto stamp |
|
This is a back port from sr10.1 |
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…38665) <!-- 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! ### Description of Change Fix the two Android API 36 / Pixel 3 XL SafeAreaEdges failures in [build 1602666](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602666&view=logs&j=217a4b68-6397-5ebe-0d4b-1177e8401828&t=3a87bec2-0591-537a-1f29-40eb70176265). - Preserve the full top inset throughout a full-height page's navigation transition, including `0 < viewTop <= topInset`. Check animation before partial overlap, and preserve the translated-child height guard from #38295. - Replace catch-and-retry NUnit assertions in `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` with delayed constraints. NUnit 4.0.1 records an assertion failure before throwing, so catching it and succeeding on a later attempt still leaves the test failed. The original CI device log actually shows the grid shrinking from 2705 to 1613 pixels and returning to 2705 after dismissal. - Preserve the 15-second polling window, 500-ms interval, keyboard visibility checks, and one-pixel restoration tolerance. Check restored height and Y together on the same rectangle. - Add six Android native cases exercising the production inset helper: full-height offsets 0, 1, 99, 100, and 101 with a 100-pixel top inset, plus a translated short child. Assert padding and inset consumption. No snapshots, screenshot tolerances, public APIs, dependencies, or CI configuration are changed. `LayoutShouldBeCorrectOnFirstNavigation` remains unchanged. ### Regression origins | Failure | Introducing change | Evidence | | --- | --- | --- | | Persistent incorrect top inset during navigation | #33788, commit `9c0887b8c343a1a98762acfccb64190355e175ee` | Removed the deferred inset reapplication added in #33285 and introduced `viewTop > top`, leaving the final `0 < viewTop <= top` transition range unprotected. | | Transient keyboard measurements retained as NUnit failures | #31022, commit `0371d318282cc6f0cbb96d36315e7fc2f70680ff` | Introduced catch-and-retry `RetryAssert` while the Android UI project already referenced NUnit 4.0.1. | | The specific keyboard test exposing that defect | #35083 | Added `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` using that helper. The later keyboard waits in #37741 did not isolate recorded NUnit failures. | These are source-history attributions, not a historical full-build bisect. The keyboard failure is a test-harness defect, not proof that the grid never resized. ### Validation Tested commit: `8aa80ab8d9312be1aeddfbb200ff580e5c678598`. Environment: dedicated Android API 36 / Pixel 3 XL ARM64 emulator, 1440x2960 at density 560, Release HostApp, existing NUnit 4.0.1 / adapter 4.5.0. Actual TRX and xUnit XML results were inspected, not inferred from process exit codes. | Coverage | Result | | --- | --- | | `SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle` | Passed in **3 consecutive focused runs**, on the first attempt each time. | | `LayoutShouldBeCorrectOnFirstNavigation` | Passed in **3 consecutive focused runs**, on the first attempt each time, against the unchanged snapshot and tolerance. | | Six native inset boundary cases, without native fix | Three expected failures: offsets 1, 99, and 100 produced padding 99, 1, and 0 instead of 100. Settled-origin, offset-101, and translated-child controls passed. | | Same six native cases, with native fix | **6 passed, 0 failed**. | | Complete `Issue28986_ContentPage` fixture, final with-fix A/B leg | **5 passed, 0 failed**, first attempt. | | Standalone NUnit 4.0.1 probe | All five expected outcomes confirmed: caught assertions remain failed; delayed height and compound bounds constraints recover; permanently incorrect height or bounds still fail. | The repository `verify-tests-fail.ps1` finished with **`VERIFICATION PASSED`**, using frozen base `49b62062536b4a2b957d965f76035eb56806615c` and restoring only the two fix files. The final native A/B evidence is deterministic. The without-fix keyboard fixture was timing-dependent and also encountered element-lookup failures; its logs contain the original retained `2705` assertion. The standalone NUnit probe independently isolates that bookkeeping defect. No claim is made that every broad-fixture failure was caused by this PR's targeted bug. Initial verification attempts were blocked by the pinned XHarness runtime and its default instrumentation selection. They are not counted as native proof. Final native execution used the manifest's explicit `com.microsoft.maui.core.devicetests.TestInstrumentation` with a session-local runtime. No repository tool versions or machine-wide SDKs were changed. Focused UI command, executed three times: ```powershell pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5554 -TestFilter 'FullyQualifiedName~Issue33038|FullyQualifiedName~SafeAreaNoWhiteSpaceAfterKeyboardDismissAndEdgeToggle' ``` The worktree was clean after verification. PR CI is separate: [maui-pr build 1602977](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1602977) is running; this is not a full-CI-green or full-suite-green claim. No `maui-pr-uitests` build had been scheduled at the time of this update. ### Related work and constraints The native correction follows the narrowly scoped approach proposed in closed, unmerged #38641, without its unrelated MacCatalyst skip. Open #37953 proposes a broader SafeArea redesign; this PR keeps a small correction and fixes the separate NUnit bookkeeping defect. Do not replace the navigation baseline, widen its tolerance, or remove the translated-child guard to make the test pass. Do not use caught NUnit assertions as a polling predicate. The generic Appium helper remains unchanged here to avoid adding an NUnit dependency or broad test-infrastructure changes. ### Issues Fixed Fixes #37555 Fixes #37556 Refs #33038 Refs #38135 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description
Forward-ports the focused Android fix from #37772 to the current
mainbranch.The vertical safe-area animation heuristic now treats a translated view as a full-screen Shell navigation transition only when the view covers the usable screen height. Smaller translated controls, such as bottom sheets, no longer retain an incorrect top safe-area inset.
Adds the Issue37418 HostApp scenario and UI regression test. This intentionally excludes the unrelated
.github/skills/release-readiness/SKILL.mdchange present in source merge commit9d587ce9a6ce0b776496e930b5948da629b62ef2.Issues Fixed
Fixes #37418
Validation
dotnet build Microsoft.Maui.BuildTasks.slnfpwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -TestFilter "FullyQualifiedName~Issue37418"