Skip to content

Improve VisualState order and prevent sticky Focused visual state - #27477

Closed
mattleibow wants to merge 41 commits into
net11.0from
dev/focus-visual-states
Closed

mattleibow wants to merge 41 commits into
net11.0from
dev/focus-visual-states

Conversation

@mattleibow

@mattleibow mattleibow commented Jan 30, 2025

Copy link
Copy Markdown
Member

Description of Change

Alternative to #19752

While reviewing @MartyIX's PR #19812 I discovered that the code for switching to the Focused and Unfocused states was all dependent on the control being enabled. What this results in that if you have a focused button and the visual state was some sort of border, disabling the button will not actually switch to unfocused and the visual state will remain with the border that was added when it got focused.

This PR originally copied the code logic from WinUI: https://github.com/microsoft/microsoft-ui-xaml/blob/ffe33f9b7d0e9f5a2ca3330d0ce329f09dff092b/src/dxaml/xcp/dxaml/lib/Button_Partial.cpp#L29-L60 but I have updated it to follow maybe a better visual state order. This new way is to make sure the unfocus happens first and the pointer over happens last.

For the issue in #19752, the actual reason things are wrong is not because the states are set wrong, but rather because the focus states are in the same group as the pointer over state. This means that the button can either be focused or be pointer over.

The correct way to have all these states working is to use multiple groups:

<VisualStateManager.VisualStateGroups>
  <VisualStateGroupList>
    <VisualStateGroup x:Name="CommonStates">
      <VisualState x:Name="Normal" />
      <VisualState x:Name="PointerOver" />
      <VisualState x:Name="Pressed" />
      <VisualState x:Name="Disabled" />
    </VisualStateGroup>
    <VisualStateGroup x:Name="FocusStates">
      <VisualState x:Name="Focused" />
      <VisualState x:Name="Unfocused" />
    </VisualStateGroup>
  </VisualStateGroupList>
</VisualStateManager.VisualStateGroups>

This can also be seen in other controls such as the WinUI combo box (the Button does not use a state but rather the OS focus border): https://github.com/microsoft/microsoft-ui-xaml/blob/ffe33f9b7d0e9f5a2ca3330d0ce329f09dff092b/src/controls/dev/ComboBox/ComboBox_themeresources.xaml#L472 It is also in the docs: https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.control.usesystemfocusvisuals?view=winrt-26100#examples

This is the docs for WinUI to do focus states:

To define custom focus visuals for a control, you need to provide a custom ControlTemplate. In the ControlTemplate, do the following:

  • If you're modifying a default ControlTemplate, be sure to set the UseSystemFocusVisuals property to false to turn off the system focus visuals. When set to false, the focus states in the VisualStateManager are called.
  • Define a VisualStateGroup for FocusStates.
  • In the FocusStates group, define VisualStates for Focused, Unfocused, and PointerFocused.
  • Define the focus visuals.

Another result of not having multiple groups is that sometimes unexpected things happen. If you are missing the focus states, then nothing happens when you change states. And, if you have the focus states in the same group as normal, the normal state will never apply since it will either be focused or unfocused and normal will be overwritten.

Issues Fixed

I was not able to find an open issue with the focus states "sticking" when disabling. And the issues that I have seen are just VSM improperly configured.

Maybe these:

Copilot AI review requested due to automatic review settings January 30, 2025 14:45
@mattleibow
mattleibow requested a review from a team as a code owner January 30, 2025 14:45

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.

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • src/Controls/tests/TestCases.HostApp/Issues/Issue19752.xaml: Language not supported
  • src/Controls/src/Core/VisualElement/VisualElement.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)

src/TestUtils/src/UITest.Appium/Actions/AppiumMouseActions.cs:221

  • Ensure that the new MoveCursor and MoveCursorCoordinates commands are covered by tests.
CommandResponse MoveCursor(IDictionary<string, object> parameters)

src/TestUtils/src/UITest.Appium/HelperExtensions.cs:2282

  • Ensure that the new MoveCursor methods are covered by tests.
public static void MoveCursor(this IApp app, string element)

Comment thread src/TestUtils/src/UITest.Appium/HelperExtensions.cs Outdated
Comment thread src/TestUtils/src/UITest.Appium/HelperExtensions.cs Outdated
Comment thread src/TestUtils/src/UITest.Appium/HelperExtensions.cs Outdated
@mattleibow

Copy link
Copy Markdown
Member Author

@MartyIX had some wise words:

I just wonder what the precedence rules are for these two style groups. I mean I want "pointer-over" state to have higher precedence than "focused" state. Does it depend on the order here https://github.com/dotnet/maui/pull/27477/files#diff-f9f36395cbe8fbe5db0fb42d9eeda70e070ed5ced099553747d1236d4f05117fR16-R54 ?

@mattleibow

mattleibow commented Jan 30, 2025

Copy link
Copy Markdown
Member Author

Thanks for the wise words @MartyIX, maybe this is a better order:

var shouldFocus = IsFocused && IsEnabled;
			
// 1. unfocus first
if (!shouldFocus)
	VisualStateManager.GoToState(this, VisualStateManager.FocusStates.Unfocused);

// 2. set basic states (normal/disabled)
if (!IsEnabled)
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.Disabled);
else if (!IsPointerOver)
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.Normal);

// 3. focus
if (shouldFocus)
	VisualStateManager.GoToState(this, VisualStateManager.FocusStates.Focused);

// 4. end with pointer over
if (IsPointerOver)
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.PointerOver);

This is different to UWP/WPF/WinUI, so it may be better or it may cause people to get surprised coming from another XAML framework:

// 1. set basic states (normal/disabled/pointer over)
if (!IsEnabled)
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.Disabled);
else if (IsPointerOver)
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.PointerOver);
else
	VisualStateManager.GoToState(this, VisualStateManager.CommonStates.Normal);

// 2. override with focus
if (IsFocused && IsEnabled)
	VisualStateManager.GoToState(this, VisualStateManager.FocusStates.Focused);
else
	VisualStateManager.GoToState(this, VisualStateManager.FocusStates.Unfocused);

Any thoughts?

@mattleibow mattleibow added this to the .NET 9 SR4 milestone Jan 30, 2025
@mattleibow mattleibow added the area-xaml XAML, CSS, Triggers, Behaviors label Jan 30, 2025
@mattleibow mattleibow changed the title Always apply the Unfocued visual state when the element loses focus Improve VisualState order and prevent sticky focus Jan 30, 2025
@mattleibow mattleibow changed the title Improve VisualState order and prevent sticky focus Improve VisualState order and prevent sticky Focused visual state Jan 30, 2025
@MartyIX

MartyIX commented Jan 30, 2025

Copy link
Copy Markdown
Contributor

This is different to UWP/WPF/WinUI, so it may be better or it may cause people to get surprised coming from another XAML framework.

Could you explain how it is different exactly? I don't know the frameworks in detail.

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

Need to verify some related UITests checking the focused VisualState etc.
image

Example:
DisablingUnfocusedButtonMovesToDisabledState

Assert.That(App.FindElement("button2").GetText(), Is.EqualTo("Disabled"))
Expected string length 8 but was 11. Strings differ at index 0.
Expected: "Disabled"
But was:  "PointerOver"

@mattleibow

Copy link
Copy Markdown
Member Author

Could you explain how it is different exactly? I don't know the frameworks in detail.

@MartyIX I updated the comment with the WinUI way so it can be seen side-by-side

@MartyIX

MartyIX commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

It looks good to me. :-)

I still wonder though how will one implement styling for a button like this:

  • red ~ the button is focused and the pointer is over the button (i.e. Focused && PointerOver styles at the same time)
  • green ~ the button is just focused
  • blue ~ pointer is over the button

I think that one can make it somehow work with triggers (doc). But not with visual styles (doc). Is that right?

It's not like the scenario is super-useful. The question is more about API design and perhaps even for user-defined visual styles and their composition.

@PureWeen

PureWeen commented Mar 2, 2025

Copy link
Copy Markdown
Member

/rebase

@PureWeen PureWeen moved this from Changes Requested to Ready To Review in MAUI SDK Ongoing Mar 2, 2025
@github-actions
github-actions Bot force-pushed the dev/focus-visual-states branch from 4e36d9f to a1b0d56 Compare March 2, 2025 22:12
@mattleibow

Copy link
Copy Markdown
Member Author

/rebase

@github-actions
github-actions Bot force-pushed the dev/focus-visual-states branch from a1b0d56 to 30161dc Compare March 3, 2025 18:51

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

image This failing tests are related with VisualStates, could you verify if are related with the changes?

@github-project-automation github-project-automation Bot moved this from Ready To Review to Changes Requested in MAUI SDK Ongoing Mar 4, 2025
@kubaflo

kubaflo commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

/review rerun -b improved-reviewer -p catalyst

MauiBot

This comment was marked as outdated.

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

kubaflo commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

/review rerun -b improved-reviewer -p catalyst

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Comment thread src/Controls/src/Core/VisualElement/VisualElement.cs
Comment on lines +99 to +101
var rectBefore = App.FindElement("button1").GetRect();

App.Tap("button1");
Comment on lines +107 to +111
var rectAfter = App.FindElement("button1").GetRect();
if (Device == TestDevice.Windows)
{
Assert.That(rectBefore, Is.Not.EqualTo(rectAfter));
}
Comment on lines +120 to +121
var rectBefore = App.FindElement("button1").GetRect();

Comment on lines +130 to +132
var rectAfter = App.FindElement("button1").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));
}
Comment on lines +152 to +153
var rectBefore = App.FindElement("button2").GetRect();

Comment on lines +161 to +163
var rectAfter = App.FindElement("button2").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));

Comment on lines +177 to +178
var rectBefore = App.FindElement("button3").GetRect();

Comment on lines +187 to +188
var rectAfter = App.FindElement("button3").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));
@kubaflo

This comment has been minimized.

@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 — 2 findings

See inline comments for details.

Comment thread src/Controls/src/Core/VisualElement/VisualElement.cs
Comment thread src/Controls/src/Core/VisualElement/VisualElement.cs Outdated
MauiBot

This comment was marked as outdated.

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

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment on lines +6 to +8
xmlns:cv1="clr-namespace:Maui.Controls.Sample"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Name="ThisMainPage"
}

[Test]
public void InitialStateAreAllCorrect()
@kubaflo

This comment has been minimized.

MauiBot

This comment was marked as outdated.

@kubaflo

This comment has been minimized.

1 similar comment
@kubaflo

This comment has been minimized.

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

return false;
}

if (!force && group.CurrentState?.Name == name)

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-Generated Review (multi-model)

⚠️ The new name-based/split-group handling still short-circuits when an earlier group is already in the requested state, so a later group that holds the previous mutually-exclusive state never gets cleared. Concrete repro with the new CommonStatesSplitAcrossGroupsUseNameLookup shape: put Normal in group A and Disabled in group B, disable the element (group B applies Disabled), then re-enable it. GoToState("Normal") returns here because group A is already Normal, leaving group B's Disabled setters active. Please either keep mutually-exclusive common states in one group / remove the split-group support test, or change the transition logic so returning to Normal also unapplies the previously active common-state group.

MauiBot

This comment was marked as outdated.

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

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Comment on lines +52 to +53
[Test]
public void InitialStateAreAllCorrect()
Comment on lines +99 to +107
var rectBefore = App.FindElement("button1").GetRect();

App.Tap("button1");

// Pressing a button sets it to be focused, but the pointer over state is applied after
AssertText("button1", "PointerOver");

// we are shrinking the focused button a bit
var rectAfter = App.FindElement("button1").GetRect();
Comment on lines +120 to +131
var rectBefore = App.FindElement("button1").GetRect();

App.MoveCursor("button1");
App.MoveCursor("button2");

// hovering over a button and then moving off goes back to the normal state
// and does not affect focus
AssertText("button1", "Normal");

// we are shrinking the focused button a bit, but the button is still not focused
var rectAfter = App.FindElement("button1").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));
Comment on lines +152 to +162
var rectBefore = App.FindElement("button2").GetRect();

App.Tap("button1"); // focus button 1
App.Tap("button2"); // move the focus to button 2, but then disable it

// the button is disabled without a focus change as it never had focus
AssertText("button2", "Disabled");

// we are shrinking the focused button a bit, but the button never had focus
var rectAfter = App.FindElement("button2").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));
Comment on lines +177 to +188
var rectBefore = App.FindElement("button3").GetRect();

App.Tap("button1"); // focus button 1
App.Tap("button2"); // move the focus to button 2, but then disable it forcing focus to button 3
App.Tap("button3"); // disable the focused button

// this disables the button, but the unfocus change is applied before all states
AssertText("button3", "Disabled");

// we are shrinking the focused button a bit, so it should have been unfocused after disabling
var rectAfter = App.FindElement("button3").GetRect();
Assert.That(rectBefore, Is.EqualTo(rectAfter));

@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

@mattleibow — new AI review results are available based on this last commit: 9cc6403. To request a fresh review after new comments or commits, comment /review rerun.

Gate Passed Confidence Low Platform Catalyst


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

Gate Result: ✅ PASSED

Platform: CATALYST · Base: net11.0 · Merge base: 7f139ed4

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue19752 Issue19752 ⚠️ ENV ERROR ⚠️ ENV ERROR
🧪 VisualStateManagerTests VisualStateManagerTests ✅ FAIL — 10s ✅ PASS — 9s
🔴 Without fix — 🖥️ Issue19752: ⚠️ ENV ERROR · 471s

(truncated to last 15,000 chars)

UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed DisablingUnfocusedButtonMovesToDisabledState [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed EnablingButtonMovesToNormalState [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed HoveringOverButtonAndThenMovingOffMovesToNormalState [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed HoveringOverButtonMovesToPointerOverState [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed InitialStateAreAllCorrect [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed PressingAndReleasingButtonMovesToPointerOverState [14 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue19752.trx

Test Run Failed.
Total tests: 7
     Failed: 7
 Total time: 18.6922 Seconds
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue19752.trx

🟢 With fix — 🖥️ Issue19752: ⚠️ ENV ERROR · 403s

(truncated to last 15,000 chars)

.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed DisablingUnfocusedButtonMovesToDisabledState [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed EnablingButtonMovesToNormalState [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed HoveringOverButtonAndThenMovingOffMovesToNormalState [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed HoveringOverButtonMovesToPointerOverState [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed InitialStateAreAllCorrect [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

  Failed PressingAndReleasingButtonMovesToPointerOverState [3 s]
  Error Message:
   OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
  Stack Trace:
     at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11
   at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 40
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
   at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
   at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue19752.trx

Test Run Failed.
Total tests: 7
     Failed: 7
 Total time: 5.6490 Seconds
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue19752.trx

🔴 Without fix — 🧪 VisualStateManagerTests: FAIL ✅ · 10s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/TestUtils/TestUtils.csproj (in 707 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj (in 1.22 sec).
  9 of 11 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  Core.HybridWebViewSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
  Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
  Controls.Core.UnitTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll (.NETCoreApp,Version=v11.0)
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 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.16]   Discovering: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:00.80]   Discovered:  Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:00.81]   Starting:    Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:00.85]     PointerOverReappliesAfterFocusChangesWhileHovered [FAIL]
[xUnit.net 00:00:00.85]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.85]                  ↓ (pos 0)
[xUnit.net 00:00:00.85]       Expected: "PointerOver"
[xUnit.net 00:00:00.85]       Actual:   "Focused"
[xUnit.net 00:00:00.85]                  ↑ (pos 0)
[xUnit.net 00:00:00.85]       Stack Trace:
[xUnit.net 00:00:00.85]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(373,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.PointerOverReappliesAfterFocusChangesWhileHovered()
[xUnit.net 00:00:00.85]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.85]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[xUnit.net 00:00:00.85]     SplitFocusStatesUseNameLookup [FAIL]
[xUnit.net 00:00:00.85]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.85]                  ↓ (pos 0)
[xUnit.net 00:00:00.85]       Expected: "Unfocused"
[xUnit.net 00:00:00.85]       Actual:   "Focused"
[xUnit.net 00:00:00.85]                  ↑ (pos 0)
[xUnit.net 00:00:00.85]       Stack Trace:
[xUnit.net 00:00:00.85]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(280,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.SplitFocusStatesUseNameLookup()
[xUnit.net 00:00:00.85]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.85]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed ElementsDoNotHaveVisualStateGroupsCollectionByDefault [8 ms]
  Failed PointerOverReappliesAfterFocusChangesWhileHovered [4 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
           ↓ (pos 0)
Expected: "PointerOver"
Actual:   "Focused"
           ↑ (pos 0)
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.PointerOverReappliesAfterFocusChangesWhileHovered() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 373
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Failed SplitFocusStatesUseNameLookup [< 1 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
           ↓ (pos 0)
Expected: "Unfocused"
Actual:   "Focused"
           ↑ (pos 0)
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.SplitFocusStatesUseNameLookup() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 280
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed StateNamesMustBeUniqueWithinGroupListWhenAddingGroup [< 1 ms]
  Passed VisualElementsStateGroupsAreDistinct [< 1 ms]
  Passed CustomImplicitStyleVSMStateDoesNotOverrideLocalValue [6 ms]
  Passed ChangingStyleContainingVSMShouldResetStateValue [1 ms]
  Passed AppThemeBindingInVSM [1 ms]
  Passed CanRemoveAGroupAndAddANewGroupWithTheSameName [< 1 ms]
[xUnit.net 00:00:00.87]     FocusUnfocusThenDisableClearsFocusedSetters [FAIL]
[xUnit.net 00:00:00.87]     ValidatePerformance [SKIP]
[xUnit.net 00:00:00.87]       This test was created to check performance characteristics; leaving it in because it may be useful again.
[xUnit.net 00:00:00.87]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.87]       Expected: "Normal"
[xUnit.net 00:00:00.87]       Actual:   null
[xUnit.net 00:00:00.87]       Stack Trace:
[xUnit.net 00:00:00.87]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(312,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.FocusUnfocusThenDisableClearsFocusedSetters()
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed InitialStateIsNormalIfAvailable [< 1 ms]
  Passed VisualElementGoesToCorrectStateWhenSetterHasTarget [2 ms]
  Passed GroupWithDuplicateNameReplacesExisting [1 ms]
  Skipped ValidatePerformance [1 ms]
  Passed InitialStateIsNullIfNormalNotAvailable [< 1 ms]
  Passed SeparateFocusGroupInitializesToUnfocused [< 1 ms]
  Passed StateNamesMustBeUniqueWithinGroup [< 1 ms]
  Failed FocusUnfocusThenDisableClearsFocusedSetters [2 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
Expected: "Normal"
Actual:   null
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.FocusUnfocusThenDisableClearsFocusedSetters() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 312
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed SharedUnfocusedStateRemainsStableAcrossRepeatedChanges [< 1 ms]
[xUnit.net 00:00:00.88]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.88]                  ↓ (pos 0)
[xUnit.net 00:00:00.88]       Expected: "Unfocused"
[xUnit.net 00:00:00.88]       Actual:   "Focused"
[xUnit.net 00:00:00.88]     DisablingFocusedControlMovesFocusGroupToUnfocused [FAIL]
[xUnit.net 00:00:00.88]                  ↑ (pos 0)
[xUnit.net 00:00:00.88]       Stack Trace:
[xUnit.net 00:00:00.88]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(230,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.DisablingFocusedControlMovesFocusGroupToUnfocused()
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed StateNamesMustBeUniqueWithinGroupList [< 1 ms]
  Passed VisualStateGroupsFromSettersAreDistinct [< 1 ms]
  Passed ImplicitStyleDisabledVSMOverridesLocalValue [2 ms]
  Failed DisablingFocusedControlMovesFocusGroupToUnfocused [< 1 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
           ↓ (pos 0)
Expected: "Unfocused"
Actual:   "Focused"
           ↑ (pos 0)
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.DisablingFocusedControlMovesFocusGroupToUnfocused() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 230
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed VisualElementGoesToCorrectStateWhenAvailable [< 1 ms]
  Passed StateNamesInGroupMayNotBeEmpty [< 1 ms]
  Passed DisablingFocusedControlWithSingleGroupMovesToDisabled [< 1 ms]
  Passed CanRemoveAStateAndAddANewStateWithTheSameName [< 1 ms]
  Passed VSMFromStyleAreUnApplied [< 1 ms]
[xUnit.net 00:00:00.88]     PointerEnterWithoutPointerOverStateDoesNotMoveNormalToUnfocused [FAIL]
[xUnit.net 00:00:00.88]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.88]                  ↓ (pos 0)
[xUnit.net 00:00:00.88]       Expected: "Normal"
[xUnit.net 00:00:00.88]       Actual:   "Unfocused"
[xUnit.net 00:00:00.88]                  ↑ (pos 0)
[xUnit.net 00:00:00.88]       Stack Trace:
[xUnit.net 00:00:00.88]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(415,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.PointerEnterWithoutPointerOverStateDoesNotMoveNormalToUnfocused()
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed UnfocusedInCommonStatesKeepsPrecedenceOverNormal [< 1 ms]
  Passed InvalidateVisualStatesReappliesMutatedSetter [< 1 ms]
  Passed FocusLossWhilePointerOverLeavesFocusedStateWithoutPointerOverState [< 1 ms]
  Passed UnapplyingVSMShouldUnapplySetters [< 1 ms]
  Failed PointerEnterWithoutPointerOverStateDoesNotMoveNormalToUnfocused [< 1 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
           ↓ (pos 0)
Expected: "Normal"
Actual:   "Unfocused"
           ↑ (pos 0)
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.PointerEnterWithoutPointerOverStateDoesNotMoveNormalToUnfocused() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 415
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed InvalidateVisualStatesWithNoGroupsDoesNotThrow [< 1 ms]
  Passed StateNamesInGroupMayNotBeNull [< 1 ms]
  Passed InvalidateVisualStatesWithNoCurrentStateDoesNotThrow [< 1 ms]
  Passed VerifyVisualStateChanges [< 1 ms]
[xUnit.net 00:00:00.88]       Assert.Equal() Failure: Strings differ
[xUnit.net 00:00:00.88]                  ↓ (pos 0)
[xUnit.net 00:00:00.88]       Expected: "Normal"
[xUnit.net 00:00:00.88]       Actual:   "Disabled"
[xUnit.net 00:00:00.88]     CommonStatesSplitAcrossGroupsUseNameLookup [FAIL]
[xUnit.net 00:00:00.88]                  ↑ (pos 0)
[xUnit.net 00:00:00.88]       Stack Trace:
[xUnit.net 00:00:00.88]         /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs(259,0): at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.CommonStatesSplitAcrossGroupsUseNameLookup()
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:00:00.88]            at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[xUnit.net 00:00:00.88]   Finished:    Microsoft.Maui.Controls.Core.UnitTests
  Failed CommonStatesSplitAcrossGroupsUseNameLookup [< 1 ms]
  Error Message:
   Assert.Equal() Failure: Strings differ
           ↓ (pos 0)
Expected: "Normal"
Actual:   "Disabled"
           ↑ (pos 0)
  Stack Trace:
     at Microsoft.Maui.Controls.Core.UnitTests.VisualStateManagerTests.CommonStatesSplitAcrossGroupsUseNameLookup() in /_/src/Controls/tests/Core.UnitTests/VisualStateManagerTests.cs:line 259
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
  Passed VisualElementGoesToCorrectStateWhenAvailableFromSetter [< 1 ms]

Test Run Failed.
Total tests: 38
     Passed: 31
     Failed: 6
    Skipped: 1
 Total time: 1.1489 Seconds

🟢 With fix — 🧪 VisualStateManagerTests: PASS ✅ · 9s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
  Core.HybridWebViewSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14635918
  Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
  Controls.Core.UnitTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll (.NETCoreApp,Version=v11.0)
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 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.10]   Discovering: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:00.74]   Discovered:  Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:00.75]   Starting:    Microsoft.Maui.Controls.Core.UnitTests
  Passed ElementsDoNotHaveVisualStateGroupsCollectionByDefault [10 ms]
  Passed PointerOverReappliesAfterFocusChangesWhileHovered [3 ms]
  Passed SplitFocusStatesUseNameLookup [< 1 ms]
  Passed StateNamesMustBeUniqueWithinGroupListWhenAddingGroup [< 1 ms]
  Passed VisualElementsStateGroupsAreDistinct [< 1 ms]
  Passed CustomImplicitStyleVSMStateDoesNotOverrideLocalValue [5 ms]
  Passed ChangingStyleContainingVSMShouldResetStateValue [1 ms]
  Passed AppThemeBindingInVSM [2 ms]
  Passed CanRemoveAGroupAndAddANewGroupWithTheSameName [< 1 ms]
[xUnit.net 00:00:00.82]     ValidatePerformance [SKIP]
[xUnit.net 00:00:00.82]       This test was created to check performance characteristics; leaving it in because it may be useful again.
  Passed InitialStateIsNormalIfAvailable [< 1 ms]
  Passed VisualElementGoesToCorrectStateWhenSetterHasTarget [9 ms]
  Passed GroupWithDuplicateNameReplacesExisting [< 1 ms]
  Skipped ValidatePerformance [1 ms]
  Passed InitialStateIsNullIfNormalNotAvailable [< 1 ms]
  Passed SeparateFocusGroupInitializesToUnfocused [< 1 ms]
  Passed StateNamesMustBeUniqueWithinGroup [< 1 ms]
  Passed FocusUnfocusThenDisableClearsFocusedSetters [3 ms]
  Passed SharedUnfocusedStateRemainsStableAcrossRepeatedChanges [< 1 ms]
  Passed StateNamesMustBeUniqueWithinGroupList [< 1 ms]
  Passed VisualStateGroupsFromSettersAreDistinct [< 1 ms]
  Passed ImplicitStyleDisabledVSMOverridesLocalValue [< 1 ms]
  Passed DisablingFocusedControlMovesFocusGroupToUnfocused [< 1 ms]
  Passed VisualElementGoesToCorrectStateWhenAvailable [< 1 ms]
  Passed StateNamesInGroupMayNotBeEmpty [< 1 ms]
  Passed DisablingFocusedControlWithSingleGroupMovesToDisabled [< 1 ms]
  Passed CanRemoveAStateAndAddANewStateWithTheSameName [< 1 ms]
  Passed VSMFromStyleAreUnApplied [< 1 ms]
  Passed UnfocusedInCommonStatesKeepsPrecedenceOverNormal [< 1 ms]
  Passed InvalidateVisualStatesReappliesMutatedSetter [< 1 ms]
  Passed FocusLossWhilePointerOverLeavesFocusedStateWithoutPointerOverState [< 1 ms]
  Passed UnapplyingVSMShouldUnapplySetters [< 1 ms]
  Passed PointerEnterWithoutPointerOverStateDoesNotMoveNormalToUnfocused [< 1 ms]
  Passed InvalidateVisualStatesWithNoGroupsDoesNotThrow [< 1 ms]
  Passed StateNamesInGroupMayNotBeNull [< 1 ms]
  Passed InvalidateVisualStatesWithNoCurrentStateDoesNotThrow [< 1 ms]
  Passed VerifyVisualStateChanges [< 1 ms]
[xUnit.net 00:00:00.82]   Finished:    Microsoft.Maui.Controls.Core.UnitTests
  Passed CommonStatesSplitAcrossGroupsUseNameLookup [< 1 ms]
  Passed VisualElementGoesToCorrectStateWhenAvailableFromSetter [< 1 ms]

Test Run Successful.
Total tests: 38
     Passed: 37
    Skipped: 1
 Total time: 1.0858 Seconds

⚠️ Failure Details

  • ⚠️ Issue19752 without fix: Appium app/session did not initialize (InitialSetup/OneTimeSetup failed — test agent could not start the Appium session)
  • ⚠️ Issue19752 with fix: Appium app/session did not initialize (InitialSetup/OneTimeSetup failed — test agent could not start the Appium session)
📁 Fix files reverted (2 files)
  • src/Controls/src/Core/VisualElement/VisualElement.cs
  • src/Controls/src/Core/VisualStateManager.cs

📱 UI Tests — Focus,VisualStateManager

Detected UI test categories: Focus,VisualStateManager

⚠️ Deep UI tests — 2 categories (119 tests) could not run: OneTimeSetUp/fixture setup failure on the platform-pool agent — infrastructure, not a PR test failure (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Focus 0/9 (setup failed; 9 marked failed)
VisualStateManager 0/110 (setup failed; 110 marked failed)
⚠️ Focus — fixture setup failed for 9 tests

NUnit reported a OneTimeSetUp/fixture setup failure before test bodies ran; the TRX marked each affected test failed.

OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11

...
⚠️ VisualStateManager — fixture setup failed for 110 tests

NUnit reported a OneTimeSetUp/fixture setup failure before test bodies ran; the TRX marked each affected test failed.

OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: The app representing com.microsoft.maui.uitests could not be found.
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
   at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
   at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
   at OpenQA.Selenium.Appium.Mac.MacDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
   at UITest.Appium.AppiumCatalystApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumCatalystApp.cs:line 11

...

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


📋 Pre-Flight — Context & Validation

Issue: #19752 - Button does not behave properly when pointer hovers over the button because it's in focused state
PR: #27477 - Improve VisualState order and prevent sticky Focused visual state
Platforms Affected: Windows originally; tested target for this run: Catalyst/MacCatalyst
Files Changed: 2 implementation, 8 test/test-infrastructure

Key Findings

  • Issue #19752 reports a focused Button staying visually focused instead of showing PointerOver when hovered. The PR also addresses sticky Focused visuals when a focused control is disabled.
  • PR changes VisualElement.ChangeVisualState() from simple common-state then focus-state transitions into coordinated common/focus group logic with group lookup, clearing of stale common states, and force reapplication.
  • PR adds VisualStateManager internal helpers/overloads, unit tests for split/same visual state groups, Catalyst UI tests for Issue19752, and Appium cursor movement helpers.
  • PR discussion explicitly raised state precedence between PointerOver and Focused, composition limits for Focused && PointerOver, and a prior UI-test failure where a disabled button stayed PointerOver.
  • GitHub CLI authentication was unavailable, so PR metadata/comments were gathered from public GitHub API and local branch context where possible.

Code Review Summary

Verdict: NEEDS_DISCUSSION
Confidence: low
Errors: 0 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • Code review found no new high-confidence code defects.
  • Prior review findings were reported as fixed/mitigated: VSM lookup/allocation hot path, cursor helper typo/type conversion, initial Unfocused, Android/iOS skip timing, same-group Unfocused precedence, split lookup behavior, and hover coordinate consistency.
  • CI/check status was undetermined because gh pr checks --required was unavailable without auth and public checks were pending/red; confidence was capped low.
  • Blast radius: ChangeVisualState() runs for all controls with VSM groups during focus/enabled/pointer transitions; no new startup or static/shared state path.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #27477 Broad VSM orchestration: find common/focus groups by state name, clear stale common groups, force reapply when needed, and apply unfocus/common/focus/pointer ordering. ✅ PASSED (Gate) VisualElement.cs, VisualStateManager.cs, tests/helpers Original PR; gate was already completed before this run.

🔬 Code Review — Deep Analysis

Code Review — PR #27477

Independent Assessment

What this changes: Reworks VisualElement.ChangeVisualState() and VisualStateManager to better coordinate Normal/Disabled/Selected/PointerOver with Focused/Unfocused, especially when focus states are in separate groups. Adds unit/UI coverage and Appium cursor helpers.
Inferred motivation: Prevent sticky Focused visuals when controls are disabled or pointer-over/focus transitions interact.

Reconciliation with PR Narrative

Author claims: Fixes issue #19752 by applying unfocus before common states and pointer-over last; recommends separate FocusStates.
Agreement/disagreement: Matches the code and tests. Current implementation addresses prior ordering/split-group regressions.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
VSM lookup/allocation hot path MauiBot ✅ Fixed/mitigated ChangeVisualState() now guards with HasVisualStateGroups() and reuses groups at VisualElement.cs:1787-1810.
MoveToCoordinates typo MauiBot ✅ Fixed Current test uses App.MoveCursorCoordinates(10, 10) at Issue19752.cs:43.
float boxed as int in cursor helper MauiBot ✅ Fixed Convert.ToSingle used at AppiumMouseActions.cs:264-287.
initial Unfocused not applied MauiBot ✅ Fixed Covered by SeparateFocusGroupInitializesToUnfocused() and current logic at VisualElement.cs:1847-1852.
Android/iOS skip too late MauiBot ✅ Fixed TryToResetTestState() no-ops on Android/iOS at Issue19752.cs:14-22.
same-group Unfocused overwritten by Normal MauiBot ✅ Fixed Covered by UnfocusedInCommonStatesKeepsPrecedenceOverNormal().
split common/focus state lookup failures MauiBot ✅ Fixed Current target-state lookup and tests CommonStatesSplitAcrossGroupsUseNameLookup() / SplitFocusStatesUseNameLookup().
Windows hover coordinate inconsistency/scaling MauiBot ✅ Fixed/obsolete Current code uses window offset consistently and no density division at AppiumMouseActions.cs:319-338.

Blast Radius Assessment

  • Runs for all instances: Yes, for controls with VSM groups during focus/enabled/pointer changes.
  • Startup impact: Low; no new static startup path.
  • Static/shared state: No.

CI Status

  • Required-check result: gh pr checks --required unavailable due missing GitHub auth. Public check API shows CI still pending and maui-pr (Build .NET MAUI Build macOS (Debug)) failed.
  • Classification: Failing log shows missing .buildtasks/Microsoft.Maui.Resizetizer.After.targets, likely infrastructure/build setup unrelated to these source changes; overall CI remains undetermined/pending.
  • Action taken: Invoked azdo-build-investigator; ci-analysis unavailable. Manually inspected public check runs and AzDO log. Confidence capped low.

Findings

No new high-confidence code findings.

Failure-Mode Probing

  • Disabled while focused with separate focus group: moves focus group to Unfocused, then common group to Disabled.
  • Pointer leaves while focused: forced reapply preserves focus state after pointer-over clears.
  • Split Normal/Disabled or split Focused/Unfocused: name-based fallback/tests cover this.
  • Android/iOS UI test setup: reset override avoids pre-ignore navigation failures.

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: Code review found no unresolved code defects, and prior error findings appear addressed. However CI is currently pending/red and gh pr checks --required could not be used, so per the skill rules this cannot be LGTM yet.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Conditional application order in ChangeVisualState: disabled clears focus, pointer-over applies after focus, non-pointer applies focus after common. ⚠️ Blocked 1 file Build succeeded; Catalyst Appium could not find/connect to com.microsoft.maui.uitests, so no assertions ran. Simpler than PR but likely less robust for split-group stale setters.
2 try-fix Per-group independent target resolution with priority-ordered reapply. ⚠️ Blocked UI; ✅ 38/38 supplementary VSM unit tests 2 files Strongest alternative so far; avoids new public API but has moderate allocation/perf concern.
3 try-fix Make GoToState update all matching groups plus small ChangeVisualState sequencing. ❌ Fail 2 files Catalyst UI blocked; supplementary VSM unit tests failed 3/38. Self-review found 2 major correctness issues.
4 try-fix VisualElement-only framework-state composer for known Common/Focus families. ⚠️ Blocked UI; ✅ 37 passed, 1 skipped supplementary VSM unit tests 1 file Clean self-review and no public API, but complex and not demonstrably better than PR without UI validation.
PR PR #27477 Broad VSM orchestration with group lookup, stale common-state clearing, targeted group transitions, and force reapplication. ✅ PASSED (Gate) 10 files Original PR; gate was already completed before this run.

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 1 Yes Candidate 1: conditional state ordering.
claude-opus-4.7 1 Yes Candidate 2: per-group independent state resolution and priority reapply.
gpt-5.3-codex 1 Yes Candidate 3: multi-group GoToState semantic change.
gpt-5.5 1 Yes Candidate 4: VisualElement-only framework-state composer.

Candidate Narratives

Candidate 1 — Conditional Application Order

This tested the smallest possible root-cause hypothesis: the existing GoToState calls are sufficient if focus/common ordering changes by scenario. It built successfully, but Catalyst UI execution was blocked before assertions by Appium app discovery. The approach is simpler than the PR, but the learned weakness is that ordering alone does not explicitly clear stale split-group setters.

Detailed log: CustomAgentLogsTmp/PRState/27477/PRAgent/try-fix-1/content.md

Candidate 2 — Per-Group Independent State Resolution

This tested a per-group state-axis model: each framework-managed VSM group resolves its own target and setters are reapplied in priority order. Catalyst UI execution was blocked by the same Appium error, but the supplementary VisualStateManager regression suite passed 38/38. This is the strongest non-PR alternative, though it adds internal complexity and has a moderate allocation/perf self-review note.

Detailed log: CustomAgentLogsTmp/PRState/27477/PRAgent/try-fix-2/content.md

Candidate 3 — Multi-Group GoToState

This tested whether changing VisualStateManager.GoToState(name) to update all matching groups plus small ChangeVisualState sequencing could solve the issue. It failed supplementary VSM tests (3/38 failing), and self-review found major correctness problems around peer-state clearing and no-PointerOver focus behavior. This approach is rejected.

Detailed log: CustomAgentLogsTmp/PRState/27477/PRAgent/try-fix-3/content.md

Candidate 4 — VisualElement Framework-State Composer

This kept VSM semantics unchanged and composed known Common/Focus framework state families inside VisualElement. Catalyst UI remained blocked, while supplementary VSM tests passed (37 passed, 1 skipped). It has a clean self-review and no public API, but it is still complex and lacks the required unblocked UI validation, so it is not demonstrably better than the PR.

Detailed log: CustomAgentLogsTmp/PRState/27477/PRAgent/try-fix-4/content.md

Exhausted: Yes
Selected Fix: PR's fix — The gate already passed for the PR. Candidate 3 failed the supplementary VSM regression tests. Candidates 1, 2, and 4 were blocked on the required Catalyst UI test by the same Appium app-discovery failure; Candidates 2 and 4 passed supplementary VSM unit coverage but are not demonstrably better than the PR under the required stop criteria.


🏁 Report — Final Recommendation

Comparative Fix Report — PR #27477

Candidates compared

Rank Candidate Result Assessment
1 pr ✅ Gate passed Best candidate. The submitted PR fix has the required regression evidence: tests fail without the fix and pass with the fix. It directly addresses sticky Focused visuals, PointerOver precedence, split common/focus groups, same-group Unfocused, and disabled focused controls.
2 pr-plus-reviewer ✅ Same as PR The expert reviewer produced no actionable inline findings, so this candidate is identical to pr. It does not improve on the raw PR fix.
3 try-fix-2 ⚠️ Catalyst UI blocked; ✅ 38/38 supplementary VSM unit tests Strongest non-PR alternative. The per-group resolver model is conceptually sound and unit-covered, but it did not complete the required Catalyst UI validation and adds extra complexity/allocation concerns.
4 try-fix-4 ⚠️ Catalyst UI blocked; ✅ 37 passed, 1 skipped supplementary VSM unit tests Viable smaller-surface alternative with no global VSM semantic changes, but still complex and not demonstrably better than the PR under the required validation criteria.
5 try-fix-1 ⚠️ Catalyst UI blocked Simpler ordering-only approach, but weaker because it relies on setter order and does not explicitly clear stale split-group common-state setters.
6 try-fix-3 ❌ Failed supplementary VSM regression tests Rejected. It failed 3/38 supplementary VSM tests and self-review identified major correctness issues around peer-state clearing and no-PointerOver focus behavior. Per ranking rules, failed-regression candidates rank below candidates with passing or blocked validation.

Winning candidate

Winner: pr

The raw PR fix wins because it is the only non-identical candidate with the required passed gate evidence, and the expert review did not identify any actionable change to apply. pr-plus-reviewer is equivalent to pr; selecting pr more accurately reflects that the submitted fix should proceed as-is.

Rationale

The PR's approach has the broadest demonstrated coverage for the actual failure modes: it handles separate FocusStates, same-group focus states, disabled focused controls, pointer-over reapplication after focus transitions, split state lookup by state name, and stale common-state clearing. The best try-fix alternatives either lacked the required Catalyst validation or introduced comparable complexity without outperforming the PR. The only regression-failing candidate, try-fix-3, is ranked last as required.


🧭 Next Steps — review latest findings

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

@kubaflo

kubaflo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🔍 This is an AI-generated comment posted on @kubaflo's behalf.

● Update — both flagged logic errors are now fixed; pipeline gate passes.

The two ❌ Error findings from the prior automated review have been addressed:

  • VisualElement.cs:1798 — the common-state group lookup no longer narrows to a single cached group; Disabled/Selected/PointerOver/Normal are resolved across all groups again (commit 959f64ae).
  • VisualElement.cs:1881 — a group containing only one focus state can no longer be selected in a way that leaves stale Focused setters applied on re-enable (commit 200e647607).

Both scenarios are now covered by focused unit repros in Controls.Core.UnitTests; local VisualStateManagerTests pass (37 passed / 1 skipped).

Latest pipeline result: Gate ✅ PASSED, 0 Errors / 0 Warnings / 0 Suggestions.

ℹ The Issue19752 MacCatalyst UI test shows ⚠️ ENV ERROR in both the with-fix and without-fix columns — this is a Helix/Appium device-environment error (infra), not a code failure. Because this is high-blast-radius core VisualElement state logic and the target UI test could not execute cleanly on the device, the automated reviewer caps confidence at low and lands on NEEDS_DISCUSSION rather than an automated approve. The code itself is clean and both real defects are resolved — this is ready for human review.

@kubaflo

kubaflo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

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

@kubaflo

kubaflo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🔍 This is an AI-generated comment posted on @kubaflo's behalf.

CI triage for the latest /azp run — both red legs are environmental / base-branch, not caused by this PR (which only touches VisualElement.cs, VisualStateManager.cs, and tests):

Build macOS (Debug)build 1506591: a flood of APT2260 "resource attr/colorPrimary / Theme.MaterialComponents.DayNight / Widget.Design.BottomNavigationView not found" in Controls.Core (net11.0-android37.0). This is the Material Components / Maven-restore infra signature (unrestored AndroidX Material AAR), unrelated to any change here.

Build Device Tests (CoreCLR)build 1506593: CA1416 at Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs:1700 & :1705UIGraphics.BeginImageContext / GetImageFromCurrentImageContext "unsupported on maccatalyst 17.0+". That file is not in this PR's diff, and the unguarded calls exist identically on the net11.0 base branch — a pre-existing break surfaced by the newer maccatalyst26.5 SDK.

This PR's own change is clean: both targeted VisualStateManager logic bugs are fixed, unit repros added, 0 errors / 0 warnings, gate PASSED. Neither failure is a regression from this fix.

@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@mattleibow — test-failure review results are available based on commit 200e647.
To request a fresh review after new comments, commits, or CI runs, comment /review tests.

Overall Not ready Failures 30 Baseline 12 on base Platform Android/iOS/MacCatalyst

Test Failure Review: Not ready - click to expand

Overall verdict: Not ready

12 failures are deterministically regressed vs the base branch (green on base, red on PR), including APT2260 Android resource build errors and CA1416 compiler errors on MacCatalyst. 18 additional failures are unattributed (base outcome ambiguous or leg-only match). 8 checks are still pending so the CI outcome is not final.

Coverage: 138 checks · 121 passing · 9 failing · 8 pending · 0 inaccessible · 1 unmapped · 14 unexplained build legs · 0 unaccounted failing checks · 0 aborted failing checks · 0 canceled-build checks · 0 device-test unverified · 18 unattributed · 12 regressed-vs-base. Deterministic ceiling: Not ready — 8 interesting check(s) are still pending/in-progress; 1 failing check(s) have no inspectable AzDO build evidence (Build Analysis); 14 failed build leg(s) produced no extractable failure; 18 failure(s) could not be attributed deterministically; 12 leg/failure(s) are red on the PR but green on the most recent completed base build.

Failure Verdict On base? Evidence
Build Microsoft.Maui.sln — APT2260 (colorPrimary, actionBarSize, colorSurface, Widget.Design.BottomNavigationView, 5 errors) Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; base build 1501450 was green; Android resource errors in Controls.Core.csproj net11.0-android37.0 (styles.xml / styles-material3.xml)
Build DeviceTests (CoreCLR) — CA1416 (UIGraphics.BeginImageContext, UIGraphics.GetImageFromCurrentImageContext in NavigationRenderer.cs, 2 errors) Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; base build 1501451 was green; CA1416 — UIGraphics APIs unsupported on MacCatalyst 17.0+, net11.0-maccatalyst26.5
ButtonsLayoutResolveWhenParentSizeChanges Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; VisualTestFailedException
ClippedStackLayoutInsideBorderWithBackgroundRendersCorrectly (Android) Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; TimeoutException: StackLayout fails to render content while applying Clip inside Border with Background
Issue3342Test (Android) Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; TimeoutException: Crash or incorrect behavior with corner radius 5
Issue59172RecoveryTest Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; TimeoutException waiting for element (MacCatalyst Navigation check)
ValidateOnNavigationToMethod Likely PR-caused no — regressed deterministicAttribution: regressed-vs-base; TimeoutException waiting for element (MacCatalyst Navigation check)
to find package 'platform-tools;35.0.2' (android) Needs human investigation yes — also-red indeterminate; legAlsoFailsOnBase=true; avdmanager failed in Provision Android SDK step — likely infra flake
to find package 'platform-tools;35.0.2' (macos/unknown, 2 occurrences) Needs human investigation no indeterminate; SdkToolFailedExitException from avdmanager — likely infra flake, no base corroboration
BottomSheetDetentHeightIsCorrectWhenCollectionViewIsMeasuredBeforeMount Needs human investigation yes — also-red indeterminate; legAlsoFailsOnBase=true; TimeoutException — likely pre-existing flake, not dismissible without exact per-test base match
VerifyImageButtonAspect_AspectFillWithImageSourceFromUri, VerifyImageButtonAspect_AspectFitWithImageSourceFromUri, VerifyImageButtonAspect_CenterWithImageSourceFromUri, VerifyImageButtonAspect_FillWithImageSourceFromUri, VerifyImageAspect_AspectFillWithImageSourceFromUri, VerifyImageAspect_AspectFitWithImageSourceFromUri, VerifyImageAspect_CenterWithImageSourceFromUri, VerifyImageAspect_FillWithImageSourceFromUri, DownSizeImageAppearProperly, LoadTestImageButtonShouldLoadImageWithoutException (10 tests) Needs human investigation yes — also-red indeterminate; legAlsoFailsOnBase=true; VisualTestFailedException — same leg also red on base build 1501538; likely pre-existing image/visual flakes, not dismissible without exact per-test base match
Publish the ios_ui_tests_coreclr_controls_latest test results — build error (2 occurrences) Needs human investigation no indeterminate; wrapper step "one or more test failures detected in result files" — underlying test failures are listed in the rows above
Publish the maccatalyst_ui_tests_coreclr_controls test results — build error Needs human investigation no indeterminate; wrapper publish step error
Publish the android_ui_tests_controls_30 test results — build error Needs human investigation no indeterminate; wrapper publish step error

Recommended action

The 7 regressed-vs-base build/compiler failures (APT2260 and CA1416) and 5 regressed UI tests need investigation before this PR can merge. Additionally, 8 checks are still pending — wait for CI to complete and then re-run the review.

Evidence details

PR build: maui-pr 1506591 — FAILURE. Failing leg: Build .NET MAUI Build macOS (Debug).

Device tests build: maui-pr-devicetests 1506593 — FAILURE. Failing leg: net11.0 CoreCLR ios/catalyst/android Helix Tests Build Device Tests (CoreCLR).

UI tests build: maui-pr-uitests 1506592 — still in progress (8 checks pending).

Baseline builds used for comparison: maui-pr 1501450 (7 failures on base), maui-pr-devicetests 1501451 (1 failure on base), maui-pr-uitests 1501538 (44 failures on base; only first 8 of 39 failed logs inspected — baseline may be incomplete).

APT2260 details: The macOS Debug build fails with multiple APT2260 errors in artifacts/obj/Controls.Core/Debug/net11.0-android37.0/lp/105/jl/res/values/styles.xml — Android resource attrs (colorPrimary, actionBarSize, colorSurface) and style Widget.Design.BottomNavigationView not found. This PR changes VisualStateManager and VisualElement, not Android resource files directly; however, the build was green on the base so this is a regression introduced by or coinciding with this PR.

CA1416 details: The DeviceTests build (CoreCLR) fails with CA1416 errors in NavigationRenderer.cs lines 1700 and 1705: UIGraphics.BeginImageContext(CGSize) and UIGraphics.GetImageFromCurrentImageContext() are unsupported on MacCatalyst 17.0+ (net11.0-maccatalyst26.5). These files are not directly modified by this PR; the leg was green on the base build.

Unexplained failed legs (14): These legs produced failures but no extractable test name or build error — inspect each log directly: Build Microsoft.Maui.sln, Controls ViewBaseTests/VisualStateManager/Window, Controls Page/Performance/Picker/ProgressBar, Controls (vlatest) Layout, Controls Layout, Controls SearchBar/Shape/Slider, Controls Shell, Controls CarouselView, Controls Cells/CheckBox/ContextActions/CustomRenderers/DatePicker/Dispatcher/DisplayAlert/DisplayPrompt/DragAndDrop, Controls (API 30) Border/BoxView/Brush/Button, Controls (vlatest), Controls CollectionView.

Unmapped check: Build Analysis has no inspectable AzDO build evidence — see its documentation page directly.

Limitation: AzDO was accessed without authentication; test-level results from the authenticated test API were unavailable. Baseline failure list for maui-pr-uitests may be incomplete (only first 8 of 39 failed logs inspected).

@kubaflo

kubaflo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🔍 This is an AI-generated comment posted on @kubaflo's behalf.

Reconciliation with the /review tests verdict (Not ready — 12 regressed-vs-base).

The test-failure bot's method is sound and it surfaced 5 UI-test failures worth checking — credit where due. It is also factually correct as an observation: those legs are red on this PR and green on the sampled base builds. What I want to reconcile is root cause / attribution, where I have hard evidence the two build errors are not introduced by this PR's source. I'll also correct my own earlier wording.

Correction to my prior comment: I attributed CA1416 to "the newer maccatalyst26.5 SDK." That mechanism is wrong — I verified the green base build the bot cites (1501451) used the same net11.0-maccatalyst26.5. So it is not an SDK-version bump. The real picture is below.

This PR's exact diff (10 files): VisualElement.cs, VisualStateManager.cs, VSM unit tests, Issue19752 HostApp+shared test (its own repro), and two UITest.Appium infra files (AppiumMouseActions.cs, HelperExtensions.cs). No NavigationRenderer.cs, no Android resource/build files.

CA1416 — Build DeviceTests (CoreCLR) (base cited green: 1501451). The error is on NavigationRenderer.cs:1700/1705 (UIGraphics.BeginImageContext / GetImageFromCurrentImageContext). That file is not in this PR's diff and was last modified 2026-04-28 (#35011). At the exact base commit 7f139ed4 that produced the green build 1501451, those lines are byte-identical to today and compiled under the same maccatalyst26.5 — and Build DeviceTests (CoreCLR) was green there. So: identical months-old code + identical SDK → green on base, red on PR. A C# change to VisualElement/VisualStateManager cannot causally introduce a platform-compatibility diagnostic in an unmodified, unrelated file; this is a build-environment / analyzer-state condition, not a source regression from this fix.

APT2260 — Build macOS (Debug) (base cited green: 1501450). Android resource-linking errors (colorPrimary, Theme.MaterialComponents.DayNight, Widget.Design.BottomNavigationView) in Controls.Core (net11.0-android37.0) styles.xml. This is the Material Components / Maven-AAR restore signature. The bot itself notes the PR "changes VisualStateManager and VisualElement, not Android resource files" — its verdict is purely correlational ("coinciding with"). C# VSM logic cannot emit Android resource-linker errors; this is an unrestored-dependency / environment failure.

The 5 regressed UI tests — cascade-consistent. The only UI-test-infra this PR touches (AppiumMouseActions.cs, HelperExtensions.cs) is purely additive — new MoveCursor / MoveCursorCoordinates commands + helpers — plus cosmetic whitespace/using-reorder. No existing helper behavior changed, and none of the 5 failing tests are in the diff or call the new commands. 4 of the 5 are TimeoutException on exactly the Android (ClippedStackLayoutInsideBorderWithBackground, Issue3342Test) and MacCatalyst (Issue59172RecoveryTest, ValidateOnNavigationToMethod) platforms whose builds failed above — the classic "app never built/deployed → element never appears" cascade.

The one I won't hand-wave: ButtonsLayoutResolveWhenParentSizeChanges (pre-existing Issue22306, a VisualTestFailedException) is a layout test and is the only failure plausibly within reach of a VisualElement change. Most likely a visual-baseline flake, but it's the single case I'd want isolated on a clean build before dismissing.

This PR's own fix is clean: both targeted VSM logic bugs fixed, unit repros added, 0 errors / 0 warnings, gate PASSED.

Suggested next step: re-run once the environment is healthy — /azp run for a Maven-restored image + a current base, then /review tests again. If CA1416 and APT2260 clear (they should, given they're base/environment-inherited) and only ButtonsLayoutResolveWhenParentSizeChanges remains, that single test can be isolated against the VSM/VisualElement change.

@kubaflo

kubaflo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closing for now as looks like changes cause too many regressions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-xaml XAML, CSS, Triggers, Behaviors s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) stale Indicates a stale issue/pr and will be closed soon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Button does not behave properly when pointer hovers over the button because it's in focused state