Skip to content

Conversation

@github-actions
Copy link
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

Weekly merge of main into net10.0.

This PR brings the latest changes from main branch into the net10.0 branch.

Checklist

  • Verify CI passes
  • Review any merge conflicts (if applicable)

PureWeen and others added 17 commits January 6, 2026 10:39
<!-- 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!

## Description

Adds a new GitHub Copilot CLI skill for querying Azure DevOps build
information for PRs.

### What it does

This skill allows Copilot CLI to:
- Get Azure DevOps build IDs associated with a GitHub PR
- Query build status, stages, and failed jobs
- Retrieve detailed UI test results from build logs

### Scripts included

- `Get-PrBuildIds.ps1` - Get build IDs for a PR
- `Get-BuildInfo.ps1` - Get detailed build status
- `Get-TestResults.ps1` - Get test results from build logs

### Security

- All Azure DevOps API calls are to public endpoints (dnceng-public org)
- No authentication tokens or secrets in the code
- GitHub CLI (gh) uses the user's existing authentication

### Example

> can you give me specifics about why iOS UITests Mono  is failing?

<img width="1160" height="706" alt="image"
src="https://github.com/user-attachments/assets/220d029b-4fd5-4d76-ab20-595db1a7b105"
/>
… guidance (#33196)

- [x] Update Circle sample to use Location/Distance objects instead of
string Center and numeric Radius
- [ ] Validation (doc-only change; no automated tests run)

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Take what you did for #32835 and
apply it to the Maps NuGet as well. You can add the README in the root
of the Maps project folder and link it from there. Make sure it gives a
good description on how to get started with the Maps APIs. You can also
find more information here:
https://learn.microsoft.com/dotnet/maui/user-interface/controls/map?view=net-maui-10.0
make sure to also link there from this README. The README should be part
of the NuGet package.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jfversluis <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
…33398)

Introduces a consolidated 5-phase PR agent workflow that provides
structured, end-to-end assistance for investigating issues, developing
fixes, and creating pull requests.

### PR Agent Workflow

The new `pr` agent replaces the separate `issue-resolver` and
`pr-reviewer` agents with a unified 5-phase workflow:

1. **Pre-Flight** - Context gathering and state file creation
2. **Tests** - Create or verify reproduction tests using the
`write-tests` skill
3. **Gate** - Verify tests catch the issue (mandatory checkpoint before
proceeding)
4. **Fix** - Explore and test fix approaches using the `try-fix` skill
5. **Report** - Present findings and create PR (with explicit user
confirmation)

### Agent Changes
- **Removed**: `issue-resolver.md`, `pr-reviewer.md`
- **Added**: `pr.md` - Main agent with phases 1-3 (Pre-Flight, Tests,
Gate)
- **Added**: `pr/post-gate.md` - Phases 4-5 (Fix, Report)

### New Skills
- `try-fix/` - Proposes ONE independent fix approach per invocation,
applies it, runs tests, records result with failure analysis, then
reverts. Learns from prior attempts. Max 5 attempts per session.
- `verify-tests-fail-without-fix/` - Auto-detects fix files from git
diff, verifies tests FAIL without fix and PASS with fix
- `write-tests/` - Creates UI test pages and NUnit tests following MAUI
conventions, with verification that tests reproduce the bug

### New Instructions
- `agents.instructions.md` - Copilot CLI agent authoring guidelines
(constraints, best practices, anti-patterns)
- `skills.instructions.md` - Skill development standards (structure,
naming, script organization)

### Script Updates
- Added `-Rebuild` parameter to `BuildAndRunHostApp.ps1` and
`Build-AndDeploy.ps1` for clean builds during test verification

### Documentation Updates
- Updated references from `issue-resolver`/`pr-reviewer` to `pr` agent
across README-AI.md, copilot-instructions.md, sandbox.instructions.md,
uitest-coding-agent.md
- Expanded `collectionview-handler-detection.instructions.md` with
platform-specific guidance (Items2/ is iOS/MacCatalyst only, Items/ is
the only Android/Windows implementation)

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Create a PR with all the changes from this PR on the PureWeen fork
PureWeen#9


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
<!-- 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!

## Description

This PR replaces UITests that can be adequately covered by unit tests,
reducing CI time while maintaining test coverage.

### Changes

1. **Issue28330: Stepper allows Minimum == Maximum**
- Added unit test `StepperAllowsMinimumEqualToMaximum` to
`StepperUnitTests.cs`
- The fix was in Core property validation (`Stepper.cs` lines 14-15,
24-25 - changed `>` to `>=` and `<` to `<=`)
- Unit test validates the same scenario without requiring platform
execution
   - Removed UITest and HostApp files

2. **Issue2674: Picker with null items**
- Existing unit test `NullItemReturnsEmptyStringFromInterface` in
`PickerTests.cs` already covers this scenario
- The fix was in Core (`Picker.cs` line 270 - null check in
`GetDisplayMember`)
   - Removed redundant UITest and HostApp files

### Validation

For Issue28330, the unit test was validated by reverting the fix:
- Changed `>=` to `>` in Stepper.cs Minimum validateValue
- Changed `<=` to `<` in Stepper.cs Maximum validateValue
- Confirmed the new unit test correctly failed
- Restored the fix, test passed

### Investigation Notes

A thorough analysis of 100+ UITests was conducted to identify conversion
candidates. Most UITests cannot be converted because they test:
- Platform-specific crashes (handler/renderer bugs)
- Visual rendering (VerifyScreenshot tests)
- UI interactions requiring Appium (App.Tap, App.EnterText)
- Handler-level fixes that require connected handlers

Only these two issues had fixes purely in Core logic that could be unit
tested.

## Issues Fixed
- Reduces UITest count by 2, improving CI efficiency
- Maintains equivalent test coverage through unit tests
### Description of Change

Update the release pipeline to use the correct image.
Add a new yml with correct name to replace on CI.
<!-- 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!

## Description

Adds automation for weekly branch merges from `main` into `net10.0` and
`net11.0` branches.

### Files Added

1. **`.github/scripts/MergeBranchAndCreatePR.ps1`** - PowerShell script
that:
   - Fetches latest from specified remote
- Creates a `merge/{source}-to-{target}` branch (never pushes directly
to target)
   - Merges source branch into the merge branch
   - Pushes and creates a PR with `p/0` label
   - Has dry-run mode and conflict detection
- **Fails with exit code 1** if a PR already exists (to make missed
merges visible in Actions)
   - Creates PR if branch exists but PR was closed/merged

2. **`.github/workflows/weekly-branch-merge.yml`** - GitHub Actions
workflow:
   - Scheduled: Every Monday at 9:00 AM UTC
   - Matrix targets: `net10.0` and `net11.0`
   - Manual trigger with customizable source/target/dry-run options

### Safety Features

- Never pushes directly to target branch - always uses merge branch + PR
- PRs labeled with `p/0` for priority review
- Fails visibly if previous week's merge was not completed
…" (#33397)

- [x] Revert `MergedStyle.cs` to original state (restore simple
`OnImplicitStyleChanged()` method)
- [x] Delete test file `Maui9648.xaml`
- [x] Delete test file `Maui9648.xaml.cs`
- [x] Delete benchmark file `ImplicitStylesBenchmark.cs`
- [x] Add passing tests from PR #33218 for issue #33203
- [x] Remove failing AppTheme tests

### Description of Change

Reverts the changes from #32711 which modified how implicit styles with
`ApplyToDerivedTypes=true` are applied.

The original behavior returns early with the first applicable implicit
style instead of merging multiple styles from the type hierarchy.

### Issues Fixed

Fixes #33203

### Test Results

**Maui33203 Tests (6/6 PASS):**
- `ImplicitStyleWithBasedOnKeyedStyleWorks` - All 3 inflators PASSED ✅
- `DerivedImplicitStyleOverridesBaseStyle` - All 3 inflators PASSED ✅

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Revert this PR #32711


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/maui/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Improves agent/skill documentation for automated PR reviews and UI test
authoring.

### Agent Workflow Documentation (Updated)

**`.github/agents/pr.md`**
- Clarify state file commit rule: state file should always be included
when committing changes

**`.github/instructions/uitests.instructions.md`**
- Add rule prohibiting inline `#if` platform directives in test methods
- Require platform-specific logic to be in extension methods for better
readability:

```csharp
// ❌ Hard to read
[Test]
public void MyTest()
{
#if ANDROID
    App.TapCoordinates(100, 200);
#else
    App.Tap("MyElement");
#endif
}

// ✅ Clean and readable
[Test]
public void MyTest()
{
    App.TapElementCrossPlatform("MyElement");
}
```

**`.github/skills/try-fix/SKILL.md`**
- Add "Model" column to Fix Candidates table format to track which AI
model generated each fix attempt

### Summary

These changes provide clearer guidelines for automated PR reviews and UI
test authoring.

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Can you create a PR with the changes from the ".github" folder on
#33406 and
#31487


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/maui/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
<!-- 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!

## Description

The `maui-pr-uitests` pipeline was not running for PRs targeting
`inflight/*` branches because they were not included in the trigger
configuration.

This was discovered in PR #33380 where `/azp run maui-pr-uitests`
returned:
> Azure Pipelines could not run because the pipeline triggers exclude
this branch/path.

## Changes

Added `inflight/*` to both `trigger:` and `pr:` branch includes in
`eng/pipelines/ci-uitests.yml`, matching what `ci-device-tests.yml`
already has.

## Related

- Unblocks: #33380
- Clarify that 'Description of Change' and 'Issues Fixed' are the base template sections, other fields are recommended enhancements
- Change 'One-line summary' to 'Brief summary' for flexibility
- Add compatibility field noting GitHub CLI requirement
- Remove duplicate template from post-gate.md, reference skill output instead
Adds the issue-triage skill from PureWeen#9
to help triage open GitHub issues that need milestones, labels, or
investigation.

## Changes

- **`.github/skills/issue-triage/SKILL.md`** - Skill definition with
workflow, trigger phrases, and milestone suggestion logic
- **`scripts/init-triage-session.ps1`** - Initializes session with
current milestones and labels from dotnet/maui
- **`scripts/query-issues.ps1`** - Queries open issues with
platform/area/age filters, fetches linked PRs, suggests milestones
dynamically
- **`scripts/record-triage.ps1`** - Tracks triaged issues in session
file
- **`.github/copilot-instructions.md`** - Added "Reusable Skills"
section documenting the new skill

## Dynamic Milestone Detection

Milestones are queried dynamically from dotnet/maui rather than being
hardcoded (since SR milestones change monthly):
- **SR milestones**: Identified by pattern `\.NET.*SR\d+`, sorted by due
date to determine current/next SR
- **Servicing milestone**: Identified by pattern `\.NET.*Servicing`
- Suggestions use the dynamically discovered milestones based on issue
characteristics (regressions → current SR, PRs → Servicing, etc.)

## Usage

```bash
# Initialize triage session
pwsh .github/skills/issue-triage/scripts/init-triage-session.ps1

# Query Android issues needing triage
pwsh .github/skills/issue-triage/scripts/query-issues.ps1 -Platform android -Limit 20

# Record a triage decision
pwsh .github/skills/issue-triage/scripts/record-triage.ps1 -IssueNumber 33272 -Milestone "Backlog"
```

Trigger phrases: "find issues to triage", "triage Android issues", "what
issues need attention"

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Create a PR for an issue-triage skill that uses the skill from here
PureWeen#9. Just grab the issue-triage
skill from this PR please


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/maui/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
This pull request makes a minor change to the `GoToState` method in
`VisualStateManager.cs` by removing some debug output statements that
were previously added for troubleshooting. This helps clean up the code
and avoids unnecessary logging in production.
…nes (#33251)

## Summary

This PR fixes iOS integration tests on Apple Silicon Macs and improves
the CI test infrastructure for better debugging and reliability.

## Problem

iOS integration tests fail on Apple Silicon Macs because tests hardcode
`iossimulator-x64` but builds default to `iossimulator-arm64` on ARM64
hosts. XHarness then can't find the built app because it looks in the
wrong directory.

Additionally, test failures were not being reported to Azure DevOps
because:
1. `fail-on-issue.yml` was commented out in the staging yaml files
2. `fail-on-issue.yml` has a default condition of `succeeded()`, so it
wasn't running when tests failed
3. `PublishTestResults` task was silently succeeding when no .trx files
were found

## Changes Made

### Architecture Detection for Apple Silicon
- Added `TestEnvironment.IsArm64` property to detect ARM64 hosts
- Added `TestEnvironment.IOSSimulatorRuntimeIdentifier` to dynamically
select `iossimulator-arm64` or `iossimulator-x64`
- iOS builds now target the correct architecture automatically

### Individual iOS Test Lanes
Split `RunOniOS` tests into individual jobs for parallel execution and
faster debugging:

| Test | ARM64 Job | MacOSPool Job | Timeout |
|------|-----------|---------------|---------|
| `RunOniOS_MauiDebug` | `mac_runios_maui_debug_arm64` |
`mac_runios_maui_debug` | 45 min |
| `RunOniOS_MauiRelease` | `mac_runios_maui_release_arm64` |
`mac_runios_maui_release` | 45 min |
| `RunOniOS_MauiReleaseTrimFull` | `mac_runios_maui_trim_arm64` |
`mac_runios_maui_trim` | 45 min |
| `RunOniOS_BlazorDebug` | `mac_runios_blazor_debug_arm64` |
`mac_runios_blazor_debug` | 45 min |
| `RunOniOS_BlazorRelease` | `mac_runios_blazor_release_arm64` |
`mac_runios_blazor_release` | 45 min |
| `RunOniOS_MauiNativeAOT` | `mac_runios_nativeaot_arm64` |
`mac_runios_nativeaot` | 45 min |

### MacOSPool Lane Conditions
MacOSPool comparison tests only run under specific conditions:
- **Non-PR builds** on branches: `main`, `net*.0`, `release/*`, or
`inflight/*`
- **PR builds** where the target branch is: `net*.0`, `release/*`, or
`inflight/*`

### XHarness Improvements
- Added `deviceUdid` parameter to `XHarness.RunAppleForTimeout()` for
pre-booted simulator support
- XHarness now uses `--device` flag with simulator UDID for better
reliability

### CI Pipeline Fixes
- Uncommented `fail-on-issue.yml` in staging YAML files
- Added `condition: always()` to `fail-on-issue.yml` and
`PublishTestResults` tasks
- Added `failTaskOnMissingResultsFile: true` to `PublishTestResults`
- Fixed `testResultsFiles` pattern with `searchFolder` parameter
- Added `retryCountOnTaskFailure: 1` for automatic test retry
- MacOSPool uses `$(HostedMacImage)` variable for centralized image
management

### Retry Log Preservation
- Logs from each retry attempt are saved to separate folders
(`attempt-1/`, `attempt-2/`, etc.)
- Uses `SYSTEM_JOBATTEMPT` environment variable provided by Azure DevOps
- Preserves logs from both original run and retries for debugging

### Test Configuration
- Added `SKIP_XCODE_VERSION_CHECK` environment variable support
- Moved `[Category(Categories.RunOniOS)]` to class level in
`AppleTemplateTests`

### Local Development
- Updated `BaseBuildTest` to find packages in multiple locations
(artifacts, packages/Shipping, library-packs)
- Added `.dotnet` to `global.json` paths for local SDK discovery

### Documentation
- Added `.github/instructions/integration-tests.instructions.md` with
comprehensive testing guidelines
- Added `.github/instructions/arcade-pipelines.instructions.md` for
Arcade conventions

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Can you create a new PR that has all the changes from PR 33168 and
combines them with the changes from
#33210


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: PureWeen <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
# Conflicts:
#	src/TestUtils/src/Microsoft.Maui.IntegrationTests/BaseBuildTest.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p/0 Current heighest priority issues that we are targeting for a release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants