Skip to content

[iOS] Fix Shell Flyout SafeArea Rendering#33335

Open
devanathan-vaithiyanathan wants to merge 12 commits intodotnet:mainfrom
devanathan-vaithiyanathan:shell-flyout-safe-area
Open

[iOS] Fix Shell Flyout SafeArea Rendering#33335
devanathan-vaithiyanathan wants to merge 12 commits intodotnet:mainfrom
devanathan-vaithiyanathan:shell-flyout-safe-area

Conversation

@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Dec 30, 2025

Issue Details

On iOS, Shell FlyoutItems are rendered inside the SafeArea.

Description of Change

Updated the Shell Flyout layout logic to ensure FlyoutItems are consistently rendered within the SafeArea for both portrait and landscape modes.

Issues Fixed

Fixes #32275

Output Screenshot

Before After
iOS
iOS-Before.mov
iOS
iOS-After.mov

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm sheiksyedm marked this pull request as ready for review December 31, 2025 14:09
Copilot AI review requested due to automatic review settings December 31, 2025 14:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes issue #32275 where Shell FlyoutItems were rendering inside the SafeArea on Android and iOS instead of respecting safe area insets in both portrait and landscape orientations. The fix simplifies the flyout layout logic on both platforms by removing complex conditional safe area handling and applying safe area insets more consistently.

Key Changes

  • Simplified iOS flyout content layout to unconditionally apply safe area insets
  • Removed iOS ScrollView content inset management logic
  • Simplified Android window inset handling to apply uniform padding
  • Fixed iOS footer positioning to account for bottom safe area insets

Reviewed changes

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

File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs Removed SetHeaderContentInset body and simplified LayoutContent to unconditionally apply safe area insets to all flyout content
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutContentRenderer.cs Updated footer positioning to account for bottom safe area insets
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs Simplified WindowsListener class by removing complex conditional padding logic and unused properties, now applies uniform padding to CoordinatorLayout

Copy link
Copy Markdown
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Tests failing

@rmarinho rmarinho added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Feb 18, 2026
@kubaflo kubaflo removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug labels Feb 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 10, 2026

🚀 Dogfood this PR with:

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

curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 33335

Or

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

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Could you add a test?

@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor Author

Could you add a test?

@kubaflo , I have included the test

@MauiBot MauiBot added s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) s/agent-changes-requested AI agent recommends changes - found a better alternative or issues and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) labels Mar 24, 2026
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

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

Could you please add snapshots?

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor Author

Could you please add snapshots?

@kubaflo , I have added the snapshots

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from MauiBot Apr 15, 2026
@dotnet dotnet deleted a comment from MauiBot Apr 15, 2026
@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Apr 15, 2026

🚦 Gate — Test Before and After Fix

👋 @devanathan-vaithiyanathan — new gate results are available. Please review the latest session below.

🚦 Gate Sessionc925146 · snapshot added · 2026-04-15 10:13 UTC

Gate Result: ❌ FAILED

Platform: IOS · Base: main · Merge base: b43bdad1

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue32275 Issue32275 ✅ FAIL — 295s ❌ FAIL — 167s
🔴 Without fix — 🖥️ Issue32275: FAIL ✅ · 295s

(truncated to last 15,000 chars)

t.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.04]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.14]   Discovered:  Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
   NUnit3TestExecutor discovered 6 of 6 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 4/15/2026 3:09:29 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 4/15/2026 3:09:29 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 4/15/2026 3:09:35 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 4/15/2026 3:09:35 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyDefaultFlyoutItemsRendering [12 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyoutItemsRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyDefaultFlyoutItemsRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyDefaultFlyoutItemsRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 25
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:09:41 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 4/15/2026 3:09:41 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 4/15/2026 3:09:48 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 4/15/2026 3:09:48 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyFlyoutWithHeaderFooter [11 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyFlyoutWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyFlyoutWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyFlyoutWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 39
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:09:53 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 4/15/2026 3:09:53 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 4/15/2026 3:09:59 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 4/15/2026 3:09:59 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentTemplateRendering [10 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 51
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:10:04 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 4/15/2026 3:10:04 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 4/15/2026 3:10:11 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 4/15/2026 3:10:11 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentTemplateWithHeaderFooter [11 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 67
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

>>>>> 4/15/2026 3:10:16 AM VerifyCustomFlyoutContentRendering Start
>>>>> 4/15/2026 3:10:16 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 4/15/2026 3:10:25 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 4/15/2026 3:10:25 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentRendering [14 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 80
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

>>>>> 4/15/2026 3:10:30 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 4/15/2026 3:10:30 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 4/15/2026 3:10:40 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 4/15/2026 3:10:40 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentWithHeaderFooter [16 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 97
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

NUnit Adapter 4.5.0.0: Test execution complete

Total tests: 6
     Failed: 6
Test Run Failed.
 Total time: 2.1444 Minutes

🟢 With fix — 🖥️ Issue32275: FAIL ❌ · 167s

(truncated to last 15,000 chars)

cts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.14]   Discovered:  Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
   NUnit3TestExecutor discovered 6 of 6 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 4/15/2026 3:12:07 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 4/15/2026 3:12:07 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 4/15/2026 3:12:12 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 4/15/2026 3:12:12 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyDefaultFlyoutItemsRendering [13 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyoutItemsRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyDefaultFlyoutItemsRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyDefaultFlyoutItemsRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 25
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:12:20 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 4/15/2026 3:12:20 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 4/15/2026 3:12:26 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 4/15/2026 3:12:26 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyFlyoutWithHeaderFooter [13 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyFlyoutWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyFlyoutWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyFlyoutWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 39
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:12:33 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 4/15/2026 3:12:33 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 4/15/2026 3:12:39 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 4/15/2026 3:12:39 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentTemplateRendering [11 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 51
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

>>>>> 4/15/2026 3:12:44 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 4/15/2026 3:12:44 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 4/15/2026 3:12:52 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 4/15/2026 3:12:52 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentTemplateWithHeaderFooter [12 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 67
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

>>>>> 4/15/2026 3:12:57 AM VerifyCustomFlyoutContentRendering Start
>>>>> 4/15/2026 3:12:57 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 4/15/2026 3:13:07 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 4/15/2026 3:13:07 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentRendering [17 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentRendering.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentRendering.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 80
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

>>>>> 4/15/2026 3:13:15 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 4/15/2026 3:13:15 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 4/15/2026 3:13:26 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 4/15/2026 3:13:26 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed VerifyCustomFlyoutContentWithHeaderFooter [18 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     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 84
   at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
   at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
   at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 97
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

NUnit Adapter 4.5.0.0: Test execution complete

Test Run Failed.
Total tests: 6
     Failed: 6
 Total time: 1.6048 Minutes

⚠️ Issues found
  • Issue32275 FAILED with fix (should pass)
    • VerifyDefaultFlyoutItemsRendering [13 s]; VerifyFlyoutWithHeaderFooter [13 s]; VerifyCustomFlyoutContentTemplateRendering [11 s]; VerifyCustomFlyoutContentTemplateWithHeaderFooter [12 s]; VerifyCustomFlyoutContentRendering [17 s]; VerifyCustomFlyoutContentWithHeaderFooter [18 s]
    • VisualTestUtils.VisualTestFailedException : Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyou...
📁 Fix files reverted (2 files)
  • eng/pipelines/ci-copilot.yml
  • src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Apr 15, 2026

🤖 AI Summary

👋 @devanathan-vaithiyanathan — new AI review results are available. Please review the latest session below.

📊 Review Sessionc925146 · snapshot added · 2026-04-15 11:36 UTC
🔍 Pre-Flight — Context & Validation

Issue: #32275 - [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode
PR: #33335 - [iOS] Fix Shell Flyout SafeArea Rendering
Platforms Affected: iOS (fix), Android (issue reported but not addressed by this PR)
Files Changed: 4 implementation/test, 6 PNG snapshots

Key Findings

  • Issue [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode #32275 was originally reported on Android (landscape mode notch collision), but this PR only fixes iOS via ShellFlyoutLayoutManager.cs
  • PR refactors LayoutContent() to compute contentY and contentHeight explicitly, and unconditionally applies safeAreaBottom (unlike safeAreaTop which is conditional)
  • ShellFlyoutContent.cs was refactored into a base class ShellFlyoutContentBase so both ShellFlyoutContent and new Issue32275 test page can share logic
  • Gate FAIL root cause: All 6 snapshot tests fail both "without fix" and "with fix" — snapshots were added to ios-26/ folder but CI gate runs on standard iOS and expects them in ios/ folder
  • Copilot reviewer flagged that safeAreaBottom is always applied regardless of ShouldHonorSafeArea(), potentially breaking apps with explicit margins expecting edge-to-edge behavior
  • Test file uses inline #if IOS directive (not per guidelines — should use extension method or test platform filter)
  • Prior agent review exists (labels: s/agent-reviewed, s/agent-changes-requested, s/agent-gate-failed)

Edge Cases

  • Safe area behavior in landscape mode (the original issue scenario) — not tested by screenshot tests
  • FlyoutHeaderBehavior.Scroll / CollapseOnScroll with safe area bottom padding — possible double-padding
  • Views with explicit Margin set — safeAreaBottom is applied even when ShouldHonorSafeArea() would return false

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #33335 Refactor LayoutContent() to use explicit contentY/contentHeight; apply safeAreaBottom unconditionally ❌ FAILED (Gate) ShellFlyoutLayoutManager.cs Snapshots in wrong folder (ios-26/ vs ios/)

🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix (claude-opus-4.6) Conditional safeAreaBottom (same ShouldHonorSafeArea() gate as top) + generate fresh ios/ snapshots ✅ PASS ShellFlyoutLayoutManager.cs + 6 PNGs Symmetric SA handling; different from PR's unconditional bottom
2 try-fix (claude-sonnet-4.6) Snapshot-only fix — no code change, generate ios/ baselines from original code ✅ PASS 6 PNGs only Tests pass, but baselines reflect unfixed rendering
3 try-fix (gpt-5.3-codex) Split SA check: top follows header/content policy, bottom checks ShouldHonorSafeArea(Content) directly ❌ FAIL ShellFlyoutLayoutManager.cs Baseline size mismatch (1124x2436 vs 1124x2286) after 3 iterations
4 try-fix (gpt-5.4) Keep PR's code as-is (unconditional safeAreaBottom) + generate missing ios/ snapshots ✅ PASS 6 PNGs only (code unchanged) PR's code direction preserved; snapshot folder fix is the minimal change
PR PR #33335 Refactor LayoutContent() with explicit contentY/contentHeight; unconditional safeAreaBottom ❌ FAILED (Gate) ShellFlyoutLayoutManager.cs + 6 ios-26/ PNGs Gate failed: snapshots in wrong folder (ios-26/ not ios/)

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 No Attempts 1-4 cover the approach space; snapshot folder fix is the essential change
claude-sonnet-4.6 2 No All approaches converge on fixing the ios/ snapshot folder
gpt-5.3-codex 2 No Attempt 3 explored a deeper divergence; failed with size mismatch
gpt-5.4 2 No Confirms PR code + snapshot fix is viable

Exhausted: Yes
Selected Fix: Candidate #1 (Attempt 1) — Conditional safeAreaBottom + ios/ snapshots
Reason: Most semantically correct: symmetric ShouldHonorSafeArea() for both top and bottom edges prevents breaking apps that opt out of safe area handling. All 6 tests pass. Simpler than PR's refactored two-variable pattern while still fixing the root issue.


📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Issue #32275 (iOS flyout SA), 4 impl/test files + 6 PNG snapshots
Gate ❌ FAILED iOS — all 6 tests fail (snapshots in wrong folder)
Try-Fix ✅ COMPLETE 4 attempts, 3 passing
Report ✅ COMPLETE

Summary

PR #33335 fixes iOS Shell Flyout SafeArea rendering by refactoring LayoutContent() in ShellFlyoutLayoutManager.cs to properly apply safe area insets. The code direction is correct, but the PR committed all 6 test snapshots to ios-26/ (iOS 26+ environment) while CI and the local gate run on standard iOS which expects snapshots in ios/. This caused all 6 tests to fail both before and after the fix.

Root Cause

The gate failure is not about the code fix itself — it is entirely a snapshot folder mismatch. The PR added baseline images to src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ but the test environment maps to src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/. All 6 tests reported "Baseline snapshot not yet created" for the ios/ path.

Fix Quality

The code change to LayoutContent() is architecturally sound but has one concern: safeAreaBottom is applied unconditionally in the PR, whereas safeAreaTop is gated by ShouldHonorSafeArea(). This asymmetry could break apps that explicitly set Margin or set IgnoreSafeArea = true on flyout content — they would still have their content cropped at the bottom by the home indicator inset.

Try-fix Attempt 1 demonstrated that making safeAreaBottom conditional (same ShouldHonorSafeArea() gate) also passes all 6 tests and is more consistent with the codebase's existing pattern.

Required Changes

  1. Add ios/ snapshots — either generate fresh baselines on standard iOS, or copy the ios-26/ snapshots if the rendering is identical. This is the blocking issue.
  2. Make safeAreaBottom conditional — use the same ShouldHonorSafeArea() check for the bottom inset to maintain symmetric ISafeAreaView behavior (recommended, but not blocking if intentionally always applied).
  3. Inline #if IOS in testIssue32275.cs in TestCases.Shared.Tests wraps the class in #if IOS. Per guidelines, platform-specific test behavior should be behind extension methods. This is a minor quality issue.
  4. Issue mismatch — Issue [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode #32275 was reported on Android (landscape mode notch collision). The PR title says [iOS] but the issue is labeled platform/android, platform/ios. The Android part of the issue remains open.

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 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android platform/ios s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-gate-failed AI could not verify tests catch the bug 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.

[NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode

9 participants