Repository navigation
[Android][Testing] Keep Issue7556 flyout actions reachable - #40248
Conversation
Move modal presentation and explicit close actions into the flyout, use stable automation IDs, and close the drawer before changing detail-page behavior. Preserve both tests, modal retention, rotations and the production no-tap-through behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
| { | ||
| Text = "Close Flyout", | ||
| AutomationId = "CloseFlyout", | ||
| Command = new Command(() => IsPresented = false) |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - On a tablet, Issue7556 starts with FlyoutLayoutBehavior.Split, so ShouldShowSplitMode is true and FlyoutPage.OnIsPresentedPropertyChanging rejects setting IsPresented to false with InvalidOperationException. Tapping the new CloseFlyout button therefore invokes an unhandled throwing command in the sample's initial split state. Hide or disable this action while the flyout must remain split; the Android phone fixture cannot exercise this case.
There was a problem hiding this comment.
Fixed in 5a25827. CloseFlyout now uses CanExecute to disable the action while ShouldShowSplitMode is true, with reevaluation on size and layout-behavior changes. It is also disabled before a window is attached; there is no exception catch or product change.
The API 30 emulated-tablet locked-Split control passed after rebuilding the pushed commit: the button is disabled, an attempted tap leaves the app alive and the flyout open, modal push/pop retains the flyout, and landscape/portrait retain the locked state. The same disabled-button assertion fails on the original 38df APK and passes again with the correction. Phone coverage remains enabled and passes separately.
A broader tablet mode-transition probe exposed a separate native LayoutParams ClassCastException, reproduced once on the original 38df APK too. That failure and its attribution limits are recorded in the PR description; this is not a claim that all tablet scenarios pass.
Auto-replied by the GitHub Copilot app
| }, | ||
| new Button() | ||
| { | ||
| Text = "Close Flyout", |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - This button now shares the detail label's "Close Flyout" text, which SplitOnLandscapeFailsToDetectClose still waits for after each rotation. WaitForElement(string) falls back to a text query, so if rotation leaves the flyout covering the detail page, the new button satisfies those waits instead of the detail sentinel. The later conditional CloseFlyout action clears that state without asserting it, allowing the rotation regression to pass. Give the detail sentinel a unique AutomationId and use it for the post-rotation waits.
There was a problem hiding this comment.
Fixed in 5a25827. The detail label now has the unique DetailSentinel ID. All four rotations check that sentinel and reject an enabled overlay covering it; a genuine locked split remains valid. The compensating post-rotation close is removed. Before rotation starts, the test observes completion of its legitimate initial close using the existing WaitForNoElement, rather than racing the close animation.
The causal control invokes the actual revised fixture oracle: with the flyout open, the old text lookup and even the covered detail ID both match, but the revised oracle fails; after explicitly closing the drawer, the same oracle passes. After rebuilding the pushed commit, both original phone cases passed (2/2, no skips) and this separate causal control passed (1/1). The six passes reported for 38df are now explicitly historical, not evidence that its old oracle was sound.
Auto-replied by the GitHub Copilot app
Disable the sample close command while genuinely split, distinguish the detail sentinel from the flyout button, and reject overlay-covered detail state after all four rotations. Observe the legitimate initial close completion before rotating instead of compensating after a failed rotation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
| protected override void Init() | ||
| { | ||
| var closeFlyout = new Command(() => IsPresented = false, | ||
| () => Window is not null && !((IFlyoutPageController)this).ShouldShowSplitMode); |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The locked-split close guard has no committed regression test. On phones, ShouldShowSplitMode always returns false, so removing this guard leaves both repaired phone tests passing while restoring the InvalidOperationException when CloseFlyout is tapped in the initial Split state on a tablet. The modal test never asserts the disabled action, and the rotation test attempts its initial close before reaching AssertDetailIsAccessible. Add a committed non-phone locked-Split case asserting that the close action is disabled and leaves the flyout presented, alongside the enabled phone-overlay case; the external tablet control described in the PR is not part of the committed suite.
There was a problem hiding this comment.
Added committed coverage in c6435a7. CloseFlyoutRespectsDeviceIdiomInSplitMode reads an independent DeviceInfo.Idiom label: on phones it asserts the overlay action is enabled and actually closes the drawer; on non-phone initial Split it asserts the action is disabled, attempts a tap and verifies the flyout remains presented. Neither branch skips or assumes success, and the expected state is not derived from the guard or button state. The original modal and four-rotation methods are unchanged.
Causal check on the actual committed case: removing only !ShouldShowSplitMode from CanExecute makes the tablet run fail (idiom: Tablet, expected disabled, actual enabled). Restoring the guard returns tablet 1/1 and phone 3/3 to green. After rebuilding the pushed commit, all three committed phone cases passed and the same new committed tablet case passed (1/1), with zero skips. No external control cases were compiled for these runs; the PR description now distinguishes this persistent coverage from the earlier external controls.
Auto-replied by the GitHub Copilot app
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit c6435a7.
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for #40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** #40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; #40191 is the preceding focusability change, not a duplicate repair. #40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to #40116 and #40191. Repairs the independent Editor timeout observed in the validation of #40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is an explicitly coordinated release-candidate repair for dotnet#40116, targeting the designated `candidate/11.0.1xx-sr2` branch. ### Description of Change <!-- Enter description of the fix in this section --> Only post the explicit soft-keyboard request from `TextViewExtensions.Focus` when Android's native `OnCheckIsTextEditor()` returns true, while preserving the existing `ShowSoftInputOnFocus` check and normal focus request. **Root cause:** dotnet#40191 intentionally keeps read-only inputs focusable and hides an existing keyboard in the native focus-change handler. However, the shared programmatic-focus callback subsequently posts `ShowSoftInput` even when the native input has `KeyListener = null`, `InputType = 0`, and `OnCheckIsTextEditor() == false`. This reopens the keyboard. In the unchanged `VerifyEditorSelectionLengthWhenIsReadOnlyTrue` test, the sample's Update Cursor Selection button programmatically focuses the read-only Editor; the keyboard then obscures `SelectionLengthEntry`, causing the timeout at line 480. Native tracing on API 30 confirmed the Editor is genuinely read-only and remains focusable/focused while the IME changes from hidden to visible. A diagnostic-only control removing the explicit keyboard-show trigger clears the unchanged test. The fix does not revert read-only focusability or alter cursor/selection mapping. No timeouts, retry budgets, filters, or screenshot tolerances are changed; existing assertions are retained and focus assertions are added. Extend the existing Issue6250 page/tests rather than adding a fixture: exercise touch and programmatic focus for read-only Entry, Editor, and SearchBar. Each case first proves an editable Entry shows the keyboard; the programmatic cases use `Focus()` for that positive control too. All cases assert that the intended read-only control actually receives focus and the keyboard disappears. The original Editor feature tests remain unchanged. **Local causal validation:** Android API 30, Nexus 5X, 1080x1920, 420 dpi, ARM64, CoreCLR 11.0.0, SDK 11.0.100. | Phase | Result | | --- | --- | | Unchanged original read-only Editor pair | Selection-length case times out at the same line as CI; cursor-position case passes | | Diagnostic trigger-removed control | Original pair: 2 passed | | Fix applied | Original pair plus six focus cases: 8 passed | | Only production guard reverted, final test bodies retained | 4 failed / 4 passed: original selection timeout and all three read-only programmatic cases fail | | Guard restored, no diagnostic app instrumentation | Same eight cases: 8 passed | | Expanded selector including both Editor fixture names and Issue6250 | 93 total: 62 passed, 3 existing skips, 28 failed solely because Material3 API-30 baseline snapshots are absent; no snapshots or filters changed | | Pushed commit rebuilt and identical expanded selector repeated | 93 total: 62 passed, 3 existing skips, 28 missing-baseline failures; original Editor fixture 56 passed / 3 skips and Issue6250 6 passed | Within that expanded run, the original Editor fixture is **56 passed / 3 existing skips** and Issue6250 is **6 passed**. The Material3 failures are explicit validation limitations, not a green full-suite claim: those snapshots exist under `android-notch-36`, not the API-30 `android` directory. The failing CI environment uses x86_64/CoreCLR 11.0.1/servicing SDK 11.0.101. Local ARM64 validation is not a claim that the exact CI runtime or other platforms have passed. CI requests remain with the coordinating maintainer/session. No manual CI or review triggers were submitted. Searched open and recently merged PRs for the failure, native text-editor check, and explicit keyboard-show mechanism; dotnet#40191 is the preceding focusability change, not a duplicate repair. dotnet#40169 changes ContentView handling, not this focus path. #### Exact commands and results Run from the repository root using the local SDK/runtime and owned emulator described above. Absolute paths below identify retained diagnostic results; none of those diagnostic files is part of the PR. **Passed: 0 warnings, 0 errors.** ```bash dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors.** ```bash dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -c Debug -f net11.0-android -p:RuntimeIdentifier=android-arm64 -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q ``` **Passed, including the post-push build: 0 warnings, 0 errors. The external targets file changes only the task-owned Appium endpoint.** ```bash dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Debug -p:IncludeAndroidTargetFrameworks=true -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:CustomAfterMicrosoftCommonTargets=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/private-appium.targets -v:q ``` **Passed (exit 0); only these three changed C# files were included.** ```bash dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/Android/TextViewExtensions.cs src/Controls/tests/TestCases.HostApp/Issues/Issue6250.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6250.cs --verbosity quiet ``` **Expected red with only the production guard removed: 4 failed / 4 passed / 0 skipped.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-reverted.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-reverted ``` **Guard restored: 8 passed / 0 failed / 0 skipped, including editable programmatic-focus positive controls.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~VerifyEditorSelectionLengthWhenIsReadOnlyTrue|FullyQualifiedName~VerifyEditorCursorPositionWhenIsReadOnlyTrue|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=final-restored.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/final-restored ``` **Post-push full selector on a401a45: exit 1, 62 passed / 28 failed / 3 existing skips / 93 total. Every failure is a missing API-30 Material3 baseline; none is silently excluded.** ```bash DEVICE_UDID=emulator-5576 ANDROID_SERIAL=emulator-5576 PLATFORM_VERSION=11 DEVICE_SKIN='Nexus 5X' APPIUM_LOG_FILE=/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush-appium.log dotnet vstest artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll '--TestCaseFilter:FullyQualifiedName~EditorFeatureTests|FullyQualifiedName~Microsoft.Maui.TestCases.Tests.Issues.Issue6250' '--logger:trx;LogFileName=postpush.trx' --ResultsDirectory:/Users/kubaflo/.copilot/session-state/36c25d54-6d5a-4e42-8ee0-23fc24260ce9/files/postpush ``` ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Relates to dotnet#40116 and dotnet#40191. Repairs the independent Editor timeout observed in the validation of dotnet#40248; it does not change Issue7556 or attribute this failure to that PR's implementation. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is explicitly coordinated corrective work for the SR2 candidate investigation in dotnet#40116, targeting `candidate/11.0.1xx-sr2` as requested. No merge or retarget is requested. ### Description of Change <!-- Enter description of the fix in this section --> Repair the existing Android `Issue7556` UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from dotnet#39900. Add persistent regression coverage for the locked-split close guard. **Root cause:** on a phone, the open flyout overlays the detail page even when `FlyoutLayoutBehavior` is `Split`. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayed `Split`, so the loop never advanced. The visibility checks also used `FindElements(string)`, an ID lookup, against a label with no automation ID. The current CI occurrence is [build 1680664, Android API 30 mixed shard](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1680664&view=logs&j=d9a7ba02-b305-5c91-d254-e985873dff6c). Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results. **Repair:** - Move the sample's existing modal action into the flyout, where it is genuinely reachable while the flyout remains open; modal navigation still goes through the detail navigation stack. - Give the flyout label a stable `FlyoutVisible` ID and provide a real `CloseFlyout` button in the flyout. - Close an already-open drawer before changing a setting on the detail page. - Disable `CloseFlyout` while `IFlyoutPageController.ShouldShowSplitMode` is true. Its `CanExecute` state is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes. - Identify the detail label uniquely with `DetailSentinel`. After **each of the four rotations**, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle. - Observe completion of the legitimate initial close with the existing `WaitForNoElement` before starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared. - Add the committed `CloseFlyoutRespectsDeviceIdiomInSplitMode` case. The sample reports `DeviceInfo.Idiom` independently through a `DeviceIdiom` label; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initial `Split` action is disabled, attempts the tap, and verifies the flyout stays visible in `Split` with the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback. Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed `5a258` revision. The fixture now has **three committed cases**, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes. **Committed guard regression and current validation — commit `c6435a769050955f09576be73a6f955d5ec879a5`** The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source. After rebuilding the pushed commit: - API 30 phone: **3 executed / 3 passed / 0 failed / 0 skipped** — both original cases and the new committed guard case. - API 30 emulated tablet: the **same committed guard case**, **1 executed / 1 passed / 0 failed / 0 skipped**. This verifies genuine non-phone `Split`, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs. - Causal negative: remove **only** `!ShouldShowSplitMode` from `CanExecute`, rebuild the actual sample, and run the identical committed tablet case: **1 executed / 1 failed**, `Expected: False, But was: True`, independently reported idiom `Tablet`. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet **1/1 passed**, phone **3/3 passed**; post-push rebuilding repeated those green results. The phone is API 30 ARM64 with `sw411dp`. Tablet validation uses the same task-owned emulator with an explicitly verified `1600x2560`, density `240`, `sw1066dp`/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up. **Previous review corrections and historical validation — `5a2582793e98f51ffc4173d6681f17e7168882e8`** Both earlier inline findings were valid. The original six passing executions at `38df0b65fdbcaf22ef3d593e8757b101d87e0b42` remain historical results, **not proof that its rotation oracle was sound**. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward. At `5a258`, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap. **Known remaining native failure, not a green-count exclusion:** an earlier extended tablet `Split → Popover → SplitOnPortrait` probe encountered `ClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParams` in `DrawerLayout.getDrawerViewAbsoluteGravity`/`ViewDragHelper.continueSettling`. Exactly one corresponding mode-transition probe on the retained unchanged `38df` APK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256 `263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b`. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical dotnet#24779 and dotnet#18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. **No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.** **Original investigation and causal controls** - Exact current CI APK: `Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk`, 58,597,971 bytes, SHA256 `7a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514`. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete. - Locally rebuilt unchanged candidate source reproduced the same failure. Reverting the complete initial two-file repair and rebuilding the actual repository app and NUnit assembly made the original modal test fail at line 28 again; the following rotation test was externally stopped after 45 seconds. That aborted TRX contains **1 executed, 1 failed**, not two completed failures or an app crash. - The initial coherent repair passed the actual fixture before reversal, after restoration and after its first push: six historical passing executions at `38df`. Its oracle weakness is corrected above; these are not counted as current-head validation. - Original native snapshots independently verified a dismissed modal with the flyout still open and a portrait final state with `SplitOnLandscape`. Failed prototypes and zero-test setup attempts are excluded from passing counts. Local validation uses .NET SDK **11.0.100** / CoreCLR **11.0.0**. Original CI uses servicing SDK **11.0.101** / runtime **11.0.1** and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including dotnet#39900, are unchanged. Commands run, with results (`SESSION_FILES` is the local evidence directory and `dotnet` resolves to the SDK above): ```sh # Passed: repository build tasks, Android-only platform selection. dotnet build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual CoreCLR sample, 0 warnings / 0 errors. dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release --no-restore -p:RuntimeIdentifier=android-arm64 -p:AndroidPackageFormats=apk -p:EmbedAssembliesIntoApk=true -p:UseMonoRuntime=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push: actual repository NUnit assembly, no external control cases. dotnet build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-restore -p:CustomAfterMicrosoftCommonTargets="$SESSION_FILES/private-appium.targets" -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q # Passed after current push on phone: all 3 committed cases, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-phone-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~Issue7556' --logger 'trx;LogFileName=postpush-phone.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-phone" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed after current push in verified emulated-tablet configuration: 1 committed case, 0 failed / 0 skipped. APPIUM_LOG_FILE="$SESSION_FILES/committed-coverage/postpush-tablet-appium.log" dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release --no-build --no-restore --filter 'FullyQualifiedName~CloseFlyoutRespectsDeviceIdiomInSplitMode' --logger 'trx;LogFileName=postpush-tablet.trx' --results-directory "$SESSION_FILES/committed-coverage/postpush-tablet" --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type mini -v:normal # Passed: scoped repository whitespace verification. dotnet format whitespace . --folder --include src/Controls/tests/TestCases.HostApp/Issues/XFIssue/Issue7556.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue7556.cs --verify-no-changes --verbosity quiet ``` `--blame-hang` is an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; dotnet#39900 is preserved, and no existing Issue7556 repair was found. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A for a new product-issue closure. Relates to dotnet#40116 and dotnet#39900; repairs the existing dotnet#7556 UI regression fixture. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.This is explicitly coordinated corrective work for the SR2 candidate investigation in #40116, targeting
candidate/11.0.1xx-sr2as requested. No merge or retarget is requested.Description of Change
Repair the existing Android
Issue7556UI-test interactions without skipping either original test or undoing the correct no-tap-through behavior from #39900. Add persistent regression coverage for the locked-split close guard.Root cause: on a phone, the open flyout overlays the detail page even when
FlyoutLayoutBehaviorisSplit. The modal test tapped the covered detail-page button, so no modal opened. Its timeout left the flyout open; the next test repeatedly tapped the covered behavior-changing button. The app and UiAutomator remained responsive, but the behavior stayedSplit, so the loop never advanced. The visibility checks also usedFindElements(string), an ID lookup, against a label with no automation ID.The current CI occurrence is build 1680664, Android API 30 mixed shard. Its complete task log records the modal timeout followed by the rotation test starting with no completion before worker cancellation. Completed screenshot, page-source and logcat files were recovered from the job's File Container even though the large Appium-log upload never completed; missing TRX files are not treated as passing results.
Repair:
FlyoutVisibleID and provide a realCloseFlyoutbutton in the flyout.CloseFlyoutwhileIFlyoutPageController.ShouldShowSplitModeis true. ItsCanExecutestate is refreshed on layout-size and behavior changes; it is also disabled before a window is attached. No exception-catching or production behavior changes.DetailSentinel. After each of the four rotations, require that sentinel and reject an open enabled overlay flyout. A genuinely locked split is permitted because both panes are accessible and the close action is disabled. Neither the duplicate button text nor the covered detail ID alone can satisfy this oracle.WaitForNoElementbefore starting rotation. Remove the compensating close after rotation: an unexpectedly open overlay now fails instead of being silently cleared.CloseFlyoutRespectsDeviceIdiomInSplitModecase. The sample reportsDeviceInfo.Idiomindependently through aDeviceIdiomlabel; the expected state is not derived from the close button or guard. On phones the test opens the overlay, asserts the action is enabled, taps it and verifies dismissal plus the detail sentinel. On non-phone idioms it asserts the initialSplitaction is disabled, attempts the tap, and verifies the flyout stays visible inSplitwith the action still disabled. Both branches perform real assertions; there is no skip, ignore or success-only fallback.Both original modal/rotation methods remain byte-for-byte unchanged from the reviewed
5a258revision. The fixture now has three committed cases, all in the existing category. The open-flyout modal push/pop and post-pop visibility checks, behavior selection, all four landscape/portrait transitions, final flyout visibility checks and categories remain. The previously unchecked final portrait transition is checked too. The selector loop progresses by real reachable actions, not a cap or early-success return. No production source, platform exclusion, configured timeout, retry, sleep, tolerance or pipeline configuration changes.Committed guard regression and current validation — commit
c6435a769050955f09576be73a6f955d5ec879a5The new review finding was valid: the earlier external tablet control was not persistent regression coverage. The new idiom-sensitive case is now part of the repository NUnit suite, not injected diagnostic source.
After rebuilding the pushed commit:
Split, a disabled close action, and a still-present flyout after an attempted tap. No external control cases are compiled in these runs.!ShouldShowSplitModefromCanExecute, rebuild the actual sample, and run the identical committed tablet case: 1 executed / 1 failed,Expected: False, But was: True, independently reported idiomTablet. The test fails before invoking the invalid enabled action. Restore the guard and rebuild: tablet 1/1 passed, phone 3/3 passed; post-push rebuilding repeated those green results.The phone is API 30 ARM64 with
sw411dp. Tablet validation uses the same task-owned emulator with an explicitly verified1600x2560, density240,sw1066dp/xlarge configuration; it does not substitute tablet coverage for the phone fixture. Only the focused guard case was selected for the tablet run; this is not a full tablet-suite result. No new mode-transition crash probes were performed for this follow-up.Previous review corrections and historical validation —
5a2582793e98f51ffc4173d6681f17e7168882e8Both earlier inline findings were valid. The original six passing executions at
38df0b65fdbcaf22ef3d593e8757b101d87e0b42remain historical results, not proof that its rotation oracle was sound. The first strict follow-up run rejected the close/rotation animation race. Waiting for the initial close to complete, before rotation, fixed the interaction without compensating afterward.At
5a258, rebuilding after push passed the original phone fixture (2/2), a separate external causal oracle control (1/1), and an external locked-Split tablet control (1/1), all without skips. The oracle control directly invoked the actual fixture helper: with the drawer open, the old text wait and even the covered unique detail ID both matched, but the revised oracle threw the expected assertion; after an explicit legitimate close, that same oracle passed. Those external controls remain historical evidence, not the current committed guard test. The current case above closes the persistent coverage gap.Known remaining native failure, not a green-count exclusion: an earlier extended tablet
Split → Popover → SplitOnPortraitprobe encounteredClassCastException: LinearLayoutCompat.LayoutParams cannot be cast to DrawerLayout.LayoutParamsinDrawerLayout.getDrawerViewAbsoluteGravity/ViewDragHelper.continueSettling. Exactly one corresponding mode-transition probe on the retained unchanged38dfAPK reproduced the same native failure, without invoking the invalid initial split-close action. That baseline APK is 41,783,300 bytes, SHA256263b3cdd53d4581bc585e61ac89606d5fe926ef0e6f35d88718c4bccc939568b. This demonstrates that failure predates the review correction. The parent investigation matched its signature/frames to historical #24779 and #18161; that is not an introducing-commit attribution. Raw logcat and failed TRXs are retained for separate triage. No broad tablet regression-freedom claim is made, and this PR does not fix that native failure.Original investigation and causal controls
Controls.TestCases.HostApp/Release/net11.0-android/com.microsoft.maui.uitests-Signed.apk, 58,597,971 bytes, SHA2567a56a6e3afa5ad948f34f3e3de371ea6ae2b11d1b50240e5b6a248734e960514. Three bounded native repetitions reproduced the modal timeout and responsive non-progress loop; these are native probes, not NUnit results. Removing only the covering-flyout trigger allowed modal push/pop to complete.38df. Its oracle weakness is corrected above; these are not counted as current-head validation.SplitOnLandscape. Failed prototypes and zero-test setup attempts are excluded from passing counts.Local validation uses .NET SDK 11.0.100 / CoreCLR 11.0.0. Original CI uses servicing SDK 11.0.101 / runtime 11.0.1 and an x86_64 Nexus 5X image; that runtime/architecture/profile gap remains explicit. No other-platform runtime validation is claimed. Private Appium server/client port 4727, UiAutomator port 8227 and explicit device UDID use external, uncommitted endpoint-isolation infrastructure only. Current guard-validation runs contain the actual three committed cases, with no external control cases. Product source bytes, including #39900, are unchanged.
Commands run, with results (
SESSION_FILESis the local evidence directory anddotnetresolves to the SDK above):--blame-hangis an external diagnostic observer, not a committed timeout change. The full-solution formatter was previously stopped after an unresponsive workspace load; scoped formatting above passed. Full CI is separate from these local results and remains coordinated by the parent investigation; this session submits no CI comments or manual runs. Open and recently merged PRs were searched for this fixture and mechanism; #39900 is preserved, and no existing Issue7556 repair was found.Issues Fixed
N/A for a new product-issue closure. Relates to #40116 and #39900; repairs the existing #7556 UI regression fixture.