Skip to content

[Catalyst] Exercise actual native context-menu dismissal in the device test - #41204

Merged
kubaflo merged 1 commit into
mainfrom
fix/catalyst-test-native-menu-dismissal
Dec 3, 2026
Merged

kubaflo merged 1 commit into
mainfrom
fix/catalyst-test-native-menu-dismissal

Conversation

@kubaflo

@kubaflo kubaflo commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 862572d9c39cda9f088ecd244e13224895d3e536

Dimension Assessment Rationale
Change confidence 7/10 ↑ Test-only and sends input to its own process
↓ Native event delivery can depend on the CI desktop
Diagnosis confidence 9/10 ↑ A native process sample showed AppKit still tracking after DismissMenu
Evidence fit 9/10 ↑ The same local test twice dismissed the actual menu and observed cleanup
↓ CI runs macOS 27

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

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

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.

Description of Change

Drive the actual AppKit menu dismissal in ProgrammaticNativeMenuReopensAfterNativeDismissal on Mac Catalyst. The test shipped in c950332974 (#40439) and assumes the UIKit UIContextMenuInteraction.DismissMenu() call dismisses a primary-action pull-down. On Catalyst it left the native menu tracking in AppKit, so UIKit never reported the dismissal that the test was waiting for. Send Escape to the current test process only; leave iOS and the product code unchanged. The test still opens and dismisses twice and checks that both the native menu host and the managed interaction are removed without calling Remove.

Validation: macOS 26.7.3, Mac Catalyst CoreCLR; the CI lane uses macOS 27.

selectors='Microsoft.Maui.DeviceTests.ButtonTests.ImageAndTextGroupHonorsAlignmentMapperCustomization,Microsoft.Maui.DeviceTests.ButtonTests.ImageAndTextGroupPreservesUnsetAlignmentAxis,Microsoft.Maui.DeviceTests.ButtonTests.ImageAndTextGroupRendersAtRequestedAlignment,Microsoft.Maui.DeviceTests.ContextFlyoutTests.ProgrammaticNativeMenuReopensAfterNativeDismissal'
  • pwsh -NoProfile -File .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform maccatalyst -IncludeMethods "$selectors" -Timeout 00:25:00 -OutputDirectory "$PWD/.local-temp/catalyst-baseline" — dismissal failed on unmodified main, as in CI.
  • pwsh -NoProfile -File .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform maccatalyst -IncludeMethods "$selectors" -Timeout 00:25:00 -OutputDirectory "$PWD/.local-temp/catalyst-fixed" — dismissal passed, including reopening and dismissing again. The combined run also included the independent Button fix.

Issues Fixed

Reported by .NET MAUI device-test build 1707231.

Let AI finish this PR

  • Let the MAUI agent address review feedback and fix remaining issues on this PR. Maintainers still decide whether it is merged. For PRs from forks, keep "Allow edits by maintainers" on so the agent can push to your branch; otherwise it opens a follow-up PR that keeps your commits.

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

kubaflo commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/autopilot-running MAUI Autopilot loop is running; remove this label to stop it label Dec 3, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the s/autopilot-reviewing MAUI Autopilot: MAUI expert review in progress label Dec 3, 2026

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Stamping as requested by @kubaflo; no code review performed.

@github-actions github-actions Bot added the s/autopilot-rate-limited MAUI Autopilot: waiting for the Copilot API rate limit to clear label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

MAUI Autopilot — Waiting for the Copilot API rate limit

@kubaflo The MAUI expert review hit the Copilot API rate limit (429). The loop tries again every 15 minutes, for up to 6 hours after it started. Run.

@kubaflo
kubaflo merged commit d1c6083 into main Dec 3, 2026
9 of 45 checks passed
@kubaflo
kubaflo deleted the fix/catalyst-test-native-menu-dismissal branch December 3, 2026 23:11
@kubaflo kubaflo removed s/autopilot-running MAUI Autopilot loop is running; remove this label to stop it s/autopilot-reviewing MAUI Autopilot: MAUI expert review in progress s/autopilot-rate-limited MAUI Autopilot: waiting for the Copilot API rate limit to clear labels Dec 4, 2026
kubaflo added a commit that referenced this pull request Dec 4, 2026
… resume (#41220)

<!-- copilot-assessment:v1 -->
### Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: `2277fc6429ef728d0c7a72021cac627685b9473b`

| Dimension | Assessment | Rationale |
|---|---|---|
| Change confidence | 9/10 | ↑ Only the runner of the two jobs that hold
the 15-minute waits changes; both keep `timeout-minutes: 25`.<br>↑ gh-aw
compiled both workflows; each lock changes only that runner and its
metadata hash.<br>↓ No live rate-limit wait has run on the new runner
yet. |
| Diagnosis confidence | 9.5/10 | ↑ All five rate-limited loops' wait
jobs ended `cancelled` 15:00–15:03 after starting, despite
`timeout-minutes: 25`.<br>↑ GitHub documents that ubuntu-slim jobs are
limited to 15 minutes of execution time. |
| Evidence fit | 9.5/10 | ↑ #41188, #41182 and #41183 are still open
with `s/autopilot-rate-limited`, and no Autopilot run has picked them up
since; #41204 and #41195 merged with the same stale labels. |
<!-- /copilot-assessment -->

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

### Description of Change

<!-- Enter description of the fix in this section -->

When the expert review or a fix round hits the Copilot API rate limit
(or a ghcr.io outage), the job labels the PR `s/autopilot-rate-limited`,
waits 15 minutes, and dispatches the next round. Both jobs that hold
that wait run on `ubuntu-slim`, which [ends every job at 15
minutes](https://github.blog/changelog/2026-01-22-1-vcpu-linux-runner-now-generally-available-in-github-actions/).
The wait starts after the job's own work, so the runner cancels it
before the dispatch, and the loop silently stalls.

On 2026-12-03 this stalled all five rate-limited loops. In expert runs
[47218604696](https://github.com/dotnet/maui/actions/runs/47218604696)
(#41188),
[47218665214](https://github.com/dotnet/maui/actions/runs/47218665214)
(#41182),
[47218667908](https://github.com/dotnet/maui/actions/runs/47218667908)
(#41183),
[47218477536](https://github.com/dotnet/maui/actions/runs/47218477536)
(#41204) and
[47218571510](https://github.com/dotnet/maui/actions/runs/47218571510)
(#41195), `autopilot_failed` ended `cancelled` 15:00–15:03 after it
started. All five PRs still carry `s/autopilot-running`.

This moves `autopilot_failed` (copilot-review-expert) and `next_round`
(maui-expert-autopilot), the only jobs with the 15-minute wait, to
`ubuntu-latest`. Their existing 25-minute timeouts already cover the
wait. Nothing else changes.

Validation: `gh aw compile maui-expert-autopilot copilot-review-expert
--no-check-update` (v0.86.2) passed with the existing warnings; each
lock diff is the runner line plus its metadata hash; `git diff --check`
passed. No live dispatch was run.

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

Observed on #41188, #41182, #41183, #41204 and #41195.

### Let AI finish this PR

- [ ] **Let the MAUI agent address review feedback and fix remaining
issues on this PR.** Maintainers still decide whether it is merged. For
PRs from forks, keep "Allow edits by maintainers" on so the agent can
push to your branch; otherwise it opens a follow-up PR that keeps your
commits.

<!--
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants