Skip to content

Fix Android Shell top inset when nav bar is hidden#35555

Merged
kubaflo merged 6 commits into
dotnet:inflight/currentfrom
ne0rrmatrix:fix/35103-android-shell-hidden-navbar-insets
May 27, 2026
Merged

Fix Android Shell top inset when nav bar is hidden#35555
kubaflo merged 6 commits into
dotnet:inflight/currentfrom
ne0rrmatrix:fix/35103-android-shell-hidden-navbar-insets

Conversation

@ne0rrmatrix

Copy link
Copy Markdown

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!

Summary

Fixes a Shell Android inset regression where hiding the navigation bar could leave a blank top gap on devices with a display cutout.

Fixes #35103

What changed

  • update Android app bar inset handling to detect real visible app bar content instead of relying on measured height that can be inflated by stale padding
  • request layout and inset reapplication from the toolbar parent/app bar root when Shell toolbar visibility changes
  • add an Android Shell device regression test for hidden navigation bars retaining top inset padding

Verification

  • built Microsoft.Maui and Microsoft.Maui.Controls for Android successfully
  • ran Android Controls Shell device tests on an emulator via direct instrumentation: 70 passed, 0 failed
  • verified HiddenShellNavigationBarClearsAppBarInsetPadding passed

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

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

@github-actions github-actions Bot added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android labels May 21, 2026
@kubaflo

kubaflo commented May 21, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/regression-check -p android

@MauiBot MauiBot added s/agent-review-incomplete s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels May 21, 2026
@dotnet dotnet deleted a comment from MauiBot May 21, 2026
@kubaflo

kubaflo commented May 21, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/regression-check -p android

@kubaflo

kubaflo commented May 21, 2026

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

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

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor

@ne0rrmatrix , does this fix also cover Navigation Page scenario ? for example - Navigate from a page that has the navigation bar and title enabled to a page where the navigation bar is disabled.

@ne0rrmatrix

ne0rrmatrix commented May 22, 2026

Copy link
Copy Markdown
Author

@ne0rrmatrix , does this fix also cover Navigation Page scenario ? for example - Navigate from a page that has the navigation bar and title enabled to a page where the navigation bar is disabled.

@NirmalKumarYuvaraj It did not fix the issue for navigation page. But I have updated it to fix it and it now has a second test to verify that fix. I have verified both tests fail against main and pass on PR.

@kubaflo

kubaflo commented May 22, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

1 similar comment
@kubaflo

kubaflo commented May 22, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

@MauiBot MauiBot added the s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates label May 22, 2026
@dotnet dotnet deleted a comment from MauiBot May 23, 2026
@kubaflo

kubaflo commented May 23, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Core/src/Platform/Android/MauiWindowInsetListener.cs Outdated
@kubaflo

kubaflo commented May 24, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

@kubaflo

kubaflo commented May 25, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

@kubaflo

kubaflo commented May 26, 2026

Copy link
Copy Markdown
Contributor

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

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Android.cs Outdated

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

@MauiBot

MauiBot commented May 26, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI Summary

👋 @ne0rrmatrix — new AI review results are available. Please review the latest session below.

📊 Review Session6fcb97e · Fix child view height handling in MauiWindowInsetListener for MaterialToolbar · 2026-05-26 21:12 UTC
🚦 Gate — Test Before & After Fix

Gate Result: ✅ PASSED

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

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 NavigationPageTests (PushingToPageWithoutNavigationBarClearsAppBarInsetPadding) Category=NavigationPage ✅ FAIL — 407s ✅ PASS — 256s
📱 ShellTests (HiddenShellNavigationBarClearsAppBarInsetPadding) Category=Shell ✅ FAIL — 319s ✅ PASS — 304s
🔴 Without fix — 📱 NavigationPageTests (PushingToPageWithoutNavigationBarClearsAppBarInsetPadding): FAIL ✅ · 407s

(truncated to last 15,000 chars)

   05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.461 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.NavigationPageTests.PushingToPageWithoutNavigationBarClearsAppBarInsetPadding()
      05-26 14:35:19.461 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Execution time: 2.8370122
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Test trait name: Category
      05-26 14:35:19.462 21279 21385 I DOTNET  :       value: NavigationPage
      05-26 14:35:19.462 21279 21385 I DOTNET  :       value: NavigationPage
      05-26 14:35:19.462 21279 21385 I DOTNET  : 	[FAIL] NavigationPage push to hidden navigation bar clears app bar inset padding
      05-26 14:35:19.462 21279 21385 I DOTNET  : 	[FAIL] NavigationPage push to hidden navigation bar clears app bar inset padding   Test name: NavigationPage push to hidden navigation bar clears app bar inset padding
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Assembly:  [Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Exception messages: AppBar retained top inset padding after navigating to a page with the NavigationPage navigation bar hidden.   Exception stack traces:    at Microsoft.Maui.DeviceTests.AssertHelpers.AssertEventually(Func`1 assertion, Int32 timeout, Int32 interval, String message)
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.NavigationPageTests.<>c__DisplayClass2_0.<<PushingToPageWithoutNavigationBarClearsAppBarInsetPadding>b__0>d.MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    at Microsoft.Maui.DeviceTests.NavigationPageTests.PushingToPageWithoutNavigationBarClearsAppBarInsetPadding()
      05-26 14:35:19.462 21279 21385 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Execution time: 2.8370122
      05-26 14:35:19.462 21279 21385 I DOTNET  :    Test trait name: Category
      05-26 14:35:19.462 21279 21385 I DOTNET  :       value: NavigationPage
      05-26 14:35:19.462 21279 21385 I DOTNET  :       value: NavigationPage
      05-26 14:35:19.462 21279 21385 I DOTNET  : 
      05-26 14:35:19.643 21279 21390 I DOTNET  : 	[PASS] Insert Page Before Root Page and then PopToRoot
      05-26 14:35:19.644 21279 21390 I DOTNET  : 	[IGNORED] Does Not Leak
      05-26 14:35:19.886 21279 21395 I DOTNET  : 	[PASS] PushedPageFiresNavigatedEventOnInitialLoad
      05-26 14:35:20.662 21279 21400 I DOTNET  : 	[PASS] Pushing And Popping Doesnt Fire BackButtonVisible Toolbar Events
      05-26 14:35:21.127 21279 21405 I DOTNET  : 	[PASS] Set Has Back Button
      05-26 14:35:21.337 21279 21410 I DOTNET  : 	[PASS] Set Has Navigation Bar
      05-26 14:35:22.653 21279 21415 I DOTNET  : 	[PASS] Can Reuse Pages
      05-26 14:35:22.661 21279 21415 I DOTNET  : Microsoft.Maui.DeviceTests.NavigationPageTests 17.2063811 ms
      05-26 14:35:22.693 21279 21415 I DOTNET  : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
      05-26 14:35:22.728 21279 21415 I DOTNET  : 	[PASS] AlertDialogButtonColorDarkTheme
      05-26 14:35:22.845 21279 21415 I DOTNET  : 	[PASS] AlertDialogButtonColorLightTheme
      05-26 14:35:22.845 21279 21415 I DOTNET  : Microsoft.Maui.DeviceTests.AlertDialogTests 0.1513517 ms
      05-26 14:35:22.911 21279 21305 I DOTNET  : Failed tests:
      05-26 14:35:22.916 21279 21305 I DOTNET  : 1) 	[FAIL] NavigationPage push to hidden navigation bar clears app bar inset padding   Test name: NavigationPage push to hidden navigation bar clears app bar inset padding
      05-26 14:35:22.916 21279 21305 I DOTNET  :    Assembly:  [Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]
      05-26 14:35:22.916 21279 21305 I DOTNET  :    Exception messages: AppBar retained top inset padding after navigating to a page with the NavigationPage navigation bar hidden.   Exception stack traces:    at Microsoft.Maui.DeviceTests.AssertHelpers.AssertEventually(Func`1 assertion, Int32 timeout, Int32 interval, String message)
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.NavigationPageTests.<>c__DisplayClass2_0.<<PushingToPageWithoutNavigationBarClearsAppBarInsetPadding>b__0>d.MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.DeviceTests.Stubs.WindowHandlerStub, Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    at Microsoft.Maui.DeviceTests.NavigationPageTests.PushingToPageWithoutNavigationBarClearsAppBarInsetPadding()
      05-26 14:35:22.916 21279 21305 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:35:22.916 21279 21305 I DOTNET  :    Execution time: 2.8370122
      05-26 14:35:22.916 21279 21305 I DOTNET  :    Test trait name: Category
      05-26 14:35:22.916 21279 21305 I DOTNET  :       value: NavigationPage
      05-26 14:35:22.916 21279 21305 I DOTNET  :       value: NavigationPage
      05-26 14:35:22.916 21279 21305 I DOTNET  : 
      05-26 14:35:22.944 21279 21305 I DOTNET  : Xml file was written to the provided writer.
      05-26 14:35:22.944 21279 21305 I DOTNET  : Tests run: 561 Passed: 20 Inconclusive: 0 Failed: 1 Ignored: 539
�[41m�[30mfail�[39m�[22m�[49m: Non-success instrumentation exit code: 1, expected: 0
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmfuwn7",
        "exitCode": 1,
        "exitCodeName": "TESTS_FAILED",
        "platform": "android",
        "instrumentationExitCode": 1,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 1 (TESTS_FAILED)
  Tests completed with exit code: 1

🟢 With fix — 📱 NavigationPageTests (PushingToPageWithoutNavigationBarClearsAppBarInsetPadding): PASS ✅ · 256s

(truncated to last 15,000 chars)

Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Modal'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Path'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Picker'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shape'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shell'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Slider'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TabbedPage'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TextInput'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Toolbar'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TemplatedView'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElement'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElementTree'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'WebView'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Window'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'WindowOverlay'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Xaml'): [Memory] Cells Do Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Accessibility'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Application'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Behavior'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Border'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'BoxView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CarouselView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CollectionView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Compatibility'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlexLayout'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutPage'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Frame'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Gesture'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'HybridWebView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Lifecycle'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ListView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Map'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'MenuFlyout'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Mapper'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Excluded test (filtered by Trait; 'Category':'Memory'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Modal'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Path'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Picker'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shape'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.394 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shell'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Slider'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TabbedPage'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TextInput'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Toolbar'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'TemplatedView'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'View'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElement'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.395 22784 22811 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'VisualElementTree'): [Memory] BindableLayout Does Not Leak
      05-26 14:44:44.422 22784 22811 I DOTNET  : [Test environment: 64-bit .NET .NET 10.0 [collection-per-class, non-parallel]]
      05-26 14:44:44.422 22784 22811 I DOTNET  : [Test framework: xUnit.net 2.9.0.0]
      05-26 14:44:44.434 22784 22811 I DOTNET  : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
      05-26 14:44:44.652 22784 22811 I DOTNET  : 	[PASS] AlertDialogButtonColorDarkTheme
      05-26 14:44:44.693 22784 22811 I DOTNET  : 	[PASS] AlertDialogButtonColorLightTheme
      05-26 14:44:44.697 22784 22811 I DOTNET  : Microsoft.Maui.DeviceTests.AlertDialogTests 0.191011 ms
      05-26 14:44:44.699 22784 22811 I DOTNET  : Serialize test because it has to add itself to the main window
      05-26 14:44:46.091 22784 22827 I DOTNET  : 	[PASS] Swapping Navigation Toggles BackButton Correctly
      05-26 14:44:46.374 22784 22832 I DOTNET  : 	[PASS] InitialPageFiresNavigatedEvent
      05-26 14:44:49.190 22784 22840 I DOTNET  : 	[PASS] Child Pages Do Not Leak
      05-26 14:44:49.337 22784 22845 I DOTNET  : 	[PASS] NavigationBar Removes When MainPage Set To ContentPage
      05-26 14:44:50.345 22784 22850 I DOTNET  : 	[PASS] PoppingNavigationPageDoesntCrash
      05-26 14:44:51.308 22784 22855 I DOTNET  : 	[PASS] StackNavigationManager Clears References On Disconnect (Issue 33918)
      05-26 14:44:52.867 22784 22862 I DOTNET  : 	[PASS] Pushing a Tabbed Page Doesn't Throw Exception
      05-26 14:44:53.114 22784 22868 I DOTNET  : 	[PASS] Insert Page Before RootPage ShowsBackButton
      05-26 14:44:53.706 22784 22873 I DOTNET  : 	[PASS] SettingTitleIconImageSourceDoesntCrash
      05-26 14:44:54.307 22784 22878 I DOTNET  : 	[PASS] Remove Root Page Hides Back Button
      05-26 14:44:55.204 22784 22883 I DOTNET  : 	[PASS] PopLifeCycle
      05-26 14:44:56.097 22784 22888 I DOTNET  : 	[PASS] Back Button Visibility Changes with push/pop
      05-26 14:44:56.843 22784 22893 I DOTNET  : 	[PASS] NavigationPage push to hidden navigation bar clears app bar inset padding
      05-26 14:44:57.011 22784 22898 I DOTNET  : 	[PASS] Insert Page Before Root Page and then PopToRoot
      05-26 14:44:57.012 22784 22898 I DOTNET  : 	[IGNORED] Does Not Leak
      05-26 14:44:57.285 22784 22903 I DOTNET  : 	[PASS] PushedPageFiresNavigatedEventOnInitialLoad
      05-26 14:44:58.088 22784 22908 I DOTNET  : 	[PASS] Pushing And Popping Doesnt Fire BackButtonVisible Toolbar Events
      05-26 14:44:58.607 22784 22913 I DOTNET  : 	[PASS] Set Has Back Button
      05-26 14:44:58.759 22784 22918 I DOTNET  : 	[PASS] Set Has Navigation Bar
      05-26 14:45:00.214 22784 22924 I DOTNET  : 	[PASS] Can Reuse Pages
      05-26 14:45:00.215 22784 22924 I DOTNET  : Microsoft.Maui.DeviceTests.NavigationPageTests 15.3164759 ms
      05-26 14:45:00.258 22784 22804 I DOTNET  : Xml file was written to the provided writer.
      05-26 14:45:00.259 22784 22804 I DOTNET  : Tests run: 561 Passed: 21 Inconclusive: 0 Failed: 0 Ignored: 539
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmfuwn7",
        "exitCode": 0,
        "exitCodeName": "SUCCESS",
        "platform": "android",
        "instrumentationExitCode": 0,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
  Tests completed successfully

🔴 Without fix — 📱 ShellTests (HiddenShellNavigationBarClearsAppBarInsetPadding): FAIL ✅ · 319s

(truncated to last 15,000 chars)

<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ShellTests.HiddenShellNavigationBarClearsAppBarInsetPadding()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Execution time: 2.5300434
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Test trait name: Category
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  : 	[FAIL] Hidden Shell navigation bar clears app bar inset padding
      05-26 14:40:11.379 21923 22235 I DOTNET  : 	[FAIL] Hidden Shell navigation bar clears app bar inset padding   Test name: Hidden Shell navigation bar clears app bar inset padding
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Assembly:  [Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Exception messages: AppBar retained top inset padding after the Shell navigation bar was hidden.   Exception stack traces:    at Microsoft.Maui.DeviceTests.AssertHelpers.AssertEventually(Func`1 assertion, Int32 timeout, Int32 interval, String message)
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ShellTests.<>c__DisplayClass17_0.<<HiddenShellNavigationBarClearsAppBarInsetPadding>b__0>d.MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    at Microsoft.Maui.DeviceTests.ShellTests.HiddenShellNavigationBarClearsAppBarInsetPadding()
      05-26 14:40:11.379 21923 22235 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Execution time: 2.5300434
      05-26 14:40:11.379 21923 22235 I DOTNET  :    Test trait name: Category
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  :       value: Shell
      05-26 14:40:11.379 21923 22235 I DOTNET  : 
      05-26 14:40:12.610 21923 22242 I DOTNET  : 	[PASS] HideSoftInputOnTapped Doesn't Crash If Entry Is Still Focused After Window Is Null
      05-26 14:40:17.001 21923 22298 I DOTNET  : 	[PASS] Pages Do Not Leak
      05-26 14:40:17.386 21923 22309 I DOTNET  : 	[PASS] FlyoutHeaderRendersCorrectSizeWithFlyoutContentSet
      05-26 14:40:17.849 21923 22315 I DOTNET  : 	[PASS] Shell add then remove items from selected item
      05-26 14:40:22.106 21923 22336 I DOTNET  : 	[PASS] Shell TabBar Foreground Initializes Correctly
      05-26 14:40:26.401 21923 22342 I DOTNET  : 	[PASS] Shell TabBar Foreground Initializes Correctly
      05-26 14:40:27.277 21923 22350 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:40:28.225 21923 22356 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:40:29.084 21923 22362 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:40:30.000 21923 22368 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:40:30.304 21923 22373 I DOTNET  : 	[PASS] CanHideNavBarShadow
      05-26 14:40:30.588 21923 22378 I DOTNET  : 	[PASS] CanHideNavBarShadow
      05-26 14:40:34.818 21923 22384 I DOTNET  : 	[PASS] Shell TabBar Title Color Initializes Correctly
      05-26 14:40:39.103 21923 22392 I DOTNET  : 	[PASS] Shell TabBar Title Color Initializes Correctly
      05-26 14:40:39.434 21923 22398 I DOTNET  : 	[PASS] FlyoutItems Render When FlyoutBehavior Starts As Locked
      05-26 14:40:40.128 21923 22403 I DOTNET  : 	[PASS] TitleView Updates to Currently Visible Page
      05-26 14:40:40.936 21923 22408 I DOTNET  : 	[PASS] SwappingOutAndroidContextDoesntCrash
      05-26 14:40:42.848 21923 22413 I DOTNET  : 	[PASS] Pushing the Same Page Disconnects Previous Toolbar Items
      05-26 14:40:42.852 21923 22413 I DOTNET  : Microsoft.Maui.DeviceTests.ShellTests 81.1844859 ms
      05-26 14:40:42.860 21923 22413 I DOTNET  : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
      05-26 14:40:42.931 21923 22419 I DOTNET  : 	[PASS] AlertDialogButtonColorDarkTheme
      05-26 14:40:43.017 21923 22419 I DOTNET  : 	[PASS] AlertDialogButtonColorLightTheme
      05-26 14:40:43.018 21923 22419 I DOTNET  : Microsoft.Maui.DeviceTests.AlertDialogTests 0.1059536 ms
      05-26 14:40:43.101 21923 21953 I DOTNET  : Failed tests:
      05-26 14:40:43.104 21923 21953 I DOTNET  : 1) 	[FAIL] Hidden Shell navigation bar clears app bar inset padding   Test name: Hidden Shell navigation bar clears app bar inset padding
      05-26 14:40:43.104 21923 21953 I DOTNET  :    Assembly:  [Microsoft.Maui.Controls.DeviceTests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]
      05-26 14:40:43.104 21923 21953 I DOTNET  :    Exception messages: AppBar retained top inset padding after the Shell navigation bar was hidden.   Exception stack traces:    at Microsoft.Maui.DeviceTests.AssertHelpers.AssertEventually(Func`1 assertion, Int32 timeout, Int32 interval, String message)
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ShellTests.<>c__DisplayClass17_0.<<HiddenShellNavigationBarClearsAppBarInsetPadding>b__0>d.MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_1`1.<<CreateHandlerAndAddToWindow>b__1>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass0_0`1.<<SetupWindowForTests>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ControlsHandlerTestBase.<>c__DisplayClass30_0`1.<<CreateHandlerAndAddToWindow>b__0>d[[Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass2_0`1.<<DispatchAsync>b__0>d[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    at Microsoft.Maui.DeviceTests.ShellTests.HiddenShellNavigationBarClearsAppBarInsetPadding()
      05-26 14:40:43.104 21923 21953 I DOTNET  : --- End of stack trace from previous location ---
      05-26 14:40:43.104 21923 21953 I DOTNET  :    Execution time: 2.5300434
      05-26 14:40:43.104 21923 21953 I DOTNET  :    Test trait name: Category
      05-26 14:40:43.104 21923 21953 I DOTNET  :       value: Shell
      05-26 14:40:43.104 21923 21953 I DOTNET  :       value: Shell
      05-26 14:40:43.104 21923 21953 I DOTNET  :       value: Shell
      05-26 14:40:43.104 21923 21953 I DOTNET  :       value: Shell
      05-26 14:40:43.104 21923 21953 I DOTNET  :       value: Shell
      05-26 14:40:43.104 21923 21953 I DOTNET  : 
      05-26 14:40:43.166 21923 21953 I DOTNET  : Xml file was written to the provided writer.
      05-26 14:40:43.166 21923 21953 I DOTNET  : Tests run: 573 Passed: 69 Inconclusive: 0 Failed: 1 Ignored: 503
�[41m�[30mfail�[39m�[22m�[49m: Non-success instrumentation exit code: 1, expected: 0
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmfuwn7",
        "exitCode": 1,
        "exitCodeName": "TESTS_FAILED",
        "platform": "android",
        "instrumentationExitCode": 1,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 1 (TESTS_FAILED)
  Tests completed with exit code: 1

🟢 With fix — 📱 ShellTests (HiddenShellNavigationBarClearsAppBarInsetPadding): PASS ✅ · 304s

(truncated to last 15,000 chars)

59 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Button'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CarouselView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CheckBox'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'CollectionView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Compatibility'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ContentView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'DatePicker'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Dispatcher'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Editor'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Element'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Entry'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlexLayout'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'FlyoutPage'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Frame'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Gesture'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'HybridWebView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Image'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Label'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Layout'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Lifecycle'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ListView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Map'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'MenuFlyout'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Mapper'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Excluded test (filtered by Trait; 'Category':'Memory'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Modal'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'NavigationPage'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Page'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Path'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Picker'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RadioButton'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'RefreshView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'ScrollView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SearchBar'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Shape'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'Slider'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.717 23131 23159 I DOTNET  : [FILTER] Included test (filtered by Trait; 'Category':'SwipeView'): [Memory] FlyoutPage Detail Navigation Does Not Leak
      05-26 14:48:45.742 23131 23159 I DOTNET  : [Test environment: 64-bit .NET .NET 10.0 [collection-per-class, non-parallel]]
      05-26 14:48:45.742 23131 23159 I DOTNET  : [Test framework: xUnit.net 2.9.0.0]
      05-26 14:48:45.758 23131 23159 I DOTNET  : Test collection for Microsoft.Maui.DeviceTests.AlertDialogTests
      05-26 14:48:45.961 23131 23159 I DOTNET  : 	[PASS] AlertDialogButtonColorDarkTheme
      05-26 14:48:45.996 23131 23159 I DOTNET  : 	[PASS] AlertDialogButtonColorLightTheme
      05-26 14:48:46.000 23131 23159 I DOTNET  : Microsoft.Maui.DeviceTests.AlertDialogTests 0.1527173 ms
      05-26 14:48:46.002 23131 23159 I DOTNET  : Serialize test because it has to add itself to the main window
      05-26 14:48:46.549 23131 23169 I DOTNET  : 	[PASS] Can Clear ShellContent
      05-26 14:48:47.381 23131 23175 I DOTNET  : 	[PASS] FlyoutContentUpdatesAfterChange
      05-26 14:48:47.706 23131 23180 I DOTNET  : 	[PASS] Handlers not recreated when changing tabs
      05-26 14:48:48.170 23131 23186 I DOTNET  : 	[PASS] PageLayoutDoesNotExceedWindowBounds
      05-26 14:48:48.384 23131 23191 I DOTNET  : 	[PASS] Ensure Default Colors are White for BottomNavigationView
      05-26 14:48:48.628 23131 23196 I DOTNET  : 	[PASS] FooterTemplate Measures to Set Flyout Width When Flyout Locked
      05-26 14:48:49.550 23131 23204 I DOTNET  : 	[PASS] BasicShellNavigationStructurePermutations
      05-26 14:48:50.091 23131 23209 I DOTNET  : 	[PASS] BasicShellNavigationStructurePermutations
      05-26 14:48:50.591 23131 23214 I DOTNET  : 	[PASS] BasicShellNavigationStructurePermutations
      05-26 14:48:51.107 23131 23219 I DOTNET  : 	[PASS] BasicShellNavigationStructurePermutations
      05-26 14:48:51.399 23131 23224 I DOTNET  : 	[PASS] No crash going back using 'Shell.Current.GoToAsync("..")'
      05-26 14:48:53.353 23131 23229 I DOTNET  : 	[PASS] Can Reuse Pages
      05-26 14:48:55.220 23131 23237 I DOTNET  : 	[PASS] FlyoutCustomContentMargin
      05-26 14:48:57.025 23131 23246 I DOTNET  : 	[PASS] FlyoutCustomContentMargin
      05-26 14:48:58.994 23131 23252 I DOTNET  : 	[PASS] FlyoutCustomContentMargin
      05-26 14:48:59.440 23131 23257 I DOTNET  : 	[PASS] ChangingBottomTabAttributesDoesntRecreateBottomTabs
      05-26 14:49:00.354 23131 23263 I DOTNET  : 	[PASS] FlyoutIsPresented=true sets the visible status of the Shell Flyout.
      05-26 14:49:00.843 23131 23268 I DOTNET  : 	[PASS] ShellContentFragment.Destroy handles null _shellContext gracefully
      05-26 14:49:01.692 23131 23273 I DOTNET  : 	[PASS] Navigation Routes Correctly After Switching Flyout Items
      05-26 14:49:02.596 23131 23278 I DOTNET  : 	[PASS] Navigate to Root with BackButtonBehavior no Crash
      05-26 14:49:06.951 23131 23285 I DOTNET  : 	[PASS] Shell TabBar UnselectedColor Initializes Correctly
      05-26 14:49:11.250 23131 23291 I DOTNET  : 	[PASS] Shell TabBar UnselectedColor Initializes Correctly
      05-26 14:49:12.059 23131 23296 I DOTNET  : 	[PASS] Toolbar Title View Updates
      05-26 14:49:12.278 23131 23301 I DOTNET  : 	[PASS] Shell with Flyout Disabled Doesn't Render Flyout
      05-26 14:49:13.421 23131 23306 I DOTNET  : 	[PASS] Back Button Visibility Changes with push/pop
      05-26 14:49:14.166 23131 23311 I DOTNET  : 	[PASS] ChangingToNewMauiContextDoesntCrash
      05-26 14:49:14.319 23131 23316 I DOTNET  : 	[PASS] FlyoutContent Renderers When FlyoutBehavior Starts As Locked
      05-26 14:49:15.319 23131 23323 I DOTNET  : 	[PASS] Flyout Footer and Default Flyout Items Render
      05-26 14:49:15.505 23131 23329 I DOTNET  : 	[PASS] Toolbar Title
      05-26 14:49:15.953 23131 23335 I DOTNET  : 	[PASS] LogicalChildrenPropagateCorrectly
      05-26 14:49:16.695 23131 23340 I DOTNET  : 	[PASS] Set Has Back Button
      05-26 14:49:17.457 23131 23345 I DOTNET  : 	[PASS] Flyout Header Changes When Updated
      05-26 14:49:18.229 23131 23350 I DOTNET  : 	[PASS] Navigating During Navigated Doesnt ReFire Appearing
      05-26 14:49:19.069 23131 23355 I DOTNET  : 	[PASS] Toolbar Title Updates
      05-26 14:49:19.244 23131 23361 I DOTNET  : 	[PASS] Title View Measures
      05-26 14:49:19.472 23131 23366 I DOTNET  : 	[PASS] Flyout Width Does Not Crash
      05-26 14:49:22.536 23131 23371 I DOTNET  : 	[PASS] PopToRootAsync correctly navigates to root page
      05-26 14:49:26.853 23131 23377 I DOTNET  : 	[PASS] ForegroundColor sets icon and title color sets title
      05-26 14:49:27.459 23131 23382 I DOTNET  : 	[PASS] LifeCycleEvents Fire When Navigating Top Tabs
      05-26 14:49:27.675 23131 23387 I DOTNET  : 	[PASS] Appearing Fires Before NavigatedTo
      05-26 14:49:27.936 23131 23392 I DOTNET  : 	[PASS] Swap Shell Root Page for NavigationPage
      05-26 14:49:28.908 23131 23399 I DOTNET  : 	[PASS] FlyoutItemsRenderWhenFlyoutHeaderIsSet
      05-26 14:49:29.188 23131 23404 I DOTNET  : 	[PASS] AddingBottomTabDoesntRecreateMenu
      05-26 14:49:31.409 23131 23409 I DOTNET  : 	[PASS] Flyout Starts as Open correctly
      05-26 14:49:31.735 23131 23414 I DOTNET  : 	[PASS] FlyoutWithAsMultipleItemsRendersWithoutCrashing
      05-26 14:49:32.284 23131 23419 I DOTNET  : 	[PASS] Correctly Adjust to Making Currently Visible Shell Page Invisible
      05-26 14:49:32.634 23131 23424 I DOTNET  : 	[PASS] Empty Shell
      05-26 14:49:33.042 23131 23429 I DOTNET  : 	[PASS] SearchHandlerRendersCorrectly
      05-26 14:49:33.288 23131 23434 I DOTNET  : 	[PASS] RemovingBottomTabDoesntRecreateMenu
      05-26 14:49:33.757 23131 23439 I DOTNET  : 	[PASS] Hidden Shell navigation bar clears app bar inset padding
      05-26 14:49:34.975 23131 23447 I DOTNET  : 	[PASS] HideSoftInputOnTapped Doesn't Crash If Entry Is Still Focused After Window Is Null
      05-26 14:49:38.059 23131 23456 I DOTNET  : 	[PASS] Pages Do Not Leak
      05-26 14:49:39.450 23131 23463 I DOTNET  : 	[PASS] FlyoutHeaderRendersCorrectSizeWithFlyoutContentSet
      05-26 14:49:40.057 23131 23471 I DOTNET  : 	[PASS] Shell add then remove items from selected item
      05-26 14:49:44.301 23131 23480 I DOTNET  : 	[PASS] Shell TabBar Foreground Initializes Correctly
      05-26 14:49:48.570 23131 23486 I DOTNET  : 	[PASS] Shell TabBar Foreground Initializes Correctly
      05-26 14:49:49.441 23131 23494 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:49:50.352 23131 23500 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:49:51.258 23131 23506 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:49:52.209 23131 23512 I DOTNET  : 	[PASS] FlyoutHeaderMinimumHeight
      05-26 14:49:52.569 23131 23517 I DOTNET  : 	[PASS] CanHideNavBarShadow
      05-26 14:49:52.868 23131 23522 I DOTNET  : 	[PASS] CanHideNavBarShadow
      05-26 14:49:57.141 23131 23528 I DOTNET  : 	[PASS] Shell TabBar Title Color Initializes Correctly
      05-26 14:50:01.419 23131 23534 I DOTNET  : 	[PASS] Shell TabBar Title Color Initializes Correctly
      05-26 14:50:01.733 23131 23539 I DOTNET  : 	[PASS] FlyoutItems Render When FlyoutBehavior Starts As Locked
      05-26 14:50:02.444 23131 23544 I DOTNET  : 	[PASS] TitleView Updates to Currently Visible Page
      05-26 14:50:03.206 23131 23549 I DOTNET  : 	[PASS] SwappingOutAndroidContextDoesntCrash
      05-26 14:50:04.827 23131 23554 I DOTNET  : 	[PASS] Pushing the Same Page Disconnects Previous Toolbar Items
      05-26 14:50:04.828 23131 23554 I DOTNET  : Microsoft.Maui.DeviceTests.ShellTests 78.4597647 ms
      05-26 14:50:04.918 23131 23279 I DOTNET  : Xml file was written to the provided writer.
      05-26 14:50:04.919 23131 23279 I DOTNET  : Tests run: 573 Passed: 70 Inconclusive: 0 Failed: 0 Ignored: 503
�[40m�[32minfo�[39m�[22m�[49m: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmfuwn7",
        "exitCode": 0,
        "exitCodeName": "SUCCESS",
        "platform": "android",
        "instrumentationExitCode": 0,
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "testResults.xml",
            "type": "test-results"
          },
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
�[40m�[32minfo�[39m�[22m�[49m: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
�[40m�[37mdbug�[39m�[22m�[49m: Executing command: '/home/vsts/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26230.4/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall com.microsoft.maui.controls.devicetests'
�[40m�[32minfo�[39m�[22m�[49m: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
  Tests completed successfully

📁 Fix files reverted (3 files)
  • eng/pipelines/ci-copilot.yml
  • src/Controls/src/Core/Platform/Android/Extensions/ToolbarExtensions.cs
  • src/Core/src/Platform/Android/MauiWindowInsetListener.cs

🧪 UI Tests — ViewBaseTests

Detected UI test categories: ViewBaseTests

Deep UI tests — 118 passed, 0 failed across 1 category on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
ViewBaseTests 118/119 ✓
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

🔍 Regression Cross-Reference

🔍 Regression Cross-Reference

🟢 No regression risks detected. No labeled bug-fix PRs in the last 6 months touched the modified files.


🔍 Pre-Flight — Context & Validation

Issue: #35103 - wrong statusbar height when Android device has a notch
PR: #35555 - Fix Android Shell top inset when nav bar is hidden
Platforms Affected: Android
Files Changed: 2 implementation, 2 test

Key Findings

  • Issue wrong statusbar height when Android device has a notch #35103 reports an Android-only display-cutout/notch regression that leaves a blank top gap; the issue body says iOS devices are unaffected.
  • PR Fix Android Shell top inset when nav bar is hidden #35555 changes Android app-bar inset consumption and toolbar visibility invalidation, and adds Android device regression tests for Shell and NavigationPage.
  • Prior MauiBot feedback warned that a hidden toolbar can still have stale positive measured height until the next layout pass; the current PR addresses this with MaterialToolbar.LayoutParameters.Height == 0 detection.
  • Current unresolved code-review feedback is test-quality focused: new tests directly call MauiWindowInsetListener.OnApplyWindowInsets, so they do not prove the production ViewCompat.RequestApplyInsets routing added in ToolbarExtensions.UpdateIsVisible.
  • Gate was already completed separately and passed per the prompt; this pre-flight did not re-run gate verification and did not overwrite gate/content.md.

Code Review Summary

Verdict: NEEDS_CHANGES
Confidence: medium
Errors: 0 | Warnings: 1 | Suggestions: 2

Key code review findings:

  • ⚠️ ShellTests.Android.cs:172 and NavigationPageTests.Android.cs:179 manually invoke the listener, bypassing the production inset redispatch path.
  • 💡 HasVisibleAppBarContent only ignores Gone, not Invisible, for non-toolbar children; low risk for current MAUI toolbar layout.
  • 💡 Android inset test helpers are duplicated across two test files.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35555 Detect real visible app-bar content using zero-height MaterialToolbar detection and request layout/insets from toolbar ancestors. ✅ PASSED (Gate) ToolbarExtensions.cs, MauiWindowInsetListener.cs, Android device tests Original PR; production code appears sound, tests need stronger dispatch-path coverage.

🔬 Code Review — Deep Analysis

Code Review — PR #35555

Independent Assessment

What this changes:

  1. MauiWindowInsetListener.cs — Replaces an inline MeasuredHeight-based check with a new static HasVisibleAppBarContent() method. The critical difference: MaterialToolbar with LayoutParameters.Height == 0 is now explicitly skipped rather than inspected for stale MeasuredHeight/Height values.
  2. ToolbarExtensions.UpdateIsVisible — When toolbar visibility changes, the code now walks up the view hierarchy to find AppBarLayout and CoordinatorLayout, calls MaybeRequestLayout() on each, then calls ViewCompat.RequestApplyInsets on the highest ancestor found instead of always calling it on the toolbar alone.

Inferred motivation: MAUI hides the nav bar by setting LayoutParameters.Height = 0 on the MaterialToolbar. Before a layout pass completes, Height and MeasuredHeight can still reflect the old positive size. The old code keyed off those stale sizes, concluded the app bar still had content, and kept consuming the top window inset, leaving a blank gap on devices with a display cutout.

Reconciliation with PR Narrative

Author claims: Fixes a Shell Android inset regression where hiding the nav bar leaves a blank top gap on cutout devices. Changes the app-bar content heuristic and promotes RequestApplyInsets to the coordinator root.

Agreement: The production code matches the described fix. The LayoutParameters.Height == 0 guard is the stable synchronous signal, while MeasuredHeight/Height are layout-pass artifacts. Requesting insets from the root coordinator is also appropriate because the listener is registered on the navigation root/coordinator path.

Findings

⚠️ Warning — Test exercises listener directly, not the production dispatch path

Both new device tests call listener.OnApplyWindowInsets(rootCoordinator, syntheticInsets) manually after hiding the toolbar:

  • ShellTests.Android.cs:172
  • NavigationPageTests.Android.cs:179

This verifies the listener logic in isolation, but does not prove the ToolbarExtensions.UpdateIsVisible production path that promotes RequestApplyInsets to the root coordinator. A regression in that routing could pass these tests. This matches the unresolved MauiBot review thread.

💡 Suggestion — HasVisibleAppBarContent ignores ViewStates.Invisible for non-MaterialToolbar children

The guard for Gone is correct for the MAUI hiding mechanism, but non-MaterialToolbar app-bar children with stale positive Height could still transiently count as content. This is a low-risk corner case because MAUI app-bar content is expected to be the toolbar path.

💡 Suggestion — Duplicate test helpers

CreateTopCutoutInsets and AssertTopInsets are duplicated across Shell and NavigationPage device tests. Consolidation would be useful if more Android inset tests are added.

Devil's Advocate

The production fix handles the hidden-toolbar case because LayoutParameters.Height is set synchronously before the inset callback. The main remaining concern is test quality rather than production-code correctness.

Verdict: NEEDS_CHANGES

Confidence: medium
Summary: The production fix is targeted and sound, but tests should be updated to exercise the production ViewCompat.RequestApplyInsets dispatch path rather than only directly invoking MauiWindowInsetListener.OnApplyWindowInsets.


🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 maui-expert-reviewer / try-fix Synchronously clear AppBar padding on hide and defer RequestApplyInsets with View.Post. ⚠️ BLOCKED 1 file Android device-test script could not run because MAUI build tasks were unavailable/out of date after one failed setup attempt; review found timing/detach risks.
2 maui-expert-reviewer / try-fix Cache last WindowInsetsCompat in MauiWindowInsetListener and synchronously replay cached insets when toolbar visibility changes. ⚠️ BLOCKED 2 files Same environment blocker; review found stale-cache/configuration risk and Controls/Core coupling.
3 maui-expert-reviewer / try-fix Get current root insets and directly invoke the registered listener synchronously after toolbar height changes. ⚠️ BLOCKED 2 files Same environment blocker; review found null-insets/AndroidX dispatch-order risk.
PR PR #35555 Detect real visible app-bar content with zero-height MaterialToolbar handling and request layout/insets from toolbar ancestors. ✅ PASSED (Gate) 4 files Original PR; production code remains lower risk than explored alternatives.

Cross-Pollination

Model Round New Ideas? Details
claude-sonnet-4.6 / maui-expert-reviewer 1 Yes Proposed synchronous padding clear plus deferred inset restore.
claude-opus-4.7 / maui-expert-reviewer 2 Yes After attempt 1, proposed cached-insets synchronous replay to avoid deferred callbacks.
gpt-5.3-codex / maui-expert-reviewer 3 Yes After attempt 2, proposed current-root-insets synchronous replay to avoid cached state.
gpt-5.5 / maui-expert-reviewer 4 No Remaining ideas collapse into deferred redispatch, cached/current inset replay, manual padding/inset application, or listener-detection tweaks; these are already tried or higher risk than PR #35555.

Environment Blocker

The required Android device-test command was run for each candidate:

pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform android -TestFilter "FullyQualifiedName~HiddenShellNavigationBarClearsAppBarInsetPadding|FullyQualifiedName~PushingToPageWithoutNavigationBarClearsAppBarInsetPadding"

All runs stopped before test execution with Maui.InTree.targets reporting that MSBuild tasks were not built or were out of date. One setup attempt was made with dotnet build Microsoft.Maui.BuildTasks.slnf --no-restore; it failed in this Linux environment because restore assets and .NET Framework 4.7.2 reference assemblies were unavailable. Per the autonomous-execution rule, the blocked test phase was recorded and the loop continued.

Exhausted: Yes
Selected Fix: PR #35555 — The PR is still the best candidate because it keeps normal AndroidX inset dispatch semantics, avoids deferred callbacks, avoids cached inset state, avoids direct listener invocation, and fixes stale toolbar measurement with localized zero-height MaterialToolbar detection. No alternative candidate was demonstrably better or lower risk.


📋 Report — Final Recommendation

Comparative Report — PR #35555

Candidates Compared

Rank Candidate Regression status Assessment
1 pr-plus-reviewer ✅ PR gate passed for underlying fix; sandbox diff check passed Best candidate. It preserves the PR's targeted Android production fix and adds reviewer-driven test coverage for the real UpdateIsVisible/RequestApplyInsets path.
2 pr ✅ Gate passed Production fix is sound and lower risk than all try-fix alternatives, but expert review found a remaining test coverage gap: hidden-state assertions manually invoke the inset listener rather than observing the production redispatch route.
3 try-fix-1 ⚠️ Blocked before test execution Defers inset work with View.Post and synchronously clears padding. This adds timing/detach risk and is less deterministic than the PR's normal AndroidX inset redispatch.
4 try-fix-3 ⚠️ Blocked before test execution Replays current root insets synchronously. This avoids cached state but bypasses normal AndroidX dispatch ordering and has null-insets/timing risk during attach/navigation transitions.
5 try-fix-2 ⚠️ Blocked before test execution Replays cached insets synchronously. This introduces stale-cache/configuration-change risk and extra Controls/Core coupling, making it the riskiest alternative.

Analysis

The raw PR fix is the best production approach among the submitted implementation candidates. It uses stable toolbar layout-parameter state to avoid stale measured heights and stays within normal AndroidX inset request semantics, instead of introducing deferred callbacks, cached inset state, or direct listener replay.

The expert reviewer did not identify a production correctness defect. The only actionable issue was regression-prevention quality: the new tests bypassed the redispatch path that ToolbarExtensions.UpdateIsVisible changed. Applying that feedback in the sandbox produces pr-plus-reviewer, which keeps the same production behavior but makes the tests observe a real listener dispatch after hiding the navigation bar.

All STEP 6a try-fix-* candidates were blocked before Android regression tests could run. None has stronger evidence than the PR gate result, and each introduces additional design risk compared with the PR. Per ranking rules, no candidate with failed or blocked regression evidence ranks above a candidate with a passing gate and lower production risk.

Winner

pr-plus-reviewer wins. It is the PR fix plus focused test-strengthening from the expert review, with no production-code expansion beyond the already-passing PR approach.


After Shell.SetNavBarIsVisible(false) or NavigationPage.HasNavigationBar=false,
ViewCompat.RequestApplyInsets() triggers a dispatch of the real system insets
(not the synthetic ones injected earlier). The capturing listener therefore
records the real device insets in LastAppliedInsets, not the synthetic 24/96
values the test expected.

Fix by re-dispatching the synthetic insets explicitly after verifying the app
bar padding has cleared, then asserting the pass-through result against the
known synthetic values.
@kubaflo kubaflo changed the base branch from main to inflight/current May 27, 2026 09:00
@kubaflo kubaflo merged commit 721e8f0 into dotnet:inflight/current May 27, 2026
3 of 4 checks passed
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone May 27, 2026
PureWeen pushed a commit that referenced this pull request Jun 2, 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!

## Summary

Fixes a Shell Android inset regression where hiding the navigation bar
could leave a blank top gap on devices with a display cutout.

Fixes #35103

## What changed

- update Android app bar inset handling to detect real visible app bar
content instead of relying on measured height that can be inflated by
stale padding
- request layout and inset reapplication from the toolbar parent/app bar
root when Shell toolbar visibility changes
- add an Android Shell device regression test for hidden navigation bars
retaining top inset padding

## Verification

- built `Microsoft.Maui` and `Microsoft.Maui.Controls` for Android
successfully
- ran Android Controls Shell device tests on an emulator via direct
instrumentation: 70 passed, 0 failed
- verified `HiddenShellNavigationBarClearsAppBarInsetPadding` passed
kubaflo pushed a commit that referenced this pull request Jun 10, 2026
…ntime, and ToggleHasNavigationBar_HidesBar_Visual test failures (#35819)

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

### Root Cause
- PR #35555 calls ViewCompat.RequestApplyInsets() synchronously in
ToolbarExtensions.UpdateIsVisible — before the layout pass runs. At that
moment, GetLocationOnScreen returns the content view's stale
pre-collapse position, which makes SafeAreaExtensions think the view is
already safely below the status bar and zeros the top inset. When layout
then runs and the AppBar collapses, the content moves to y=0 with
paddingTop=0 — rendering behind the status bar.

### Description of Change
- Instead of relying on the content view's on-screen position (which is
stale at dispatch time), the fix caches the AppBar's current visibility
state as AppBarHasContent on MauiWindowInsetListener — set at the start
of every inset dispatch before SafeAreaExtensions runs.
SafeAreaExtensions then uses this cached state in both inset branches:
when AppBar is confirmed hidden, the top inset is preserved on the
content view regardless of stale position; when AppBar is confirmed
visible, the top inset is zeroed so the content doesn't double-pad
alongside the AppBar. This ensures correct padding is applied in the
same layout frame as the AppBar visibility change — with no flicker and
no timing dependency.

### Issues Fixed
**Resolved test failures:**
 - ShellPages_NavBarVisibilityHide
 - VerifyNavBarStatusAtRuntime
 - ToggleHasNavigationBar_HidesBar_Visual
 
 ### Output
 
| Before | After |
|----------|----------|
| <img
src="https://github.com/user-attachments/assets/aa9fba3a-2deb-4216-9d53-a2a986f27688">
| <img
src="https://github.com/user-attachments/assets/9012667c-631a-4219-98da-0eccee151c9a">
|
PureWeen pushed a commit that referenced this pull request Jun 11, 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!

## Summary

Fixes a Shell Android inset regression where hiding the navigation bar
could leave a blank top gap on devices with a display cutout.

Fixes #35103

## What changed

- update Android app bar inset handling to detect real visible app bar
content instead of relying on measured height that can be inflated by
stale padding
- request layout and inset reapplication from the toolbar parent/app bar
root when Shell toolbar visibility changes
- add an Android Shell device regression test for hidden navigation bars
retaining top inset padding

## Verification

- built `Microsoft.Maui` and `Microsoft.Maui.Controls` for Android
successfully
- ran Android Controls Shell device tests on an emulator via direct
instrumentation: 70 passed, 0 failed
- verified `HiddenShellNavigationBarClearsAppBarInsetPadding` passed
kubaflo pushed a commit that referenced this pull request Jun 17, 2026
…es (#35940)

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

### Issue Details
- This PR reverts two chained Android safe area fixes that together
introduced regressions on the `inflight/candidate` branch:

**#[35555](#35555) — Fix Android
Shell top inset when nav bar is hidden**
- #35555 calls `ViewCompat.RequestApplyInsets()` synchronously inside
`ToolbarExtensions.UpdateIsVisible` — before the layout pass runs. At
that moment, `GetLocationOnScreen` returns the content view's stale
pre-collapse position, which makes `SafeAreaExtensions` think the view
is already safely below the status bar and zeros the top inset. When the
layout pass then runs and the AppBar collapses, the content moves to
`y=0` with `paddingTop=0` — rendering behind the status bar.
 
 This timing issue caused 3 UI snapshot test failures:
 - `ShellPages_NavBarVisibilityHide`
 - `VerifyNavBarStatusAtRuntime`
 - `ToggleHasNavigationBar_HidesBar_Visual`
 
**#35819 — Fix ShellPages_NavBarVisibilityHide,
VerifyNavBarStatusAtRuntime, and ToggleHasNavigationBar_HidesBar_Visual
test failures**
 
- #35819 attempted to fix the above 3 failures by caching the AppBar's
visibility state as `AppBarHasContent` on `MauiWindowInsetListener` and
using it as a guard in `SafeAreaExtensions.cs` — preserving `top` inset
when the AppBar is confirmed hidden, and zeroing it when the AppBar is
confirmed visible. This resolved the 3 test failures, but the
`AppBarHasContent != false` guard is too broad: it fires for **all views
on any page where the AppBar is hidden**, not just the stale Shell root
content view it was designed to protect. This introduced 8 new Android
UI snapshot regressions:
 - `EditorRuntimeTextAlignmentChanged`
 - `EditorPlaceholderRuntimeTextAlignmentChanged`
 - `VerifyLabelBackgroundIsClippedWithRectangleGeometry`
 - `TransparentShapeShouldNotDisplayShadow`
 - `TabBarShouldBeVisibleAfterNavigatingFromModalViaGoToAsync`
 - `VerifySwitchControlSize`
 - `CreateStackWithPadding`
 - `ModalNavigationShouldNotHang`
 
 ### Reason
 
- The fundamental issue is a race between `RequestApplyInsets()`
dispatch and the layout pass. #35555 introduced the race; #35819
attempted to work around it via an `AppBarHasContent` state cache, but
the guard scope is too wide — it applies `paddingTop=statusBarHeight` to
unrelated child views (e.g., centered `StackLayout`, `Editor`, overlays)
that happen to be visible when the AppBar is hidden, producing incorrect
offsets across a wide range of layout scenarios.
- Reverting both PRs to restore the stable pre-#35555 baseline while a
correct fix is designed.
 
 ### Changes
 
**From #35819** (`MauiWindowInsetListener.cs`, `SafeAreaExtensions.cs`):
- Removed `AppBarHasContent` nullable bool property and
`SetAppBarContentState` method
- Removed `SetAppBarContentState` dispatch call from
`ApplyDefaultWindowInsets`
 - Removed `AppBarHasContent = null` reset on navigation
- Removed `AppBarHasContent == true` guard in the `overlap` branch of
`ApplyAdjustedSafeAreaInsetsPx`
- Removed `AppBarHasContent != false` guard in the `below-safe` branch
of `ApplyAdjustedSafeAreaInsetsPx`
 
**From #35555** (`ToolbarExtensions.cs`, `MauiWindowInsetListener.cs`,
device tests):
- Replaced `HasVisibleAppBarContent()` with the original simple inline
`MeasuredHeight > 0` check
- Removed smart `RequestApplyInsets` chain (CoordinatorLayout →
AppBarLayout → toolbar fallback);
   reverted to simple `ViewCompat.RequestApplyInsets(nativeToolbar)`
- Removed device tests:
`HiddenShellNavigationBarClearsAppBarInsetPadding` and
   `PushingToPageWithoutNavigationBarClearsAppBarInsetPadding`
- Removed test helpers `CreateTopCutoutInsets`, `AssertTopInsets`,
`AttachCapturingWindowInsetsListener`,
   and `CapturingWindowInsetsListener`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrong statusbar height when Android device has a notch

4 participants