Skip to content

[Extensibility] Controls: Restore public AlertManager interfaces - #36633

Merged
kubaflo merged 15 commits into
net11.0from
kubaflo/public-gesture-alert-managers-net11
Jul 30, 2026
Merged

kubaflo merged 15 commits into
net11.0from
kubaflo/public-gesture-alert-managers-net11

Conversation

@kubaflo

@kubaflo kubaflo commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Note

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

Description of Change

Restores the public AlertManager extension points on net11.0.

PR #34228 introduced IAlertManager and IAlertManagerSubscription as public APIs for third-party platform backends, addressing #34104 under #34099. PR #35024 reverted that public surface for the servicing release, leaving the interfaces internal on net11.0.

This PR makes only these two existing interfaces public again:

  • Microsoft.Maui.Controls.Platform.IAlertManager
  • Microsoft.Maui.Controls.Platform.IAlertManagerSubscription

It also restores their PublicAPI.Unshipped.txt entries across all seven TFMs. Interface method signatures and runtime behavior are unchanged; documentation, EditorBrowsable, and obsolete-message metadata are aligned with the restored public contract.

Gesture APIs are intentionally no longer part of this PR. Their public factory contract and the incompatible-handler fix are owned by #36655, which builds on merged PR #33365.

Review follow-ups

Addressed the review findings on the public surface:

  • Argument types aligned with the supported public contract. Making IAlertManager/IAlertManagerSubscription public exposes AlertArguments, ActionSheetArguments and PromptArguments (in Microsoft.Maui.Controls.Internals) as part of the contract. These were already public but marked [EditorBrowsable(Never)] and documented "for internal use only", which was contradictory. Applied the smallest safe change: removed the [EditorBrowsable(Never)] attribute and replaced the misleading remarks with documentation stating the types are part of the stable public contract. Namespaces and signatures are unchanged, so there is no public API shape change (no PublicAPI.*.txt edits are required). All argument properties that external implementers consume are public and usable.
  • Corrected the obsolete lifecycle wording. RequestPageBusy/OnPageBusy (kept as obsolete DIMs because Page.IsBusy still routes through them) previously claimed they were "obsolete in .NET 10 and will be removed in .NET 11". Both interfaces were internal in .NET 10 and are being shipped (not removed) in .NET 11, so the doc comments and [Obsolete] messages now use version-agnostic "will be removed in a future release" wording.
  • ~-prefix request intentionally not applied. A review comment asked to prefix the obsolete RequestPageBusy/OnPageBusy PublicAPI.Unshipped.txt entries with ~. This was investigated and is incorrect: the ~ prefix marks nullable-oblivious entries, not obsolete ones. These entries are nullable-annotated (Page!), so adding ~ makes the Microsoft.CodeAnalysis.PublicApiAnalyzers validation fail with RS0016 ("is not part of the declared public API"). Verified empirically by running the analyzer in Validate mode both ways, and confirmed by existing precedent ([Obsolete] Microsoft.Maui.IBorder is listed without ~ in PublicAPI.Shipped.txt). The entries are therefore kept without ~.

Merge note

This PR is configured for a merge commit. Do not use the original first commit message as the merge description: it predates the alert-only split and contains a stale Fixes #33364 line. #33364 was owned and closed by merged PR #36655, and must not be attributed to this alert PR.

Issues

Validation

  • Controls.Core.csproj builds for net11.0 with 0 warnings and 0 errors, including PublicAPI analyzer validation (PublicApiType=Validate).
  • AlertManagerTests pass (29/29), including direct assertions that IAlertManager and IAlertManagerSubscription remain public and the AlertArgumentTypesArePartOfSupportedPublicContract theory that guards the argument types staying public and not EditorBrowsableState.Never.

Net11 base synchronization (92aaa2f7d77)

  • Merges current net11.0 without rebasing or rewriting history. The only conflicts were five PublicAPI.Unshipped.txt files; each now retains the base converter additions plus the alert and gesture contracts, matching the auto-merged Windows/Tizen ordering.
  • Post-merge validation remains green: focused AlertManagerTests pass 29/29 and Controls.Core builds for net11.0 with PublicAPI validation enabled, zero warnings, and zero errors.
  • Exact improved review 14817878 and fresh CI builds 1533204 / 1533205 / 1533206 are active. Main 1533204 hit an Azure Node/libuv UseDotNet crash before test execution; replacement 1533239 then hit the same cross-PR transient .buildtasks staging failure as [Extensibility] Essentials: Bridge DI implementations to static facades #36657, so main was rerun as 1533275. Auto-merge remains armed with the merge-commit method.

Final cross-target contract clarification (368320180c4)

  • Clarifies that obsolete busy members may be omitted only on target frameworks with default interface method support; netstandard2.0 implementers must provide an empty implementation. Runtime behavior and API signatures are unchanged.
  • Focused AlertManagerTests remain 29/29 and Controls.Core builds for net11.0 with PublicAPI validation enabled, zero warnings, and zero errors.
  • Exact improved review 14819533 and current-head CI builds 1533477 / 1533478 / 1533479 are active. Auto-merge remains armed with the merge-commit method.

The gesture and alert "platform manager" extension points were introduced
on net11.0 but shipped as internal, so consumers cannot use them to swap in
their own implementations.

- GestureManager (#33365, tracked by #33364) added IGesturePlatformManager,
  IGesturePlatformManagerFactory, and IGesturePlatformManagerProvider as
  internal, with a TODO to make them public in .NET 11.
- AlertManager (#34228) added IAlertManager and IAlertManagerSubscription as
  public, but that surface was reverted for servicing in #35024, leaving them
  internal on net11.0.

Flip all five interfaces to public (no signature changes), remove the
"make public in NET11" TODO, and add the corresponding PublicAPI.Unshipped.txt
entries for all seven TFMs. The AlertManager entries match those originally
added in #34228. Concrete GesturePlatformManager/AlertManager implementations
remain internal; consumers provide their own via DI, a handler-scoped
provider, or a custom IAlertManager.

Fixes #33364

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 81d4ef33-303c-42b0-9686-5917808c5361
Copilot AI review requested due to automatic review settings July 17, 2026 15:28
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 17, 2026 15:28 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the gesture and alert “platform manager” extension-point interfaces public on the net11.0 branch, enabling external consumers to replace MAUI’s default gesture/alert handling via DI or handler-scoped providers. It also records the new public surface in PublicAPI.Unshipped.txt across all supported TFMs.

Changes:

  • Changed five interfaces from internal to public (IAlertManager, IAlertManagerSubscription, and the three IGesturePlatformManager* interfaces).
  • Removed the “make public in NET11” TODO for the gesture provider interface.
  • Added corresponding entries to all 7 PublicAPI.Unshipped.txt files.

Reviewed changes

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

Show a summary per file
File Description
src/Controls/src/Core/Platform/GestureManager/IGesturePlatformManager.cs Makes the gesture platform manager interface public.
src/Controls/src/Core/Platform/GestureManager/IGesturePlatformManagerFactory.cs Makes the DI factory interface public.
src/Controls/src/Core/Platform/GestureManager/IGesturePlatformManagerProvider.cs Makes the handler-scoped provider interface public and removes the TODO.
src/Controls/src/Core/Platform/AlertManager/IAlertManager.cs Makes the alert manager interface public.
src/Controls/src/Core/Platform/AlertManager/IAlertManagerSubscription.cs Makes the alert subscription interface public.
src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt Adds the newly-public APIs to the net ref-surface list.
src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt Adds the newly-public APIs to the netstandard ref-surface list.
src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt Adds the newly-public APIs to the Android ref-surface list.
src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt Adds the newly-public APIs to the iOS ref-surface list.
src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt Adds the newly-public APIs to the MacCatalyst ref-surface list.
src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt Adds the newly-public APIs to the Windows ref-surface list.
src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt Adds the newly-public APIs to the Tizen ref-surface list.

@kubaflo

kubaflo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 18, 2026
@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jul 18, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 3 findings

See inline comments for details.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jul 18, 2026
Remove gesture API exposure from this PR so #36655 exclusively owns the #33365 follow-up and #35044 fix, while this PR restores only the alert interfaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 66f84348-6476-4097-8b7f-f240338e85c3
Copilot AI review requested due to automatic review settings July 18, 2026 20:17
@kubaflo

kubaflo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Current main 1531512 failure is infrastructure: Samples windows failed in Initialize job because Azure stopped hearing from agent NetCore-Public 186. No product build or test ran in that leg. One main leg is still active; a main-only replacement will be requested after completion.

@kubaflo

kubaflo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

kubaflo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Replacement main 1531831 currently has one transient Build macOS (Release) red: Android AAPT reported missing Material attributes while building Controls.Core. The same unchanged PR head passed this leg in prior main build 1531512, and exact-base main 1531499 is fully green. This is a rerun/cache candidate; remaining main jobs are still active.

@kubaflo

kubaflo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Replacement main 1531831 added one known unrelated Helix failure: MauiAppBuild_BridgeUsesApplicationDispatcher threw NotImplementedInReferenceAssemblyException in MainThread.netstandard.cs, exactly the recurring macOS Helix failure tracked by #35934. The AlertManager diff does not touch Core Hosting/MainThread. Together with the previously documented transient AAPT cache red, all current main failures are unrelated; remaining jobs are still active.

@kubaflo

kubaflo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Final current-head CI classification: main replacement 1531831 has only the transient Android AAPT cache/resource failure and known #35934 MauiAppBuild_BridgeUsesApplicationDispatcher failure. UI 1531515 has only unrelated/base failures: Material3 TopTabUnselectedTextVisibleWhenSwitchingTabs, API30 Shell ShellContentShouldUpdateWhenContentPropertyChanges, Windows CollectionView visual/layout flakes, and API30 CollectionView scroll timeout. These job names are also red in current net11.0 UI baseline 1531376, and none overlap AlertManager. The same head already executed 29/29 focused AlertManager tests and PublicAPI validation successfully. Further reruns do not add signal; CI is ready for the documented unrelated-red exception after human approval.

Resolve PublicAPI conflicts by retaining both the latest converter entries and the alert and gesture extension contracts across every TFM.

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

Copilot-Session: 66f84348-6476-4097-8b7f-f240338e85c3
@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the new net11.0 conflict in merge commit 92aaa2f7d77. The five conflicting PublicAPI lists retain the base branch converter additions plus the alert and gesture contracts, matching the auto-merged Windows/Tizen ordering. AlertManager tests pass 29/29 and Controls.Core builds with PublicAPI validation enabled.

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Fresh main CI 1533204 has an infrastructure-only failure before test execution: the Use .NET SDK 10.0.100 Node task asserted in libuv (new_time >= loop->time) and exited 57005; subsequent log-publish errors are fallout from the missing build output. This does not involve the AlertManager/PublicAPI changes. Rerunning maui-pr only while UI/device continue.

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Replacement main 1533239 hit a second unrelated infrastructure failure: macOS solution build could not find .buildtasks/Microsoft.Maui.Resizetizer.Before.targets. Essentials PR 1533241 failed concurrently in the same leg but on a different missing staged file (Microsoft.Maui.Core.targets), while current net11.0 baseline 1533193 passed Build macOS (Debug). This cross-PR, different-file pattern is a transient build-task staging race, not the AlertManager/PublicAPI merge. Rerunning maui-pr once more.

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Device CI 1533206 is fully classified unrelated. Across iOS CoreCLR/Mono, MacCatalyst, and Windows, the failed Helix work items are Controls-only and reproduce the established six InvokeJavaScriptMethodThatThrows* expectation mismatches (InvokeJavaScript vs InvokeJavaScriptAsync). Windows Core, Essentials, Graphics, and MauiBlazorWebView work items all passed in packaged and unpackaged modes. None overlap AlertManager/PublicAPI, so device is not being rerun.

@MauiBot

MauiBot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

AI Review Summary

@kubaflo — new AI review results are available based on this last commit: 92aaa2f.

Gate Passed Confidence Low Platform Android


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

Gate Result: ✅ PASSED

Platform: ANDROID · Base: net11.0 · Merge base: fd789ca3

Test Without Fix (expect FAIL) With Fix (expect PASS)
🧪 AlertManagerTests AlertManagerTests ✅ FAIL — 81s ✅ PASS — 56s
📱 PageTests PageTests ⚠️ ENV ERROR ⚠️ ENV ERROR
🔴 Without fix — 🧪 AlertManagerTests: FAIL ✅ · 81s

Error-relevant lines (filtered from the build log):

     at Microsoft.Maui.Controls.Core.UnitTests.AlertManagerTests.AlertArgumentTypesArePartOfSupportedPublicContract(Type argumentType) in /_/src/Controls/tests/Core.UnitTests/AlertManagerTests.cs:line 552
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at InvokeStub_AlertManagerTests.AlertArgumentTypesArePartOfSupportedPublicContract(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at Microsoft.Maui.Controls.Core.UnitTests.AlertManagerTests.AlertManagerInterfacesArePublic() in /_/src/Controls/tests/Core.UnitTests/AlertManagerTests.cs:line 566
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
🟢 With fix — 🧪 AlertManagerTests: PASS ✅ · 56s

(no coded error found; showing last 1200 chars)

ernals.ActionSheetArguments)) [< 1 ms]
  Passed AlertArgumentTypesArePartOfSupportedPublicContract(argumentType: typeof(Microsoft.Maui.Controls.Internals.PromptArguments)) [< 1 ms]
  Passed AlertArgumentTypesArePartOfSupportedPublicContract(argumentType: typeof(Microsoft.Maui.Controls.Internals.AlertArguments)) [< 1 ms]
  Passed ReplacingPageWithHandledPageCallsUnsubscribeBeforeSubscribe [10 ms]
  Passed SettingPageWithoutHandlerDoesNotSubscribe [1 ms]
  Passed DelegateFuncInterceptsDisplayAlert [2 ms]
  Passed DelegateFuncCancellationPropagatesToCaller [2 ms]
  Passed AlertManagerInterfacesArePublic [< 1 ms]
  Passed ExplicitSubscriptionWinsOverDelegateFuncs [2 ms]
  Passed DisplayAlert [2 ms]
  Passed DefaultAlertManagerUsedWhenNoDIRegistration [< 1 ms]
  Passed SettingPageWithHandlerSubscribes [3 ms]
  Passed BusyNotSentWhenNotVisible [< 1 ms]
  Passed DelegateFuncInterceptsDisplayActionSheet [1 ms]
[xUnit.net 00:00:01.72]   Finished:    Microsoft.Maui.Controls.Core.UnitTests
  Passed DelegateFuncAsynchronousFaultPropagatesToCaller [10 ms]
  Passed DelegateFuncReturningNullTaskFaultsTheCaller [1 ms]
Test Run Successful.
Total tests: 29
     Passed: 29
 Total time: 2.1898 Seconds
🔴 Without fix — 📱 PageTests: ⚠️ ENV ERROR · 1428s

(no coded error found; showing last 1200 chars)

tive code. This usually indicates
      07-30 07:19:24.754  7835  7835 E DOTNET  : a fatal error in the runtime or one of the native libraries
      07-30 07:19:24.754  7835  7835 E DOTNET  : used by your application.
info: Wrote ADB bugreport to /home/vsts/work/1/s/artifacts/log/adb-bugreport-com.microsoft.maui.controls.devicetests.zip
info: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmtroe5",
        "exitCode": 80,
        "exitCodeName": "APP_CRASH",
        "platform": "android",
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          },
          {
            "name": "adb-bugreport-com.microsoft.maui.controls.devicetests.zip",
            "type": "bugreport"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
info: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
info: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 80 (APP_CRASH)
  Tests completed with exit code: 80
🟢 With fix — 📱 PageTests: ⚠️ ENV ERROR · 684s

(no coded error found; showing last 1200 chars)

tive code. This usually indicates
      07-30 14:39:13.492  7617  7617 E DOTNET  : a fatal error in the runtime or one of the native libraries
      07-30 14:39:13.492  7617  7617 E DOTNET  : used by your application.
info: Wrote ADB bugreport to /home/vsts/work/1/s/artifacts/log/adb-bugreport-com.microsoft.maui.controls.devicetests.zip
info: <<XHARNESS_RESULT_START>>
      {
        "version": 1,
        "machineName": "runnervmtroe5",
        "exitCode": 80,
        "exitCodeName": "APP_CRASH",
        "platform": "android",
        "device": "emulator-5554",
        "deviceOsVersion": "API 30",
        "architecture": "x86_64",
        "files": [
          {
            "name": "adb-logcat-com.microsoft.maui.controls.devicetests-default.log",
            "type": "logcat"
          },
          {
            "name": "adb-bugreport-com.microsoft.maui.controls.devicetests.zip",
            "type": "bugreport"
          }
        ]
      }
      <<XHARNESS_RESULT_END>>
info: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
info: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 80 (APP_CRASH)
  Tests completed with exit code: 80

⚠️ Failure Details

  • ⚠️ PageTests without fix: App crashed during test run (XHarness exit 80 APP_CRASH)
  • ⚠️ PageTests with fix: App crashed during test run (XHarness exit 80 APP_CRASH)
📁 Fix files reverted (19 files)
  • src/Controls/src/Core/ActionSheetArguments.cs
  • src/Controls/src/Core/AlertArguments.cs
  • src/Controls/src/Core/Page/Page.cs
  • src/Controls/src/Core/Platform/AlertManager/AlertManager.Android.cs
  • src/Controls/src/Core/Platform/AlertManager/AlertManager.Standard.cs
  • src/Controls/src/Core/Platform/AlertManager/AlertManager.Windows.cs
  • src/Controls/src/Core/Platform/AlertManager/AlertManager.cs
  • src/Controls/src/Core/Platform/AlertManager/AlertManager.iOS.cs
  • src/Controls/src/Core/Platform/AlertManager/DelegateAlertSubscription.cs
  • src/Controls/src/Core/Platform/AlertManager/IAlertManager.cs
  • src/Controls/src/Core/Platform/AlertManager/IAlertManagerSubscription.cs
  • src/Controls/src/Core/PromptArguments.cs
  • src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
  • src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt

📱 UI Tests — Page

Detected UI test categories: Page

✅ Deep UI tests — 26 passed, 0 failed across 1 category on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Page 26/26 ✓ 1 diff PNG
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

🔗 Regression Cross-Reference

🔍 Regression Cross-Reference

⚠ Overlaps with prior bug-fix PRs — same files modified, but no exact line revert detected.

File Fix PR Fixed issue(s)
src/Controls/src/Core/Page/Page.cs #35916

🧪 Regression Tests to Verify

These tests were added by the overlapping fix PRs. Running them to verify no side-effect regressions:

Fix PR Type Test Filter
#35916 UITest Issue35756 Issue35756

🧪 Regression Test Results

❌ FAILED — 0 passed, 1 failed, 0 skipped

Fix PR Test Type Result
#35916 Issue35756 UITest ❌ FAILED

📋 Pre-Flight — Context & Validation

Issue: #34104 - Restore public AlertManager extension points (part of #34099)
PR: #36633 - [Extensibility] Controls: Restore public AlertManager interfaces
Platforms Affected: All Controls TFMs (net, Android, iOS, MacCatalyst, Windows, Tizen, netstandard); test platform requested: android
Files Changed: 19 implementation/API/docs files, 2 test files

Key Findings

  • The PR restores Microsoft.Maui.Controls.Platform.IAlertManager and IAlertManagerSubscription from internal to public and adds matching PublicAPI.Unshipped.txt entries for all Controls TFMs.
  • The current PR fix also updates public-contract documentation for AlertArguments, ActionSheetArguments, and PromptArguments, removes EditorBrowsable(Never) from those argument DTOs, and corrects obsolete page-busy wording.
  • Added focused unit tests assert the alert interfaces are public and the argument DTOs are public/discoverable. The supplied gate result says tests fail without the PR fix and pass with it.
  • Mandatory regression test for every alternative candidate: pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -TestFilter "Issue35756".

Code Review Summary

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

Key code review findings:

  • ℹ No code correctness findings were identified; the expert reviewer returned [].
  • ℹ CI status could not be authoritatively verified in this environment, so confidence remains low under code-review skill rules.
  • ℹ Public API impact is intentional: two platform alert interfaces become public again, and exposed argument DTOs become discoverable.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #36633 Make IAlertManager/IAlertManagerSubscription public, update all PublicAPI baselines, align argument DTO docs/discoverability, and add visibility/discoverability unit tests. ✅ PASSED (Gate) 21 files Original PR

🔬 Code Review — Deep Analysis

Code Review — PR #36633

Independent Assessment

What this changes: Restores IAlertManager and IAlertManagerSubscription to the public API surface, adds PublicAPI entries for all TFMs, aligns exposed AlertArguments/ActionSheetArguments/PromptArguments docs with public-contract status, and updates obsolete Page.IsBusy/page-busy wording.

Inferred motivation: Restore third-party alert/dialog extension points that were previously reverted from net11.0, while keeping runtime behavior unchanged.

Reconciliation with PR Narrative

Author claims: Public AlertManager interfaces are restored; argument DTO docs/EditorBrowsable and obsolete wording were fixed; ~ PublicAPI prefix was intentionally not applied; validation passed locally.

Agreement/disagreement: Matches the code. I found no runtime behavior change beyond accessibility/docs. The ~ prefix prior finding appears obsolete: current entries are nullable-annotated and existing shipped obsolete APIs are not sufficient evidence that ~ means obsolete.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
Argument types exposed through public interfaces were hidden/internal-use documented Copilot/MauiBot ✅ Fixed AlertArguments.cs:7-25, ActionSheetArguments.cs:9-27, PromptArguments.cs:7-25 now document public-contract status and no longer use EditorBrowsable(Never).
RequestPageBusy / OnPageBusy obsolete text said removed in .NET 11 MauiBot ✅ Fixed IAlertManager.cs:55-59, IAlertManagerSubscription.cs:46-51, AlertManager.cs:101-116, Page.cs:58-59 use future-release/no-replacement wording.
Obsolete PublicAPI entries need ~ prefix MauiBot 🔄 Obsolete PR narrative says analyzer validation fails with ~; current entries use nullable annotations. No code evidence supports this as an unresolved blocker.
Tests did not directly assert restored interfaces are public PureWeen ✅ Fixed AlertManagerTests.cs:557-568 asserts both interface types are public.

Blast Radius Assessment

  • Runs for all instances: No runtime code path changed; only public accessibility/docs/PublicAPI/test assertions.
  • Startup impact: No new startup work.
  • Static/shared state: No new static/shared runtime state.
  • Public API impact: Yes — two interfaces are restored as public and argument DTO discoverability is changed.

External Output Contract

Consumer token/pattern Producer location Producer emission condition Consumer assumption Ordinary negative case Downstream effect
N/A N/A No changed regex/string classifier for external tool output found N/A N/A N/A

CI Status

  • Required-check result: Undetermined. gh pr checks --required failed because gh is unauthenticated.
  • Classification: Undetermined; public GitHub check-run data was mixed/pending at review time.
  • Action taken: Confidence capped low; no LGTM per skill rules.

Findings

No ❌ Error, ⚠️ Warning, or 💡 Suggestion code findings. The maui-expert-reviewer returned [].

Failure-Mode Probing

  • Custom IAlertManager registered in DI: Window.TryResolveAlertManager() resolves it and calls Subscribe(); unchanged behavior.
  • Interface re-hidden in a future PR: new AlertManagerInterfacesArePublic test fails even with InternalsVisibleTo.
  • Page-busy obsolete members: retained with default interface bodies where supported, so existing Page.IsBusy forwarding still compiles.
  • Argument DTO usability: constructors/properties remain public and no longer hidden from IntelliSense.

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: I found no current code blocker in the PR’s public API restoration. However, required CI could not be authoritatively verified from this environment, so the skill rules prohibit LGTM.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix-1 Minimal public surface: make IAlertManager / IAlertManagerSubscription public, remove EditorBrowsable(Never) from exposed argument DTOs, add PublicAPI entries. ✅ PASS tests, not selected 12 files Passed AlertManagerTests and Android Issue35756, but left previously identified public-contract documentation/obsolete-message concerns unresolved.
2 try-fix-2 Public-contract-only documentation: candidate 1 plus fixes to interface obsolete wording and argument DTO XML docs, while avoiding implementation/platform/Page/doc-polish edits. ✅ PASS 12 files Passed all required tests and addresses candidate 1's quality gap with a smaller surface than the PR.
PR PR #36633 Make alert interfaces public; add PublicAPI entries; update argument DTO docs/discoverability; update obsolete wording across interfaces, Page, implementation/platform files, and delegate docs; add tests. ✅ PASSED (Gate) 21 files Original PR; broader documentation normalization.

Candidate Details

try-fix-1 — Minimal Public Surface

  • Approach: Restored the two interfaces and API baselines, removed EditorBrowsable(Never) from the exposed argument DTOs, and avoided documentation/obsolete-message cleanup.
  • Primary test: dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter "FullyQualifiedName~AlertManagerTests" --no-restore — ✅ 29/29 passed.
  • Regression test: pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -TestFilter "Issue35756" — ✅ passed on Android emulator.
  • Failure/learning: Test-pass was not enough: expert-review context required fixing misleading public API documentation. This candidate left DTO docs implying internal-only use and left interface page-busy obsolete text claiming removal in .NET 11, so it was not demonstrably better than the PR.
  • Diff/artifacts: CustomAgentLogsTmp/PRState/36633/PRAgent/try-fix/attempt-1/ and CustomAgentLogsTmp/PRState/36633/PRAgent/try-fix-1/content.md.

try-fix-2 — Public-Contract-Only Documentation

  • Approach: Restored public interfaces, removed EditorBrowsable(Never) from the argument DTOs, added PublicAPI entries, and updated only the XML docs/obsolete messages directly visible through the public alert contract (IAlertManager, IAlertManagerSubscription, AlertArguments, ActionSheetArguments, PromptArguments). It intentionally did not touch Page.cs, AlertManager.cs, platform AlertManager.*.cs, DelegateAlertSubscription.cs, or tests.
  • Primary test: dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter "FullyQualifiedName~AlertManagerTests" --no-restore — ✅ 29/29 passed.
  • Regression test: pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -TestFilter "Issue35756" — ✅ 1/1 passed on Android emulator.
  • Self-review: reviewer-findings.json = [].
  • Diff/artifacts: CustomAgentLogsTmp/PRState/36633/PRAgent/try-fix/attempt-2/ and CustomAgentLogsTmp/PRState/36633/PRAgent/try-fix-2/content.md.

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 1 Yes Candidate 1 tested the smallest public-surface hypothesis; it passed tests but failed selection due documentation quality gaps.
claude-opus-4.7 1 Yes Candidate 2 incorporated candidate 1's lesson and limited documentation fixes to the public contract.
gpt-5.3-codex N/A Not queried Stopped per user criterion after candidate 2 passed all tests and was demonstrably narrower than the PR while preserving public-contract quality.
gpt-5.5 N/A Not queried Stopped per user criterion after candidate 2 passed all tests and was demonstrably narrower than the PR while preserving public-contract quality.

Exhausted: No — stopped because candidate 2 passed all tests and is a viable, narrower alternative.
Selected Fix: Candidate #2 — It keeps the externally visible API restoration and necessary public-contract documentation corrections, passes the focused unit tests and mandatory Android Issue35756 regression, and avoids the PR's extra implementation/platform/Page documentation edits. The PR remains broader and more globally consistent; candidate #2 is preferable if the goal is the smallest correct fix for the alert extensibility regression.


🏁 Report — Final Recommendation

Comparative Report — PR #36633

Candidates compared

Candidate Result Strengths Weaknesses
pr ✅ Gate passed Restores the two public AlertManager interfaces, restores all PublicAPI baselines, makes exposed argument DTOs discoverable, updates public-contract docs, and adds focused regression/unit coverage. Expert reviewer found two moderate public API documentation issues: the obsolete busy methods are optional only on TFMs with default interface methods, but are required under netstandard2.0.
pr-plus-reviewer ✅ Targeted unit tests passed; gate inherited from PR Keeps the PR's complete restoration and tests, and fixes the expert-review documentation issue by explicitly documenting the default-interface-method / netstandard2.0 implementation split. Slightly longer obsolete messages, but the extra wording is justified by public cross-target behavior.
try-fix-1 ✅ Passed primary and Android regression tests Smallest functional public-surface restoration. Leaves the public argument DTO documentation under-specified/misleading and leaves stale obsolete wording; also has the same cross-target busy-member ambiguity once the interfaces become public.
try-fix-2 ✅ Passed primary and Android regression tests Narrower than the PR while fixing candidate 1's most important public-contract documentation gaps. Still has the same default-interface-method / netstandard2.0 ambiguity in the public busy-member docs; omits the PR's broader tests/docs normalization outside the strict public contract.

No candidate in STEP 5a failed the required regression tests. If any candidate had failed regression tests, it would be ranked below the passing candidates by rule.

Ranking

  1. pr-plus-reviewer — best overall. It preserves the PR's complete tested fix and resolves the only expert-review findings.
  2. pr — functionally correct and tested, but should not beat pr-plus-reviewer because the expert-review findings remain unaddressed.
  3. try-fix-2 — viable narrower alternative, but lower than the PR-based reviewer candidate because it still carries the same busy-member documentation ambiguity and omits the PR's focused test additions from the candidate diff.
  4. try-fix-1 — passes tests, but leaves more public-contract documentation debt than every other passing candidate.

Winning candidate

Winner: pr-plus-reviewer

pr-plus-reviewer is the single winning candidate because it keeps the raw PR's proven API restoration and test coverage, then applies the expert review's only actionable feedback. The change is documentation/obsolete-message-only on the newly public interfaces and does not alter runtime behavior or public member shape.


🧭 Next Steps — review latest findings

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

Document that obsolete busy members may be omitted only on TFMs with default interface methods and require an empty implementation on netstandard2.0.

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

Copilot-Session: 66f84348-6476-4097-8b7f-f240338e85c3
@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Applied the final public-contract review follow-up in 368320180c4. The obsolete busy members are optional only on TFMs with default interface methods; netstandard2.0 implementers must provide an empty implementation. XML and obsolete-message guidance now state that distinction explicitly. AlertManager tests remain 29/29 and Controls.Core PublicAPI validation builds with zero warnings/errors.

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

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

Labels

area-gestures Gesture types p/0 Current heighest priority issues that we are targeting for a release. s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants