Skip to content

[Android] Fix SearchHandler.ClearPlaceholderEnabled not updated dynamically#35777

Merged
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
SyedAbdulAzeemSF4852:fix-35764
Jun 12, 2026
Merged

[Android] Fix SearchHandler.ClearPlaceholderEnabled not updated dynamically#35777
kubaflo merged 2 commits into
dotnet:inflight/currentfrom
SyedAbdulAzeemSF4852:fix-35764

Conversation

@SyedAbdulAzeemSF4852

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!

Issue Details

  • ClearPlaceholderEnabled is respected on initial load but when changed dynamically at runtime the clear button state is not updated to reflect the new value.

Root Cause

  • ClearPlaceholderEnabled property changes were never propagated to the native view.

Description of Change

  • Updated OnSearchHandlerPropertyChanged in ShellSearchView.cs to listen for changes to the ClearPlaceholderEnabled property and update the clear button state accordingly.

Issues Fixed

Fixes #35764

Validated the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Output

Before After
Before.mov
After.mov

@github-actions

github-actions Bot commented Jun 5, 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 -- 35777

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Jun 5, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @@SyedAbdulAzeemSF4852! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 5, 2026
@github-actions github-actions Bot added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android labels Jun 5, 2026
@kubaflo

kubaflo commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

@@ -0,0 +1,26 @@
#if TEST_FAILS_ON_WINDOWS //Issue Link - https://github.com/dotnet/maui/issues/28619

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Regression Prevention — This guard compiles the screenshot test into MacCatalyst as well as Android/iOS: Controls.TestCases.Mac.Tests.csproj defines TEST_FAILS_ON_WINDOWS, and this PR only adds Android and iOS baselines. When the Mac UI test leg runs, VerifyScreenshot() will look for a Mac/Catalyst baseline for ClearPlaceholderIconShouldHideWhenDisabled and fail before validating the Android fix. Please either add the MacCatalyst baseline or restrict the test to platforms with baselines, such as Android/iOS explicitly.

@MauiBot MauiBot added 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 Jun 5, 2026
MauiBot

This comment was marked as 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.

Looks good :) Is this PR ready?

@kubaflo

kubaflo commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

@@ -0,0 +1,26 @@
#if TEST_FAILS_ON_WINDOWS //Issue Link - https://github.com/dotnet/maui/issues/28619

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Regression Prevention - #if TEST_FAILS_ON_WINDOWS compiles this screenshot test for Android, iOS, and MacCatalyst, but this PR only adds Android and iOS baselines. MacCatalyst runs use a separate snapshot baseline, so this can fail there before validating the Android fix. Either add the MacCatalyst baseline or exclude Catalyst, for example with #if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST if the intended coverage is Android+iOS.

MauiBot

This comment was marked as outdated.

@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 changed the title [WIP][Android] Fix SearchHandler.ClearPlaceholderEnabled not updated dynamically [Android] Fix SearchHandler.ClearPlaceholderEnabled not updated dynamically Jun 8, 2026
@SyedAbdulAzeemSF4852

Copy link
Copy Markdown
Contributor Author

Looks good :) Is this PR ready?

@kubaflo , Yes, the PR is ready. I'm just waiting for the CI run to generate the MacCatalyst snapshot so I can add the baseline image.

@kubaflo

kubaflo commented Jun 8, 2026

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 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@kubaflo

kubaflo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added s/agent-review-in-progress AI review is currently running for this PR and removed s/agent-review-in-progress AI review is currently running for this PR labels Jun 10, 2026
@dotnet dotnet deleted a comment from github-actions Bot Jun 10, 2026
@kubaflo

kubaflo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

/review rerun

@github-actions github-actions Bot added the s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun label Jun 10, 2026
@kubaflo

kubaflo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

/review -b feature/enhanced-reviewer -p android

@github-actions github-actions Bot added s/agent-review-in-progress AI review is currently running for this PR and removed s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun labels Jun 11, 2026
@MauiBot MauiBot added s/agent-fix-win AI found a better alternative fix than the PR and removed s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates labels Jun 11, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@SyedAbdulAzeemSF4852 — new AI review results are available based on this last commit: a2883a8.
Add baseline snapshots for Mac and iOS platforms To request a fresh review after new comments or commits, comment /review rerun.

Gate Failed Code Review Needs Changes Confidence High Platform Android

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

Gate Result: ❌ FAILED

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

🩺 Fix does not pass the tests — every test still fails after applying the fix. The PR's change does not resolve the failure(s).

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue35764 Issue35764 ✅ FAIL — 2433s ❌ FAIL — 565s
🔴 Without fix — 🖥️ Issue35764: FAIL ✅ · 2433s

(truncated to last 15,000 chars)

6.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:17:23.35
* 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.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.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.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  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

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

Time Elapsed 00:08:41.47
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/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 1.73 sec).
  Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 34 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.17 sec).
  Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6.09 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 540 ms).
  Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.68 sec).
  5 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  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.
[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.13]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.37]   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
>>>>> 06/11/2026 12:08:53 FixtureSetup for Issue35764(Android)
>>>>> 06/11/2026 12:09:08 The FixtureSetup threw an exception. Attempt 0/1.
Exception details: System.TimeoutException: [Android] SearchHandler.ClearPlaceholderEnabled has no effect
   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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/11/2026 12:09:12 FixtureSetup for Issue35764(Android)
>>>>> 06/11/2026 12:09:28 The FixtureSetup threw an exception. Attempt 1/1.
Exception details: System.TimeoutException: [Android] SearchHandler.ClearPlaceholderEnabled has no effect
   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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/11/2026 12:09:28 Log types: logcat, bugreport, server
>>>>> 06/11/2026 12:09:28 Log types: logcat, bugreport, server
  Failed ClearPlaceholderIconShouldHideWhenDisabled [46 s]
  Error Message:
   OneTimeSetUp: System.TimeoutException : [Android] SearchHandler.ClearPlaceholderEnabled has no effect
  Stack Trace:
     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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Setup failed for test fixture Microsoft.Maui.TestCases.Tests.Issues.Issue35764(Android)
System.TimeoutException : [Android] SearchHandler.ClearPlaceholderEnabled has no effect
StackTrace:    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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35764.trx

Test Run Failed.
Total tests: 1
     Failed: 1
 Total time: 57.4023 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35764.trx

🟢 With fix — 🖥️ Issue35764: FAIL ❌ · 565s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.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.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.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.80-ci+azdo.14346770
  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:07:09.25
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.80-ci+azdo.14346770
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.80-ci+azdo.14346770
  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.80-ci+azdo.14346770
  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
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.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.
[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.11]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.44]   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
>>>>> 06/11/2026 12:28:21 FixtureSetup for Issue35764(Android)
>>>>> 06/11/2026 12:28:37 The FixtureSetup threw an exception. Attempt 0/1.
Exception details: System.TimeoutException: [Android] SearchHandler.ClearPlaceholderEnabled has no effect
   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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/11/2026 12:28:40 FixtureSetup for Issue35764(Android)
>>>>> 06/11/2026 12:28:56 The FixtureSetup threw an exception. Attempt 1/1.
Exception details: System.TimeoutException: [Android] SearchHandler.ClearPlaceholderEnabled has no effect
   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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/11/2026 12:28:56 Log types: logcat, bugreport, server
>>>>> 06/11/2026 12:28:56 Log types: logcat, bugreport, server
  Failed ClearPlaceholderIconShouldHideWhenDisabled [37 s]
  Error Message:
   OneTimeSetUp: System.TimeoutException : [Android] SearchHandler.ClearPlaceholderEnabled has no effect
  Stack Trace:
     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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Setup failed for test fixture Microsoft.Maui.TestCases.Tests.Issues.Issue35764(Android)
System.TimeoutException : [Android] SearchHandler.ClearPlaceholderEnabled has no effect
StackTrace:    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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35764.trx

Test Run Failed.
Total tests: 1
     Failed: 1
 Total time: 47.5373 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35764.trx

⚠️ Failure Details

  • Issue35764 FAILED with fix (should pass)
    • ClearPlaceholderIconShouldHideWhenDisabled [37 s]
    • OneTimeSetUp: System.TimeoutException : [Android] SearchHandler.ClearPlaceholderEnabled has no effect
📁 Fix files reverted (2 files)
  • eng/pipelines/ci-copilot.yml
  • src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cs

UI Tests — Shell

Detected UI test categories: Shell

Deep UI tests — 307 passed, 1 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 307/308 (1 ❌)
Shell — 1 failed test
ClearAndRecreateShellElements
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 2757
   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 2784
   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 793
   at Microsoft.Maui.TestCases.Tests.Issues.ShellItemIsVisible.ClearAndRecreateShellElements() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/ShellItemIsVisible.cs:line 66
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* arg
...

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


Pre-Flight — Context & Validation

Issue: #35764 - [Android] SearchHandler.ClearPlaceholderEnabled has no effect
PR: #35777 - [Android] Fix SearchHandler.ClearPlaceholderEnabled not updated dynamically
Platforms Affected: Android
Files Changed: 1 implementation, 6 test

Key Findings

  • Issue #35764 reports that SearchHandler.ClearPlaceholderEnabled can be toggled to false at runtime on Android, but the clear-placeholder icon remains visible. iOS/Mac Catalyst behavior is reported as correct.
  • PR production fix updates ShellSearchView.OnSearchHandlerPropertyChanged to handle SearchHandler.ClearPlaceholderEnabledProperty and call UpdateClearButtonState(), with null guards for disposed/unloaded state.
  • Regression coverage is a Shell UI test (Issue35764) that toggles ClearPlaceholderEnabled and verifies the visual result through screenshots; category impact is Shell.
  • Prior gate result was failed: without-fix failed as expected, but with-fix also failed during Android UI fixture setup/navigation (_IssuesUITest.NavigateToIssue timed out), before the test body evaluated the PR behavior.
  • Inline review comments previously flagged screenshot-platform guard/baseline concerns. Current diff includes Android, iOS, iOS 26, and Mac snapshot baselines.

Code Review Summary

Verdict: LGTM
Confidence: high
Errors: 0 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • No ❌ / ⚠️ / 💡 findings.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35777 Handle ClearPlaceholderEnabledProperty in Android ShellSearchView.OnSearchHandlerPropertyChanged and call UpdateClearButtonState(); add Shell UI screenshot regression coverage. ❌ FAILED (Gate) ShellSearchView.cs, UI test page/test, snapshot baselines Gate failure occurred in UI setup/navigation before test body ran.

Code Review — Deep Analysis

Code Review — PR #35777

Independent Assessment

What this changes: Android Shell SearchHandler now updates clear-placeholder visibility when ClearPlaceholderEnabled changes dynamically, with UI screenshot coverage added.
Inferred motivation: The Android native view only respected the initial property value.

Reconciliation with PR Narrative

Author claims: Fixes dynamic propagation for #35764.
Agreement/disagreement: Agrees with code; approach matches existing state update patterns.

Findings

No ❌ / ⚠️ / 💡 findings.

Devil's Advocate

Checked null/disposal guard, query/icon visibility behavior, baselines, stale comments, and CI. No blocking concerns found.

Verdict: LGTM

Confidence: high
Summary: Targeted fix; available check runs are successful. Wrote files under CustomAgentLogsTmp/PRState/35777/PRAgent/.


Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Directly toggle _clearPlaceholderButton.Visibility on ClearPlaceholderEnabled changes and replace screenshot verification with element text assertions. ❌ FAIL 2 files Build succeeded, but Android UI fixture setup timed out in _IssuesUITest.NavigateToIssue before test body ran; same failure mode as prior gate.
2 try-fix Preserve PR production fix; restructure the HostApp Shell page and dismiss Android ANR overlays/extend gallery readiness wait before navigation; replace screenshot verification with element assertions. ✅ PASS 2 test files Test passed on Android (ClearPlaceholderIconShouldHideWhenDisabled passed). This validates the PR production fix once navigation/setup is unblocked, but it is not a distinct production-code fix and the generated diff has formatting issues.
3 try-fix Refresh Android Shell search clear-button state through a property-agnostic helper for relevant SearchHandler changes (ClearPlaceholderEnabled, ClearPlaceholderIcon, ClearIcon, Query, empty property name), while preserving IsSearchEnabled; add a status assertion before screenshot. ✅ PASS 2 files Android Issue35764 passed on emulator-5554; self-review clean. This is a distinct production alternative and more robust than the PR's single-property branch because it keeps placeholder/clear visibility synchronized for related dynamic property changes.
PR PR #35777 Call UpdateClearButtonState() when ClearPlaceholderEnabledProperty changes; screenshot-based Shell UI regression. ❌ FAILED (Gate) 7 files Original PR gate failed with Android UI navigation/setup timeout before behavior was evaluated.

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 1 Yes Try a test-discoverability/assertion alternative that avoids screenshot baselines and validates property toggling through visible UI state.
claude-opus-4.7 1 Yes Gate was blocked by an Android ANR overlay/slow gallery first paint; unblock navigation before evaluating the SearchHandler behavior.
gpt-5.3-codex 1 Yes Use a broader production synchronization helper instead of a single ClearPlaceholderEnabledProperty branch, and retain screenshot validation with an added property-state assertion.

Exhausted: No — stopped because Candidate #3 met the stop condition.
Selected Fix: Candidate #3 — it passes the Android regression test and is a meaningfully different production approach from PR #35777 and Candidate #1. It centralizes clear/placeholder state refresh for all related SearchHandler property changes, reducing the chance of future dynamic-state drift while keeping behavior in the existing UpdateClearButtonState() helper.


Report — Final Recommendation

Comparative Report — PR #35777

Candidates compared

Rank Candidate Regression result Assessment
1 try-fix-3 PASS Best overall. It keeps the existing UpdateClearButtonState() helper but refreshes it for all related SearchHandler state changes (ClearPlaceholderEnabled, ClearPlaceholderIcon, ClearIcon, Query, and empty property name), with stronger lifecycle guards. This is more robust than the raw PR's single-property branch and passed the Android regression.
2 try-fix-2 PASS Validates that the PR production fix works when the Android UI-test navigation/setup blocker is handled. However, it is primarily a test-infrastructure workaround, leaves production logic identical to the PR, and its generated diff has formatting/style issues, so it is weaker than try-fix-3.
3 pr-plus-reviewer FAILED / not revalidated Expert reviewer found no actionable feedback, so this is identical to the PR. Because the supplied gate result failed before behavior validation, it must rank below candidates with passing regression evidence.
4 pr FAILED Production approach is targeted and reasonable, but the supplied gate failed and therefore it ranks below passing alternatives.
5 try-fix-1 FAIL Build succeeded, but the Android UI test failed in fixture setup/navigation before the test body ran. Its direct inline visibility toggle also duplicates logic already centralized in UpdateClearButtonState(), making it less maintainable.

Winning candidate

Winner: try-fix-3

try-fix-3 is the single best candidate because it passed the Android regression and improves the production fix's completeness without duplicating visibility rules. It handles the reported dynamic ClearPlaceholderEnabled case and also keeps the clear/placeholder icon state synchronized when related SearchHandler properties change dynamically.

Notes on the gate failure

The supplied gate result for the PR failed during Android UI fixture setup/navigation, before ClearPlaceholderIconShouldHideWhenDisabled could evaluate the SearchHandler behavior. Per instruction, the gate was not re-run, and failed-regression candidates were ranked below passed candidates.


Future Action — alternative fix proposed (try-fix-3)

Automated review — alternative fix proposed

The expert-reviewer evaluation compared the PR fix against automatically generated candidates and selected try-fix-3 as the strongest fix.

Why: try-fix-3 won because it passed the Android regression and provides the most robust production fix by refreshing clear/placeholder state for all related SearchHandler property changes through the existing centralized helper. The raw PR and pr-plus-reviewer are reasonable but remain below passed candidates because the supplied gate failed before behavior validation.

Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.

Candidate diff (try-fix-3)
diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cs
index 6bd4d96049..6868c766db 100644
--- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cs
+++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cs
@@ -236,10 +236,24 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
 
 		protected virtual void OnSearchHandlerPropertyChanged(object sender, PropertyChangedEventArgs e)
 		{
+			if (_disposed ||
+				SearchHandler is null ||
+				_textBlock is null ||
+				_clearButton is null ||
+				_clearPlaceholderButton is null)
+			{
+				return;
+			}
+
 			if (e.PropertyName == SearchHandler.IsSearchEnabledProperty.PropertyName)
 			{
 				_textBlock.Enabled = SearchHandler.IsSearchEnabled;
 			}
+
+			if (ShouldRefreshClearButtonState(e.PropertyName))
+			{
+				UpdateClearButtonState();
+			}
 		}
 
 		protected override async void OnAttachedToWindow()
@@ -374,6 +388,15 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
 			}
 		}
 
+		static bool ShouldRefreshClearButtonState(string propertyName)
+		{
+			return string.IsNullOrEmpty(propertyName) ||
+				propertyName == SearchHandler.ClearPlaceholderEnabledProperty.PropertyName ||
+				propertyName == SearchHandler.ClearPlaceholderIconProperty.PropertyName ||
+				propertyName == SearchHandler.ClearIconProperty.PropertyName ||
+				propertyName == SearchHandler.QueryProperty.PropertyName;
+		}
+
 		class ClipDrawableWrapper : ASupportDrawable.DrawableWrapperCompat
 		{
 			public ClipDrawableWrapper(Drawable dr) : base(dr)
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35764.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35764.cs
index 0f215e66ae..3db99bf748 100644
--- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35764.cs
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35764.cs
@@ -1,4 +1,5 @@
 #if TEST_FAILS_ON_WINDOWS //Issue Link - https://github.com/dotnet/maui/issues/28619
+using System;
 using NUnit.Framework;
 using UITest.Appium;
 using UITest.Core;
@@ -18,8 +19,10 @@ public class Issue35764 : _IssuesUITest
 	[Category(UITestCategories.Shell)]
 	public void ClearPlaceholderIconShouldHideWhenDisabled()
 	{
-		App.WaitForElement("ToggleClearPlaceholderEnabled");
+		App.WaitForElement("ToggleClearPlaceholderEnabled", timeout: TimeSpan.FromSeconds(20));
 		App.Tap("ToggleClearPlaceholderEnabled");
+		var statusLabelText = App.WaitForElement("ClearPlaceholderEnabledStatus").GetText();
+		Assert.That(statusLabelText, Is.EqualTo("ClearPlaceholderEnabled: False"));
 		VerifyScreenshot();
 	}
 }

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

@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 check the ai's suggestions?

@SyedAbdulAzeemSF4852

Copy link
Copy Markdown
Contributor Author

Could you check the ai's suggestions?

@kubaflo , Reviewed the MAUI Bot summary, which reported a gate failure on Android. I verified the issue locally and confirmed that the test passes with the fix applied and fails without it.

Without Fix WIth Fix

@kubaflo kubaflo changed the base branch from main to inflight/current June 12, 2026 11:24
@kubaflo kubaflo merged commit 8075008 into dotnet:inflight/current Jun 12, 2026
31 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 12, 2026
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 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.

[Android] SearchHandler.ClearPlaceholderEnabled has no effect

4 participants