Skip to content

[Android] Fix custom WebViewClient being overridden by MAUI handler mapper#34426

Open
NirmalKumarYuvaraj wants to merge 5 commits into
dotnet:net11.0from
NirmalKumarYuvaraj:fix-34392
Open

[Android] Fix custom WebViewClient being overridden by MAUI handler mapper#34426
NirmalKumarYuvaraj wants to merge 5 commits into
dotnet:net11.0from
NirmalKumarYuvaraj:fix-34392

Conversation

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

The MAUI handler lifecycle calls ConnectHandler before the property mappers run. When a developer sets a custom WebViewClient in ConnectHandler, the subsequent execution of MapWebViewClient (triggered by the mapper pipeline) would call platformView.SetWebViewClient(new MauiWebViewClient(...)), silently discarding the custom client. Since MapWebViewClient and MapWebChromeClient serve no purpose beyond initial setup — they are not responding to any virtual view property change — registering them in the mapper was incorrect. Moving client creation to CreatePlatformView() and removing them from the mapper pipeline ensures the default clients are set once, before ConnectHandler runs, allowing developers to override them reliably.

Description of Change

On Android, WebViewHandler registered MapWebViewClient and MapWebChromeClient as property mapper entries. These mappers created new MauiWebViewClient/MauiWebChromeClient instances and set them on the platform view every time they ran — after ConnectHandler was called. This meant any custom WebViewClient set by users in ConnectHandler (e.g., to intercept navigation via ShouldOverrideUrlLoading) would be silently replaced by MAUI's default client.

Changes:

  • Removed MapWebViewClient and MapWebChromeClient mapper methods entirely
  • Default clients are now created once in CreatePlatformView() and stored as private fields (_webViewClient, _webChromeClient)
  • DisconnectHandler uses the stored field references directly for Disconnect() and Dispose(), rather than casting from the platform view
  • Users can now safely override the WebViewClient in ConnectHandler without MAUI replacing it

Issues Fixed

Fixes #34392

@github-actions

github-actions Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Mar 11, 2026
@karthikraja-arumugam karthikraja-arumugam added the community ✨ Community Contribution label Mar 17, 2026
@NirmalKumarYuvaraj NirmalKumarYuvaraj changed the title [WIP] [Android] Fix custom WebViewClient being overridden by MAUI handler mapper [Android] Fix custom WebViewClient being overridden by MAUI handler mapper Mar 24, 2026
@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 28, 2026
@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@kubaflo , Addressed Test case failures. Please let me know if you have any concerns.

@MauiBot MauiBot added s/agent-review-incomplete 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-fix-win AI found a better alternative fix than the PR and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-review-incomplete s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates labels Mar 30, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review April 6, 2026 06:44
Copilot AI review requested due to automatic review settings April 6, 2026 06:44

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

Fixes an Android handler lifecycle issue in .NET MAUI where WebViewHandler’s property mapper would overwrite a custom WebViewClient set by apps in ConnectHandler, preventing reliable ShouldOverrideUrlLoading interception.

Changes:

  • Remove MapWebViewClient / MapWebChromeClient from the Android property mapper and initialize default clients once during platform view creation.
  • Update Android DisconnectHandler to disconnect/dispose stored client instances instead of casting from the platform view.
  • Add a new HostApp repro page + UITest coverage for issue #34392 to validate custom WebViewClient behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt Records removal of Android WebViewHandler mapper APIs (but currently conflicts with shipped API state).
src/Core/src/Handlers/WebView/WebViewHandler.cs Removes Android mapper entries that were reassigning clients after ConnectHandler.
src/Core/src/Handlers/WebView/WebViewHandler.Android.cs Creates default MauiWebViewClient/MauiWebChromeClient in CreatePlatformView() and adjusts disconnect/disposal behavior.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34392.cs Adds an Android-only UITest to validate ShouldOverrideUrlLoading gets called.
src/Controls/tests/TestCases.HostApp/MauiProgram.cs Registers the custom handler used for the repro/test.
src/Controls/tests/TestCases.HostApp/Issues/Issue34392.cs Adds the HostApp issue page + custom WebView/handler/client used by the test.
Comments suppressed due to low confidence (1)

src/Core/src/Handlers/WebView/WebViewHandler.Android.cs:97

  • The PR removes MapWebViewClient/MapWebChromeClient methods, but these APIs are already listed in src/Core/src/PublicAPI/net-android/PublicAPI.Shipped.txt. Removing shipped public APIs is a breaking change and will also cause PublicAPI analyzer failures unless handled as a shipped removal. Prefer keeping these methods (even if they’re no longer used by the mapper) and/or marking them obsolete, rather than deleting them outright.
		public static void MapSource(IWebViewHandler handler, IWebView webView)
		{
			ProcessSourceWhenReady(handler, webView);
		}

		public static void MapUserAgent(IWebViewHandler handler, IWebView webView)
		{
			handler.PlatformView.UpdateUserAgent(webView);
		}

		public static void MapWebViewSettings(IWebViewHandler handler, IWebView webView)
		{
			handler.PlatformView.UpdateSettings(webView, true, true);
		}

Comment thread src/Core/src/Handlers/WebView/WebViewHandler.Android.cs
Comment thread src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
Comment thread src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34392.cs Outdated

@kubaflo kubaflo 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.

Could you please check copilot's suggestions and the ai's summary?

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@kubaflo , Addressed AI summary.

@kubaflo kubaflo 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.

Could you please resolve conflicts?

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@kubaflo , Rebased and resolved the conflicts. Please let me know if you have any concern.

@dotnet dotnet deleted a comment from MauiBot Apr 13, 2026
@dotnet dotnet deleted a comment from MauiBot Apr 13, 2026
@MauiBot

MauiBot commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

🚦 Gate — Test Before and After Fix

👋 @NirmalKumarYuvaraj — new gate results are available. Please review the latest session below.

🚦 Gate Session6e9af5b · addressed AI summary · 2026-04-13 18:43 UTC

Gate Result: ⚠️ ENV ERROR

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

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue34392 Issue34392 ⚠️ ENV ERROR ✅ PASS — 531s
🔴 Without fix — 🖥️ Issue34392: ⚠️ ENV ERROR · 1727s

(truncated to last 15,000 chars)

tApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]

Build FAILED.

/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:  [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010:    at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:16:12.29
* daemon not running; starting now at tcp:5037
* daemon started successfully
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:08:51.05
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 1.14 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 10 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.65 sec).
  Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6.03 sec).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 378 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.09 sec).
  5 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.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.12]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.34]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/13/2026 18:33:16 FixtureSetup for Issue34392(Android)
>>>>> 04/13/2026 18:33:21 ShouldOverrideUrlLoading_Called Start
>>>>> 04/13/2026 18:33:31 ShouldOverrideUrlLoading_Called Stop
>>>>> 04/13/2026 18:33:31 Log types: logcat, bugreport, server
  Failed ShouldOverrideUrlLoading_Called [11 s]
  Error Message:
     Expected ShouldOverrideUrlLoading to be called and update the status label text to 'SUCCESS', but it was not updated within the timeout.
Assert.That(result, Is.True)
  Expected: True
  But was:  False

  Stack Trace:
     at Microsoft.Maui.TestCases.Tests.Issues.Issue34392.ShouldOverrideUrlLoading_Called() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34392.cs:line 22

1)    at Microsoft.Maui.TestCases.Tests.Issues.Issue34392.ShouldOverrideUrlLoading_Called() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34392.cs:line 22


NUnit Adapter 4.5.0.0: Test execution complete

Test Run Failed.
Total tests: 1
     Failed: 1
 Total time: 36.1530 Seconds

🟢 With fix — 🖥️ Issue34392: PASS ✅ · 531s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:06:56.69
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  All projects are up-to-date for restore.
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13819754
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.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.21]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.81]   Discovered:  Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 04/13/2026 18:42:50 FixtureSetup for Issue34392(Android)
>>>>> 04/13/2026 18:42:53 ShouldOverrideUrlLoading_Called Start
>>>>> 04/13/2026 18:42:56 ShouldOverrideUrlLoading_Called Stop
  Passed ShouldOverrideUrlLoading_Called [3 s]
NUnit Adapter 4.5.0.0: Test execution complete

Test Run Successful.
Total tests: 1
     Passed: 1
 Total time: 20.5294 Seconds

⚠️ Issues found
  • ⚠️ Issue34392 without fix: Exception calling "Matches" with "2" argument(s): "Value cannot be null. (Parameter 'input')"
📁 Fix files reverted (13 files)
  • eng/pipelines/ci-copilot.yml
  • eng/pipelines/ci-official.yml
  • src/Controls/src/Core/Handlers/Items/Android/TemplatedItemViewHolder.cs
  • src/Controls/src/SourceGen/Descriptors.cs
  • src/Controls/src/SourceGen/GeneratorHelpers.cs
  • src/Controls/src/SourceGen/InitializeComponentCodeWriter.cs
  • src/Controls/src/SourceGen/TrackingNames.cs
  • src/Controls/src/SourceGen/Visitors/SetPropertiesVisitor.cs
  • src/Controls/src/SourceGen/XamlGenerator.cs
  • src/Controls/src/Xaml/XmlName.cs
  • src/Core/src/Handlers/WebView/WebViewHandler.Android.cs
  • src/Core/src/Handlers/WebView/WebViewHandler.cs
  • src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt

New files (not reverted):

  • src/Controls/src/SourceGen/XCodeCodeWriter.cs

@NirmalKumarYuvaraj NirmalKumarYuvaraj changed the base branch from main to net11.0 April 14, 2026 05:51
@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@kubaflo , I think we can target this branch to net 11.

@kubaflo

kubaflo commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

@jfversluis do you think this change should be included in net11?

@kubaflo

kubaflo commented May 24, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/refactor-copilot-yml

@dotnet dotnet deleted a comment from MauiBot May 24, 2026
NirmalKumarYuvaraj and others added 4 commits May 25, 2026 10:17
…, update stale comment

- Add VerifyInternetConnectivity() call before WebView test assertion
- Use WaitForElement with predicate to wait for 'SUCCESS' text instead of racing
- Update stale comment referencing removed webclients mappers
- Add trailing newline to test files

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

kubaflo commented May 26, 2026

Copy link
Copy Markdown
Contributor

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

@MauiBot

MauiBot commented May 26, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

@kubaflo

kubaflo commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

AI code review for net11.0 target

Verdict: Needs changes

Non-approval automated review (no human approval implied). Independent diff-first pass, then reconciled with the PR description.

The core idea is sound: MapWebViewClient/MapWebChromeClient were not reacting to any virtual-view property and ran after ConnectHandler, clobbering a custom WebViewClient. Moving default-client creation into CreatePlatformView() and dropping those mapper entries is the right shape, and the removed public API is correctly recorded as *REMOVED* in PublicAPI.Unshipped.txt.

Key findings:

  • (Blocking) Unguarded WebViewClient/WebChromeClient getters can crash on Android < API 26. In DisconnectHandler, the new code reads platformView.WebViewClient and platformView.WebChromeClient unconditionally at the top of the method. WebView.getWebViewClient()/getWebChromeClient() were only added in API 26 — which is exactly why the original code accessed them inside if (OperatingSystem.IsAndroidVersionAtLeast(26)). MAUI still supports SupportedOSPlatformVersion android 21, so on API 21–25 this is a runtime regression (NoSuchMethodError) on every WebView teardown. Cache/compare clients without calling the API-26-only getters on older OS versions (e.g. keep using the stored _webViewClient/_webChromeClient fields, only consulting the platform getter under the version guard).
  • (Minor) Asymmetric cleanup of a replaced chrome client. The "clean up originals if they differ" block only handles _webViewClient; if a custom handler replaces the WebChromeClient in ConnectHandler, the original _webChromeClient is never Disconnect()/Dispose()d. Consider mirroring the _webViewClient handling for symmetry / to avoid a leak.

Test: the added Android UI test (Issue34392) exercises the real scenario (custom client in ConnectHandler) and polls for the async status update — good. Note it only validates API 26+ behaviour implicitly; the <26 path above isn't covered.

CI: required pipelines are red. Several failures (AOT macOS, RunOniOS_MauiRelease*) match the known CoreCLR R2R infra breakage tracked by #34303 and are unlikely PR-caused, but Build .NET MAUI Build Windows (Debug) is a build failure worth confirming is unrelated before merge.

Confidence: medium-high on the API-26 getter regression (mirrors the pre-existing guard); medium on CI attribution.

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@kubaflo , Addressed AI concerns.

@kubaflo

kubaflo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

/review rerun

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reviewing test failures on this PR... Review PR Test Failures

@kubaflo

kubaflo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reviewing test failures on this PR... Review PR Test Failures

@kubaflo

kubaflo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

AI code review refresh for net11.0 target

Verdict: LGTM (with CI caveat)

Head reviewed: 235b48e

Non-approval automated review (no human approval implied). Independent diff-first pass, then reconciled with the PR narrative and prior round's findings.

This commit ("addressed ai concerns") resolves both issues raised in the previous round:

  • (Resolved) API-26 getter regression. platformView.WebViewClient / WebChromeClient are now read only inside if (OperatingSystem.IsAndroidVersionAtLeast(26)). On API 21–25 the code falls back to the cached _webViewClient / _webChromeClient fields, so the unconditional getter access that would have thrown NoSuchMethodError on older OS levels is gone.
  • (Resolved) Asymmetric chrome-client cleanup. The "clean up originals if replaced" logic is now mirrored for _webChromeClient, so a custom-replaced chrome client's original is Disconnect()/Dispose()d symmetrically with the view client.

Disconnect/dispose paths trace cleanly across all four cases (default vs. custom-replaced × API≥26 vs. <26): the active client is disconnected (when it's a MauiWebViewClient) and disposed exactly once, the replaced original is cleaned up without double-dispose, and the _webViewClient/_webChromeClient fields are nulled. Removing MapWebViewClient/MapWebChromeClient from the Android mapper, moving default-client creation into CreatePlatformView(), and recording the two removed statics as *REMOVED* in PublicAPI.Unshipped.txt are all consistent.

Minor (non-blocking): on API <26 the cached _webViewClient/_webChromeClient are Dispose()d but not Disconnect()d (the Disconnect() calls remain under the API-26 guard even though the cached field reference doesn't require the getter). This matches the original pre-PR behavior (no disconnect on <26), so it's not a regression — just a small missed cleanup if you want symmetry there too.

Test: Issue34392 HostApp page + Android UI test exercise the real custom-WebViewClient-in-ConnectHandler scenario and poll for the async SUCCESS status update — appropriate coverage. The <26 teardown path remains uncovered by tests (inherent to the getter limitation).

CI: required pipelines are red, but the failures do not appear PR-caused. This change is Android-only (the modified Core file is .Android.cs; the WebViewHandler.cs mapper edit is inside #if __ANDROID__), so it cannot affect Windows/iOS/macOS compilation or tests. Red legs — Run Integration Tests AOT macOS, RunOniOS_MauiRelease* (Trim/CoreCLR variants), and Run Helix Unit Tests Windows (Debug) (while the Release variant passes) — are iOS/macOS/Windows and match the previously-noted known CoreCLR/R2R infra breakage (#34303) plus likely flake. Notably, the Build Windows (Debug) failure flagged last round is now green. Worth a maintainer confirming the AzDO known-issue attribution before merge.

Confidence: high on the code correctness (both prior concerns verifiably fixed, dispose paths traced); medium-high on CI being unrelated infra given the Android-only surface area.

Automated net11.0 refresh review — not an approval or merge authorization.

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

## Summary

- Recognizes the `MauiBot` account as the AI Summary author for `/review
rerun` eligibility.
- Replaces duplicated author regex checks with one allowlist helper used
by AI Summary detection and bot-comment rejection.
- Adds regression coverage based on #34426 comments
4239128463 and 4658057491.

## Validation

- `Invoke-Pester
.github/scripts/Resolve-RerunEligibility.Tests.ps1,.github/scripts/Invoke-RerunReviewTrigger.Tests.ps1
-CI`
- `Resolve-RerunEligibility.ps1 -PRNumber 34426 -CurrentCommentId
4658995396` returned `Rerun eligibility: True (new-head-commit)`
- Verified the patched helper selects AI Summary comment `4239128463`
authored by `MauiBot`.

## Fixes

- Follow-up to #35685

---------

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

kubaflo commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Synthesized multi-model review — PR #34426

Verdict: NEEDS_DISCUSSION · confidence: medium-high · inline: 0

Reconciliation (why the models split)

The disagreement is about non-code gating items, not correctness — the fix itself is correct and traces cleanly (independently re-verified at the review SHA). Gemini mis-analyzed the disconnect/dispose flow and over-escalated two already-discussed, non-blocking design points to NEEDS_CHANGES, while gpt-5.5/opus-4.8 correctly found no new blocking code error. The remaining spread (opus-4.6 LGTM vs. gpt-5.5/opus-4.8 ND) is purely tolerance for red-but-unrelated required CI plus an unresolved intentional binary-API removal: opus-4.6 dismissed both; the ND models (and this synthesis) treat them as genuine open items.

Validated findings

  • gemini [Draft] Readme WIP #1WebViewHandler.Android.cs:110 ("error": disposes developer's custom client → ObjectDisposedException): OVER-ESCALATED + already raised. On API 26+ MAUI does Dispose() the active client read from the platform getter, which can be a developer-supplied custom client; on <26 it is left untouched (mildly inconsistent). Legitimate ownership nit, but realistic impact is low — custom clients are created per-handler (as the PR's own test does), and it mirrors the pre-PR SetWebViewClient(null!) teardown. kubaflo's existing review (comment 6, Warning Update README.md #2) already raised exactly this. Not a confirmed error.
  • gemini Update README.md #2WebViewHandler.Android.cs:92 ("warning": API-26 guard blocks Disconnect on <26): INCORRECT / moot + already raised. MauiWebViewClient.Dispose() calls Disconnect() and MauiWebChromeClient.Dispose() calls UnregisterCallbacks(); both Dispose() calls (lines 97/107) are unconditional, so the clients ARE cleaned up on <26 — the gated explicit Disconnect() is merely redundant, not a bug. Comment 18 already flagged this as non-blocking and explicitly "not a regression" (matches pre-PR behavior).
  • opus-4.8 [Draft] Readme WIP #1 — PublicAPI binary break: VALID confirmation point, already under maintainer discussion. MapWebViewClient/MapWebChromeClient are in PublicAPI.Shipped.txt (lines 3130–3131); deleting them is binary-breaking, correctly recorded as *REMOVED*. The fix only needs the two mapper-dictionary entries removed — deleting the public methods is an optional extra break. Base branch is net11.0 (the designated branch for API breaks); author proposed net11 (comment 7) and kubaflo pinged @jfversluis (comment 8), still unanswered.

Why NEEDS_DISCUSSION (not NC, not clean LGTM)

No confirmed code error and no PR-caused CI block → not NEEDS_CHANGES (the earlier API-26 getter regression was already fixed and re-verified). But two real pre-merge items remain open in-thread: the intentional shipped-API removal (net11 break) awaiting maintainer sign-off, and red required CI awaiting known-issue confirmation. That is more than a clean LGTM.

CI

maui-pr is RED but not PR-caused. Every change is Android-gated (.Android.cs, #if __ANDROID__, net-android-only API), the RunOnAndroid leg passed, and all red legs are non-Android — Run Integration Tests AOT macOS, RunOniOS_MauiRelease* (Trim/CoreCLR variants), and Windows Helix Unit (Debug) (Release passed) — consistent with the known CoreCLR/R2R infra breakage (#34303) plus flake. Confirm AzDO known-issue attribution / re-run; do not merge while required pipelines are red.

Inline comments

None posted. All substantive points (custom-client dispose, <26 Disconnect redundancy, public-API break/net11) already appear in the PR thread across comments 6, 7–8, 12, and 18 — re-posting would duplicate.

Multi-model review (gpt-5.5 · opus-4.8 · opus-4.6 · gemini-3.1-pro). Comments only — not a formal approval.

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

## Summary

- Recognizes the `MauiBot` account as the AI Summary author for `/review
rerun` eligibility.
- Replaces duplicated author regex checks with one allowlist helper used
by AI Summary detection and bot-comment rejection.
- Adds regression coverage based on dotnet#34426 comments
4239128463 and 4658057491.

## Validation

- `Invoke-Pester
.github/scripts/Resolve-RerunEligibility.Tests.ps1,.github/scripts/Invoke-RerunReviewTrigger.Tests.ps1
-CI`
- `Resolve-RerunEligibility.ps1 -PRNumber 34426 -CurrentCommentId
4658995396` returned `Rerun eligibility: True (new-head-commit)`
- Verified the patched helper selects AI Summary comment `4239128463`
authored by `MauiBot`.

## Fixes

- Follow-up to dotnet#35685

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration 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-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.

MAUI Handler not working with Custom WebView on Android (ShouldOverrideUrlLoading behavior)

5 participants