Skip to content

[ci-fix-net11] Fix TopTabUnselectedTextVisibleWhenSwitchingTabs visual regression on Android Material3 - #36911

Merged
kubaflo merged 4 commits into
dotnet:net11.0from
devanathan-vaithiyanathan:fix-36856
Aug 1, 2026
Merged

kubaflo merged 4 commits into
dotnet:net11.0from
devanathan-vaithiyanathan:fix-36856

Conversation

@devanathan-vaithiyanathan

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Issue Details:

The TopTabUnselectedTextVisibleWhenSwitchingTabs test failed in .NET 11 because ShellHandler is enabled by default. The failure does not occur when using ShellRenderer.

In the ShellHandler implementation, ShellContentNavigationFragment.ConnectAndInitialize() sets the navigation container background to BackgroundLight (white, #FFFFFF) for all light-mode scenarios. In contrast, the previous ShellPageContainer implementation used ?attr/colorSurface (#FEF7FF) from Material3.

Description of Change

  • Added GetMaterial3Background() — resolves ?attr/colorSurface (#FEF7FF) matching ShellPageContainer
  • Added GetResourceBackground() — returns BackgroundLight/BackgroundDark for non-Material3
  • Updated ConnectAndInitialize() to call these helpers via RuntimeFeature.IsMaterial3Enabled
  • Updated ShellSectionHandler to use the shared Context.GetActionBarHeight() helper when sizing the top-tab TabLayout, preserving the themed actionBarSize height while removing duplicate attribute-resolution logic.

Issues Fixed

Fixes #36856

@azure-pipelines

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

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jul 29, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan added the community ✨ Community Contribution label Jul 29, 2026
@github-actions github-actions Bot added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android labels Jul 29, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review July 30, 2026 02:32
Copilot AI review requested due to automatic review settings July 30, 2026 02:32
@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Android ShellContentNavigationFragment navigation container background behavior so that when a Shell content page has no explicit Background, the container uses the Material3 colorSurface value (instead of the generic BackgroundLight / white), aligning behavior with the legacy ShellPageContainer and avoiding a visual regression in Material3 scenarios.

Changes:

  • Updated ConnectAndInitialize() to select the navigation container background based on RuntimeFeature.IsMaterial3Enabled.
  • Added a Material3 helper (GetMaterial3Background) that resolves ?attr/colorSurface from the active theme.
  • Added a non-Material3 helper (GetResourceBackground) that uses Android’s BackgroundLight / BackgroundDark resources.

@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines

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

kubaflo
kubaflo previously approved these changes Jul 30, 2026
@kubaflo

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:154

  • context.GetActionBarHeight() can return -1 when the theme/attr can't be resolved (ContextExtensions.GetThemeAttributePixels returns -1). Because -1 equals LayoutParams.MatchParent, this changes the fallback behavior from the previous code (which used WrapContent) and could make the TabLayout unexpectedly fill the parent if actionBarSize isn't available. Consider guarding the value and falling back to LP.WrapContent (or another safe default) when the resolved height is <= 0.
            int actionBarHeight = context.GetActionBarHeight();

@sheiksyedm
sheiksyedm requested a review from kubaflo July 31, 2026 10:26
@sheiksyedm

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

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 31, 2026
@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jul 31, 2026
@MauiBot

This comment has been minimized.

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

This comment has been minimized.

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

MauiBot commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

AI Review Summary

@devanathan-vaithiyanathan — new AI review results are available based on this last commit: 77b1382.

Gate No Tests Confidence Low Platform Android Runtime Code


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

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📱 UI Tests — Shell

Detected UI test categories: Shell

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

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Shell 181/285 (104 ❌) 200 diff PNGs
🔍 AI analysis of failures — PR-related vs unrelated

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

Likely unrelated: the failures appear pre-existing, flaky, or infrastructure.

  • ● Unrelated — Catalyst Shell visual snapshot mismatches (100+ tests): the deep run executed on Mac Catalyst, but every PR change is in Android-only Shell handler files, so these catalyst Shell rendering baselines could not be affected by this PR's compiled code.
  • ● Unrelated — Catalyst Shell Appium wait timeouts (~4 tests): timeout failures such as VerifyShellFlyoutBackgroundImageSetNull match a common nondeterministic UI/infrastructure pattern, and the Android-only diff is not in scope for this catalyst run.

Strongest signal: all changed files are *.Android.cs, while the failing run is catalyst; re-check catalyst baseline/infrastructure before attributing these failures to the PR.

❌ Shell — 104 failed tests
SearchHandlerBackgroundColorResetsToDefault
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: SearchHandlerBackgroundColorApplied.png (16.76% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at Microsoft.Maui.TestCases.Tests.Issues.Issue35088.SearchHandlerBackgroundColorResetsToDefault() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35088.cs:line 34
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
VerifyExistingTabTitle
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyExistingTabTitle.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullab
...
ShellPages_PresentationModeModalAnimated
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShellPages_PresentationModeModalAnimated.png (21.96% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 
...
EnsureCustomFlyoutIconColor
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: EnsureCustomFlyoutIconColor.png (15.68% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, N
...
VerifyShellFlyout_HeightAndWidthWithBackgroundColor
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyShellFlyout_HeightAndWidthWithBackgroundColor.png (18.19% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

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

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nul
...
Shell_Issue21916
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Shell_Issue21916.png (15.92% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 r
...
VerifyShellFlyoutBackgroundImageSetNull
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 797
   at Microsoft.Maui.TestCases.Tests.Issues.Issue21472.VerifyShellFlyoutBackgroundImageSetNull() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21472.cs:line 29
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandle
...
ShellFlyoutIconShouldNotBeBlack
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShellFlyoutIconShouldNotBeBlack.png (15.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDela
...
ClickingOnTabToPopToRootDoesntBreakNavigation
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 797
   at Microsoft.Maui.TestCases.Tests.Issues.Issue9006.ClickingOnTabToPopToRootDoesntBreakNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue9006.cs:line 35
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHa
...
BackButtonBehaviorIsVisibleWorksWithCustomIcon
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: BackButtonBehaviorIsVisibleWorksWithCustomIcon.png (15.58% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nulla
...
ForegroundColorShouldbeSetandCustomIconAlignedProperly
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ForegroundColorShouldbeSetandCustomIconAlignedProperly.png (15.51% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String nam
...
ShellPages_PresentationModeNotAnimated
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShellPages_PresentationModeNotAnimated.png (15.59% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 re
...
VerifyShellFlyout_FlyoutVerticalScrollModeDisabled
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyShellFlyout_FlyoutVerticalScrollModeDisabled.png (15.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

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

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

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1
...
ShellBadgeMultipleTabsCanHaveBadges
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShellBadgeMultipleTabsCanHaveBadges.png (16.03% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retry
...
VerifySearchHandlerPlaceholderText
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifySearchHandlerPlaceholderText.png (15.63% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryD
...
VerifyShellFlyout_BackgroundImageAspect_AspectFit
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyShellFlyout_BackgroundImageAspect_AspectFit.png (15.95% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

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

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

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDe
...
PopLogicExecutesWhenUsingBackButtonBehavior
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, IQuery query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 929
   at UITest.Appium.HelperExtensions.TapBackArrow(IApp app, IQuery query) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2313
   at UITest.Appium.HelperExtensions.TapBackArrow(IApp app, String customBackButtonIdentifier) in /_/src/TestUtils/src/UITest.Appium/HelperExte
...
ShellBadgeCanBeCleared
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: ShellBadgeCanBeCleared.png (16.03% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullab
...
SearchHandlerVisibilityChangesToCollapsible
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: SearchHandlerVisibilityChangesToCollapsible.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable
...
EnsureFlyoutIconWithForegroundColor
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: EnsureFlyoutIconWithForegroundColor.png (15.67% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retry
...
VerifyDynamicFlyoutIconBackgroundColor
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyDynamicFlyoutIconBackgroundColor.png (20.08% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 re
...
VerifyShellFlyout_DisplayOptionsWithHeaderTemplateAndFooterTemplate
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyShellFlyout_DisplayOptionsWithHeaderTemplateAndFooterTemplate.png (24.96% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

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

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable
...
TabBarIconsShouldAutoscaleShell
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: TabBarIconsShouldAutoscaleShell.png (15.53% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
   at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDela
...
VerifyShellFlyout_Height
VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: VerifyShellFlyout_Height.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
   at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_Height() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 479
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at 
...

(+74 more — see TRX in artifact)

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


📋 Pre-Flight — Context & Validation

Issue: #36856 - [ci-scan-net11] [CI] TopTabUnselectedTextVisibleWhenSwitchingTabs fails on Android Material3 (visual regression, 3.07% snapshot difference)
PR: #36911 - [ci-fix-net11] Fix TopTabUnselectedTextVisibleWhenSwitchingTabs visual regression on Android Material3
Platforms Affected: Android runtime code; requested test platform Catalyst cannot exercise the changed .Android.cs code paths
Files Changed: 2 implementation, 0 test

Key Findings

  • PR addresses an Android Material3 Shell visual regression where Issue35125.TopTabUnselectedTextVisibleWhenSwitchingTabs differed from baseline by 3.07% on Android API 36 Material3.
  • The main fix changes ShellContentNavigationFragment.Android.cs so a Shell root page with no explicit background uses Material3 colorSurface instead of Android BackgroundLight, matching legacy ShellPageContainer behavior.
  • The PR also changes ShellSectionHandler.Android.cs top-tab sizing from a local typed-array actionBarSize lookup with LP.WrapContent fallback to context.GetActionBarHeight().
  • No tests were detected by the pre-run gate. The requested Catalyst platform is not relevant for Android-only runtime changes.

Code Review Summary

Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • ✗ src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:157 — context.GetActionBarHeight() can return/cache -1; because -1 is LayoutParams.MatchParent, the top-tab TabLayout can fill the parent instead of falling back to LP.WrapContent.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #36911 Set ShellContent navigation container background to Material3 colorSurface for null-background root pages; replace top-tab typed-array height lookup with context.GetActionBarHeight() ⚠️ SKIPPED (Gate: no tests detected) ShellContentNavigationFragment.Android.cs, ShellSectionHandler.Android.cs Original PR; code review found top-tab fallback regression risk

🔬 Code Review — Deep Analysis

Code Review — PR #36911

Independent Assessment

What this changes: Android Shell content containers now use Material3 colorSurface for default backgrounds, and Shell top-tab height now uses Context.GetActionBarHeight().
Inferred motivation: Restore visual parity with legacy Shell renderer for Material3 Android Shell.

Reconciliation with PR Narrative

Author claims: Fixes Android Material3 Shell top-tab visual regression by matching legacy background behavior.
Agreement/disagreement: Background fix matches the claim; the top-tab height refactor is not behavior-preserving.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
GetActionBarHeight() can return -1, causing MatchParent tab height MauiBot AI Summary / prior Copilot suppressed comment ❌ Unresolved Current PR head still has int actionBarHeight = context.GetActionBarHeight(); at ShellSectionHandler.Android.cs:157.

Blast Radius Assessment

  • Runs for all instances: Yes — Android Shell sections/top tabs and Shell content pages with null backgrounds.
  • Startup impact: Yes — handler/platform element creation.
  • Static/shared state: Yes — GetActionBarHeight() caches _actionBarHeight.

CI Status

  • Required-check result: gh pr checks --required unavailable (gh unauthenticated). Public PR discussion shows prior deep UI tests passed for Shell, but required-check state was not available locally.
  • Classification: undetermined.
  • Action taken: confidence capped low.

Findings

❌ Error — Top-tab height can become MatchParent

src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:157

The removed code used typedArray.GetDimensionPixelSize(0, LP.WrapContent), preserving a safe WrapContent fallback when actionBarSize is unresolved. context.GetActionBarHeight() calls GetThemeAttributePixels(...), which returns -1 if the theme/attribute cannot resolve, and -1 is Android LayoutParams.MatchParent. A custom/nonstandard theme can therefore make the top TabLayout fill its parent and cover/shift Shell content. Guard non-positive heights or keep the typed-array fallback.

External Output Contract

Consumer token/pattern Producer location Producer emission condition Consumer assumption Ordinary negative case Downstream effect
N/A N/A No changed code classifies external tool output N/A N/A N/A

Failure-Mode Probing

  • Missing actionBarSize: helper returns/caches -1; tab height becomes MatchParent.
  • Reconnect/theme reuse: cached _actionBarHeight can propagate the first unresolved value globally.
  • Null page background: Material3 background path matches legacy pattern.
  • Handler lifecycle: no new subscriptions/disposal paths added.

Verdict: NEEDS_CHANGES

Confidence: low
Summary: The Material3 background fix looks sound, but the top-tab height refactor introduces a concrete Android layout regression. CI state is undetermined from this unauthenticated environment, so this cannot be LGTM.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 maui-expert-reviewer Move default Material3 backing color to Shell section host and restore typed-array top-tab fallback ⚠️ BLOCKED 2 files Catalyst cannot exercise Android-only changes; approach is broader and can affect transparent Shell content
2 maui-expert-reviewer Apply default background to current page platform view after NavigationFinished; locally clamp invalid top-tab height ⚠️ BLOCKED 2 files Catalyst build setup failed; possible first-frame flicker and shared helper remains bad for other callers
3 maui-expert-reviewer Add optional MauiNavHostFragment background provider and fix GetActionBarHeight() globally ⚠️ BLOCKED 3 files Android build setup failed after restore retry; broad Core navigation/helper change not demonstrably better
4 maui-expert-reviewer Use Shell-specific NavigationViewFragment first-frame default background and LP.WrapContent top-tab height ⚠️ BLOCKED 1 file Android build setup failed; WrapContent may regress historical 56dp tab height
PR PR #36911 Container-level Material3 background plus context.GetActionBarHeight() top-tab refactor ⚠️ SKIPPED (Gate) 2 files Original PR; has unresolved code-review error in top-tab fallback

Cross-Pollination

Model Round New Ideas? Details
maui-expert-reviewer 1 Yes Candidate 1: Shell section host backing surface; learned it is too broad and not Catalyst-testable
maui-expert-reviewer 2 Yes Candidate 2: page platform view after navigation; learned it may be too late for first frame and leaves shared cache issue
maui-expert-reviewer 3 Yes Candidate 3: nav-host provider plus global helper fix; learned it is broad infrastructure and build validation is blocked
maui-expert-reviewer 4 Yes Candidate 4: Shell-specific navigation fragment; learned remaining small strategy has top-tab height behavior risk and is still Android-only

Exhausted: Yes
Selected Fix: None — no candidate passed all tests. The most actionable improvement over the PR is to remove or guard the ShellSectionHandler.Android.cs context.GetActionBarHeight() refactor, because the background parity change appears aligned with the issue but the top-tab height change has a concrete regression mechanism.


📝 Recommended PR Title & Description

Assessment: ✏️ Recommend updating — the current description accurately explains the background fix, but it still describes the raw ShellSectionHandler GetActionBarHeight() refactor even though the winning fix should preserve the previous safe top-tab actionBarSize fallback.

Recommended title

[Android] Shell: Fix Material3 top-tab background regression

Recommended description

### Issue Details:
The TopTabUnselectedTextVisibleWhenSwitchingTabs test failed in .NET 11 because ShellHandler is enabled by default. The failure does not occur when using ShellRenderer.

In the ShellHandler implementation, ShellContentNavigationFragment.ConnectAndInitialize() was setting the navigation container background to BackgroundLight (white, #FFFFFF) for all light-mode scenarios. In contrast, the previous ShellPageContainer implementation used ?attr/colorSurface (#FEF7FF) from Material3.

### Description of Change

* Added GetMaterial3Background() — resolves ?attr/colorSurface (#FEF7FF) matching ShellPageContainer
* Added GetResourceBackground() — returns BackgroundLight/BackgroundDark for non-Material3
* Updated ConnectAndInitialize() to call these helpers via RuntimeFeature.IsMaterial3Enabled when the Shell root page has no explicit Background
* Preserved the existing top-tab TabLayout actionBarSize resolution/fallback behavior so unresolved actionBarSize values do not become MatchParent layout heights

### Issues Fixed

Fixes #36856

🏁 Report — Final Recommendation

Comparative Report — PR #36911

Candidate ranking

Rank Candidate Test result Assessment
1 pr-plus-reviewer Not run / blocked by Android-only change and Catalyst platform Best available candidate. It keeps the PR's targeted Material3 colorSurface parity fix and applies the expert review feedback by restoring a safe top-tab actionBarSize fallback.
2 pr Gate skipped: no tests detected The background fix is targeted and matches the legacy renderer behavior, but the GetActionBarHeight() top-tab refactor has a concrete -1 == MatchParent regression mechanism.
3 try-fix-2 Blocked Addresses the top-tab issue with a local non-positive guard, but moves background application until NavigationFinished, which may be too late for the first visual frame and still leaves the shared helper able to cache invalid values for other callers.
4 try-fix-3 Blocked Fixes the shared helper globally and moves background handling to nav-host infrastructure, but it is broad Core Android navigation work without compile or visual validation.
5 try-fix-4 Blocked Avoids the helper issue and applies a Shell-specific page-fragment background, but changes top-tab height to WrapContent, risking the historical 56dp/actionBarSize layout.
6 try-fix-1 Blocked Restores the typed-array fallback but colors the Shell section host broadly, which can affect transparent Shell content beyond the targeted root-page null-background case.

Decision

Winner: pr-plus-reviewer

No candidate passed regression tests; all alternative try-fix candidates were blocked, and the raw PR gate was skipped. Among candidates without passing validation, the safest choice is the one that preserves the narrow, issue-directed Material3 background fix while removing the concrete reviewer-identified top-tab layout regression. pr-plus-reviewer does that with the smallest behavioral surface.

Why not the raw PR?

The raw PR changes ShellSectionHandler.Android.cs from a local typed-array actionBarSize lookup with LP.WrapContent fallback to context.GetActionBarHeight(). GetActionBarHeight() currently caches the raw GetThemeAttributePixels(Resource.Attribute.actionBarSize) value; if unresolved, that value can be -1, which Android interprets as LayoutParams.MatchParent when assigned to TabLayout.LayoutParameters.Height. That is a concrete layout regression risk unrelated to the Material3 visual-background fix.

Why not a try-fix candidate?

The try-fix candidates explored broader placement/timing alternatives for the default background and different ways to address top-tab sizing, but none had successful validation. The broader candidates either changed where transparent Shell content can show through, applied the default background later than the first frame, modified shared Android navigation/helper infrastructure, or changed top-tab height semantics. With no passing regression evidence, those broader changes rank below the targeted PR fix plus the expert review correction.


🧭 Next Steps — review latest findings

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

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

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@devanathan-vaithiyanathan — test-failure review results are available based on commit 77b1382.

Maintainers can request a fresh review after new comments, commits, or CI runs by commenting /review tests.

Overall Needs human investigation Failures 16 Regressed vs base 0 Baseline 12 on base

Test Failure Review: Needs human investigation - click to expand

Overall verdict: Needs human investigation. None of the 16 distinct failures could be attributed as a genuine regression against the base branch (0 regressed-vs-base); 12 of 16 also fail on net11.0, but every one resolved as indeterminate (per-leg base sampling of 5 recent base builds shows the same legs red, never green), so none is provably dismissible as pre-existing/known either. The PR touches only Android Shell/handler code (2 files, 0 test files), which does not align with these CollectionView/device-test failures — but unexplained build legs, an aborted MacCatalyst check, and unconfirmed device-test greens forbid a clean verdict without a human read.

  • i Uncertain — CollectionView UI-test timeouts & visual diffs (~13 tests): OneTimeSetUp timeouts and visual comparisons on WinUI CollectionView, all also-red on base but indeterminate; representative ValidateDynamicItemTemplateDisplayed.
  • i Uncertain — Android device-test build errors & incomplete work items (~4 legs): Windows-hosted Android build errors and a Helix work item that reported a fatal runtime error mid-run (device-test work item incomplete (com.microsoft.maui.controls.devicetests-Signed)), masking any tests that never ran.
  • i Uncertain — unexplained build legs, aborted check & unverified device-test greens (~18 signals): 10 failed build legs yielded no extractable failure, 1 MacCatalyst CollectionView check was CANCELLED, 7 green device-test checks could not confirm Failed==0, and 1 failing check (Build Analysis) had no inspectable AzDO evidence.

Coverage: 141 checks · 134 passing · 7 failing · 0 pending · 0 inaccessible · 1 unmapped · 10 unexplained build legs · 0 unaccounted failing checks · 1 aborted failing checks · 0 canceled-build checks · 7 device-test unverified · 16 unattributed · 0 regressed-vs-base. Deterministic ceiling: Needs human investigation — 16 unattributed failures, 10 unexplained build legs, 1 aborted check, 7 device-test-unverified, and 1 uninspectable failing check.

Builds (this PR): maui-pr-devicetests 1534497, maui-pr-uitests 1534496. Base sampling (net11.0, 5 recent builds per definition): devicetests 1535345, uitests 1535443.

Recommended action

A human should open the 10 unexplained build legs, the CANCELLED MacCatalyst CollectionView check, and confirm the 7 device-test greens; the base branch is currently red with the same CollectionView timeouts, so re-running against a green base (or re-triggering after base recovers) is advised before merging.

@kubaflo
kubaflo merged commit b2b4f33 into dotnet:net11.0 Aug 1, 2026
134 of 141 checks passed
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Aug 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-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.

6 participants