Skip to content

[Windows]Fix application title foreground not updating on theme changes - #40369

Merged
kubaflo merged 2 commits into
dotnet:candidate/11.0.1xx-sr3from
Shalini-Ashokan:fix-40066
Nov 24, 2026
Merged

kubaflo merged 2 commits into
dotnet:candidate/11.0.1xx-sr3from
Shalini-Ashokan:fix-40066

Conversation

@Shalini-Ashokan

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!

Issue Details

On Windows, switching the app to dark mode leaves the application title black, making it invisible against the dark title bar.

Root Cause

The title foreground was assigned during activation events but did not refresh when the app theme changed.

Description of Change

Use theme-aware foreground brushes through active/inactive visual states. Handle theme changes and bind the title foreground to the title-bar container’s foreground.

Validated the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #40066

Output ScreenShot

Before After
40066-BeforeFix.mov
40066-AfterFix.mov

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

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Nov 18, 2026
@azure-pipelines

This comment has been minimized.

@vishnumenon2684 vishnumenon2684 added the community ✨ Community Contribution label Nov 18, 2026
@vishnumenon2684

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/agent-review-in-progress AI review is currently running for this PR label Nov 18, 2026

@github-actions github-actions Bot 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.

Expert Review — 1 finding

Reviewed commit 00f6cbd.

See inline comments for details.

@MauiBot

This comment has been minimized.

@MauiBot MauiBot added s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) and removed s/agent-review-in-progress AI review is currently running for this PR labels Nov 18, 2026
@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@Shalini-Ashokan — test-failure analysis for commit 00f6cbd.

Scope CI failures Commit 00f6cbd


🧪 CI Analysis — click to expand
📊 maui-pr

No failures found.


🧪 maui-pr-devicetests

🧪 maui-pr-uitests

Windows-only changes do not execute here. Supported matches recur on main; other comparisons lack runtime/handler equivalence.

Mac publication failure reflects failed tests, not compilation.


🧭 Follow-up — actions and refresh

Next action: Inspect Android BadExit diagnostics; compare unresolved iOS cases using identical runtime/handler setups.

Maintainers: comment /review tests to refresh this report.

kubaflo added a commit that referenced this pull request Nov 20, 2026
… commit (#40483)

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

### Target Branch

- [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).

CI workflow infrastructure, so it targets `main`.

### Description of Change

Follow-up to #40468, found while testing `/review run-tests` on open PRs
after it merged.

`maui-pr-uitests` builds GitHub's test-merge commit
(`refs/pull/N/merge`). GitHub does not refresh it when `main` moves; it
waits for activity on the PR. Right after #40468 merged, every open PR's
merge ref still merged an older `main` (21 merged #40305's `main`, 20
merged an even older one). Some had been stale for hours. The pipeline
in those commits does not declare the new `uitest_*` parameters, so the
dispatcher stopped straight away with "merges an older main".

Changes:

- **Wait instead of failing.** `Get-VerifiedPullRequest` now treats a
merge ref whose pipeline cannot take the selection as "not ready yet".
It keeps polling for up to 10 minutes, which covers a refresh GitHub is
already computing. A missing merge of a new head still gives up after
about 3 minutes, as before. The dispatcher job timeout goes from 15 to
25 minutes to fit.
- **Check every parameter that will be sent.**
`Test-RunTestsPipelineSupportsSelection` also requires each
`uitest_<Category>` / `uitestPlatform*` name in the queue request.
Otherwise a category added to `main` later would reach Azure as an
"Unexpected parameter" 400 on PRs whose merge ref predates it.
- If GitHub still hasn't refreshed after 10 minutes, the comment says so
and suggests commenting again later or updating the branch.

### Validation

- `RunTests.Tests.ps1` and `CopilotPipeline.Tests.ps1`: 66 passed. A new
test covers parameters that are missing from the built pipeline,
including regex metacharacters.
- Real `/review run-tests` comments after #40468 merged, using the
current `main` dispatcher (without this PR):

  | PR | Merge ref merges | Selection | Result |
  | --- | --- | --- | --- |
| #40437 | new `main` (head pushed after the merge) | 9 categories, all
platforms | **Queued targeted build 1692555** as the trigger identity
(no 403). Azure shows `selectedRun=true`, the four platform booleans and
only the 9 `uitest_*` values; only the CollectionView, CV1 and
per-platform stages started |
| #40418 | new `main` | full suite (both models) | Full build 1692548 |
| #40369, #40344, #40288 | #40305's `main` | 5 / 4 / 2 categories |
Stopped: stale merge ref |
| #40420 | older `main` | 4 categories, Android | Stopped: stale merge
ref |

A `/review run-tests` comment, an API read and a no-op base edit did not
refresh a stale merge ref within 10+ minutes; a push to the PR head
refreshes it at once. Until GitHub refreshes the older PRs, they need an
update or push. This PR waits for any refresh GitHub is already
computing, explains the situation in the comment, and keeps a later
category addition from becoming an Azure 400.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
@kubaflo

kubaflo commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

/review run-tests

@github-actions

Copy link
Copy Markdown
Contributor

Selected UI Tests

@kubaflo — AI-selected UI tests (GPT-6.1 Sol + Claude Opus 5.5) for commit 00f6cbdf.

Result NOT QUEUED Platforms Windows Categories 1 of 77 Commit 00f6cbdf


🧪 Test selection — click to expand

❌ Could not queue maui-pr-uitests: GitHub's test-merge commit for this PR (5872f64) still merges an older main whose maui-pr-uitests pipeline cannot run this selection, and GitHub did not refresh it within 10 minutes. Comment /review run-tests again later, or update the branch / push to the PR to make GitHub refresh it now.

GPT-6.1 Sol: Windows-only title-bar theme and activation fix; runs Window UI tests on Windows.
Claude Opus 5.5: Windows-only fix for the window title bar foreground on theme changes; runs Window UI tests on Windows.

🧪 Running — 1 category on Windows

Platform Categories
Windows Window
⏭️ Skipped — 76 categories, 3 platforms

Platforms not run: Android, iOS, MacCatalyst

Categories not run: Accessibility, ActionSheet, ActivityIndicator, Animation, AppLinks, Border, BoxView, Brush, Button, CarouselView, CollectionView1, CollectionView2, CollectionView3, CollectionView4, CollectionView5, CollectionView6, CollectionView7, Cells, CheckBox, ContextActions, CustomRenderers, DatePicker, Dispatcher, DisplayAlert, DisplayPrompt, DragAndDrop, Entry, Editor, Effects, Essentials, FlyoutPage, Focus, Fonts, Frame, Gestures, GraphicsView, Image, ImageButton, IndicatorView, InputTransparent, IsEnabled, IsVisible, Label, Layout, Lifecycle, ManualReview, Maps, Navigation, Page, Performance, Picker, ProgressBar, RadioButton, RefreshView, SafeAreaEdges, Shadow, ScrollView, SearchBar, Shape, Slider, SoftInput, Stepper, Switch, SwipeView, Shell1, Shell2, TabbedPage, TableView, TimePicker, TitleView, ToolbarItem, Triggers, ViewBaseTests, VisualStateManager, WebView, Material3

Each skipped platform and category is listed as a Skipped maui-pr-uitests (skipped) … check on this commit. Use /azp run maui-pr-uitests for the full suite.

🤖 Why these tests — AI rationale (GPT-6.1 Sol + Claude Opus 5.5)

Each model chose independently; every test that runs was selected by at least one of them.

Platform GPT-6.1 Sol Claude Opus 5.5
Android — —
iOS — —
MacCatalyst — —
Windows Window Window

GPT-6.1 Sol — Windows-only title-bar theme and activation fix; runs Window UI tests on Windows.

  • NavigationRootManager and WindowRootView change only Windows title foreground.
  • WindowRootViewStyle adds title-bar activation brushes, not general styling or layout.
  • Added coverage is device-only; no UI hints. Other platforms and unrelated controls are excluded.

Claude Opus 5.5 — Windows-only fix for the window title bar foreground on theme changes; runs Window UI tests on Windows.

  • src/Core/src/Platform/Windows/NavigationRootManager.cs, WindowRootView.cs, Styles/WindowRootViewStyle.xaml: Windows-only changes to the title bar foreground (activation visual states and a theme-change handler). These map to the Window category, which covers TitleBar and window chrome.
  • WindowHandlerTests.Windows.cs is a device test, not a UI test, so it adds no categories.
  • Android, iOS and MacCatalyst are left out because no shared code changed.
  • Other Windows categories are left out because the change only touches the app title bar container foreground, not page content or layout.

Generated by /review run-tests. A targeted run is a fast signal, not full-suite certification.

kubaflo added a commit that referenced this pull request Nov 20, 2026
…ures (#40485)

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

### Target Branch

- [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).

CI workflow infrastructure, so it targets `main`.

### Description of Change

Follow-up to #40468 and #40483, found while testing `/review run-tests`
on more PRs.

I updated #39935's branch so its test-merge commit has the new pipeline,
then commented `/review run-tests`. Both models selected 8 categories on
iOS and MacCatalyst. Both attempts (19:45 and 19:57 UTC) ended with:

> Could not queue maui-pr-uitests: The Azure DevOps request failed; see
the workflow log.

The log only shows `400 (Bad Request)`, and no build was created.
- The same request validates fine in Azure's pipeline preview.
- At the same moment, `review-trigger.yml` runs that use the same
trigger identity failed to get a token: `AADSTS53003: Access has been
blocked by Conditional Access policies. The access policy does not allow
token issuance.`
- So the 400 came from Microsoft Entra's token endpoint, not from Azure
DevOps.
- Entra's error body has `error_description`, not `message`, so
`Get-RunTestsAzdoErrorText` returned nothing.

Changes:

- **Report Entra's reason.** `Get-RunTestsAzdoErrorText` also reads
`error_description` and drops the trace and correlation ids.
- **Retry the sign-in.** `Get-RunTestsAzdoToken` retries the token
exchange up to 4 times, waiting 15, 30 and 45 seconds between attempts.
If it still fails, it throws an error with id
`RunTestsEntraSignInFailed`.
- **Say what failed.** `Invoke-RunTests.ps1` turns that error into
"Could not sign in to Azure DevOps: Microsoft Entra refused the token
(AADSTS…). Nothing was queued; comment `/review run-tests` again later."
The comment no longer suggests that Azure DevOps rejected the selection.

The Conditional Access block itself is a dnceng tenant policy on the
shared `AZDO_TRIGGER_CLIENT_ID` identity. It also affects `/review`
through `review-trigger.yml`. It can't be fixed in this repo.

### Validation

- `RunTests.Tests.ps1` and `CopilotPipeline.Tests.ps1`: 69 passed. New
tests cover:
  - the Entra error text;
- four sign-in attempts followed by the sign-in error id, with mocked
HTTP calls;
  - the dispatcher's message for a failed sign-in.
- Other real `/review run-tests` results today on `main`:
  - #40437 queued targeted build 1692555 with 9 categories;
- #40478 (`net11`) got the "can't run on PRs that target `net11` yet"
comment;
- #40369 and #40344, whose test-merge commits are stale, waited 10
minutes and then explained why.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
@kubaflo

kubaflo commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

/review expert-review-with-gate

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Warning

Your /review gate couldn't start due to a transient error triggering the pipeline. The command was left unacknowledged so scheduled recovery can retry it automatically; you can also comment /review gate again in a minute.

@github-actions github-actions Bot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 23, 2026

@github-actions github-actions Bot 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.

Expert Review — 3 findings

Reviewed commit 00f6cbd.

See inline comments for details.

@Shalini-Ashokan
Shalini-Ashokan changed the base branch from main to net11 November 24, 2026 04:43
@kubaflo

kubaflo commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

/review expert-review

@sheiksyedm
sheiksyedm marked this pull request as ready for review November 24, 2026 13:48
@kubaflo

kubaflo commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

/review expert-review

@kubaflo
kubaflo deleted the branch dotnet:net11 November 24, 2026 14:43
@kubaflo kubaflo closed this Nov 24, 2026
@kubaflo kubaflo reopened this Nov 24, 2026
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:49 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:49 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:51 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:52 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:54 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 24, 2026 14:55 — with GitHub Actions Inactive
@kubaflo
kubaflo changed the base branch from net11 to candidate/11.0.1xx-sr3 November 24, 2026 19:52
@kubaflo
kubaflo merged commit c19b53c into dotnet:candidate/11.0.1xx-sr3 Nov 24, 2026
189 of 212 checks passed
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…dotnet#40305)

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

### Target Branch

- [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).

CI and workflow infrastructure, so it targets `main`. The slash command
activates only once the workflow is on the default branch.

### Description of Change

Adds `/review run-tests`. Two AI models, **GPT-6.1 Sol** and **Claude
Opus 5.5**, each read the PR diff independently and pick the UI test
categories and platforms it can affect. `maui-pr-uitests` then runs
**only the union of their picks**. A CollectionView-only Android fix
runs the CollectionView shards on Android, not all 77 categories on 4
platforms.

Replaces dotnet#40253.

**When what runs**

| Trigger | What runs |
| --- | --- |
| `/review run-tests` on any PR (write access) | Only what the models
selected: the per-platform union of both picks |
| Both models choose the full suite (e.g. core `Element` changes) | Full
suite |
| Neither model produces a pick | Nothing is queued; the comment says so
|
| `/azp run maui-pr-uitests` | Full suite, unchanged |
| Branch, scheduled and manual builds (`main`, `release/*`,
`candidate/*`, …) | Full suite, unchanged. `ci-uitests.yml` only passes
a selection when `Build.SourceBranch` is `refs/pull/*`. |

Nothing is ever added that a model did not choose: no full-suite
fallback, unknown category names run nothing, Android and the Material3
lane run only when selected (also enforced in the pipeline template),
and only the five declared proposal fields are read.

**What the requester sees**

1. **Native checks in the PR's checks list.** `maui-pr-uitests` is
queued through the Build API as a *pull-request* build
(`reason=pullRequest` + `triggerInfo.pr.sourceSha`), so Azure Pipelines
reports the run and every job as checks on the PR head, exactly like
`/azp run`.
2. **Skipped checks for everything not selected.** One `maui-pr-uitests
(skipped) <Category>` check per category and one `maui-pr-uitests
(skipped) <Platform> UITests` check per platform, plus a
`maui-pr-uitests (test selection)` summary check.
3. **A summary comment in the PR Test Gate layout:** title, requester
line and Result / Platforms / Categories / Commit badges, with
everything else in one collapsed **Test selection** section: build
status, each model's summary, what ran, results with failed tests, the
skipped list, and **Why these tests** with a per-platform table of each
model's pick and both rationales. `review-run-tests-results.yml` updates
it in place when the `maui-pr-uitests` check completes, with a
half-hourly sweep as backup.

**How it works**

| Piece | Role |
| --- | --- |
| `copilot-review-run-tests.md` (gh-aw, GPT-6.1 Sol) | Pre-activation
authorizes an exact `/review run-tests` from a write+ user and collects
the diff, the category inventory from
`eng/pipelines/common/ui-tests.yml`, which categories have enabled tests
per platform, and which the PR's own tests enable. The read-only agent
(`checkout: false`) proposes platforms, categories, `full_run`, a
summary and a rationale. The safe-output job saves the proposal and
starts the Opus workflow. |
| `copilot-review-run-tests-opus.md` (gh-aw, Claude Opus 5.5, new) |
`workflow_dispatch` only. Verifies the source run (run-tests lock
workflow, default branch, same repo, under 3 hours old), reuses its
context artifact, and makes an independent proposal with the same shared
prompt (`shared/run-tests-selection.md`). Then it starts the dispatcher
with both run ids. If either agent fails, the chain still hands over. |
| `review-run-tests-dispatch.yml` | `workflow_dispatch` on `main`, with
**no environment**, so its OIDC subject is
`repo:dotnet/maui:ref:refs/heads/main` like `review-trigger.yml`.
Verifies both runs, downloads each proposal (a listed artifact that
fails to download fails the job), checks each proposal's model and
source run, and runs `Invoke-RunTests.ps1`. |
| `Invoke-RunTests.ps1` | Trusted. Validates each proposal against the
inventory, prunes each platform to categories with enabled tests there,
and merges the two per platform. When every selected platform runs the
same categories they are sent as plain names; otherwise every entry is
platform-qualified (`android:Button`, `ios:Label`), never a mix.
Re-checks the requester's permission, the PR head and its target branch,
waits for a verified test-merge commit, queues the pull-request build
and cancels it if Azure didn't apply the selection. Then publishes the
Skipped and selection checks and the comment. |
| `review-run-tests-results.yml` | Updates the comment when the
`azure-pipelines` `maui-pr-uitests` check completes; sweeps every 30
minutes as backup. |
| `eng/pipelines/**/ui-tests*.yml`, `ci-uitests.yml` | Optional
`selectedRun`, `selectedPlatforms`, `selectedCategories` parameters
filter stages and matrix entries at compile time. `CollectionView` and
`Shell` expand to their shards; `<platform>:<Category>` limits a
category to one platform, and every stage guard, including the dedicated
Shell renderer, SafeAreaEdges, Material3 and Windows CV1 lanes, handles
both the plain and the qualified form. The sample build gets
template-evaluated booleans, never parameter text. Defaults expand to
exactly `main`'s jobs. |
| `review-trigger.yml`, `ReviewCommandHelpers.ps1`, rebalance skill |
`/review run-tests` is excluded from `/review` and from recovery.
`rebalance-ui-test-categories` understands the typed
`categoryGroupsToTest` parameter. |

`/azp run`, `/review`, `/review gate` and `/review tests` are unchanged.
Device tests are out of scope.

**Model policy exception:** the repo's GPT-only automation policy
(`CopilotPipeline.Tests.ps1`, from dotnet#38040) gets one narrow exception:
exactly `claude-opus-5.5`, only in the run-tests selection files (the
Opus workflow and its lock file, the dispatcher, `RunTests.Common.ps1`
and the tests). Any other Claude/Anthropic model, or that model anywhere
else, still fails the test. Opus only proposes a selection; trusted code
validates it, and it can only add tests, never remove the other model's
picks.

**Security review notes:** the new Opus workflow uses only existing
secrets (the `COPILOT_PAT_0..9` pool via `copilot-pat-pool`); the
dispatcher uses the existing `AZDO_TRIGGER_TENANT_ID` /
`AZDO_TRIGGER_CLIENT_ID`. No new third-party actions. All actions are
pinned by SHA.

### Validation

**End to end in a fork (kubaflo/maui)** through the real GPT agent →
Opus agent → dispatcher path, on 8 current PRs. All 24 workflow runs
succeeded; each PR got the comment with both models' picks and the
Skipped checks. Azure is skipped there because the fork has no federated
identity.

**Real builds on dotnet/maui.** Other PRs' merge refs don't have the new
pipeline parameters until this merges, so each trial was a temporary
draft PR: this branch plus one current PR's change.
`Invoke-RunTests.ps1` ran locally with both models' proposals from the
fork run on the same diff, queued `maui-pr-uitests`, and posted the
comment. Every build got exactly the selected platforms and categories.

| Trial | Copy of | GPT-6.1 Sol | Claude Opus 5.5 | Ran | Result |
| --- | --- | --- | --- | --- | --- |
| dotnet#40442 | dotnet#40369 Windows title bar | `Window` | + `TitleView`,
`Lifecycle` | Windows, 3 categories | Passed in 39 min |
| dotnet#40443 | dotnet#40366 Shell modal stack | `Shell1/2` on iOS, Mac | same |
iOS + MacCatalyst | Passed |
| dotnet#40444 | dotnet#40363 Android EmptyView | CollectionView + CarouselView |
same | Android, 8 categories | Passed in 41 min |
| dotnet#40445 | dotnet#40344 Shell tab reselect | `Shell1/2`, `Navigation` | +
`TabbedPage` | All platforms, 4 categories | Running at time of writing
|
| dotnet#40446 | dotnet#40291 `DisplayPromptAsync` | Prompt, Alert, ActionSheet |
same | All platforms, 3 categories | 1 test failed on MacCatalyst |
| dotnet#40447 | dotnet#40234 `Element` / VSM threading | Full suite | Full suite |
Full suite | Running at time of writing |
| dotnet#40448 | dotnet#40385 CodeQL CI-only | Nothing | Nothing | Nothing (no
build) | Comment only |
| dotnet#40449 | dotnet#39487 Button corner radius | `Button`, `ImageButton` on iOS,
Mac | same | iOS + MacCatalyst | 1 Button test failed |

The failures are the same tests that failed in an earlier round on the
same copied changes, so they come from those PRs, not the selection. The
comments were refreshed from the real timelines and test results with
`Update-RunTestsResults.ps1`.

**Azure previews of this PR's merge ref:**
- Defaults: identical to `main` (13 jobs, 157 matrix entries).
- Android `Button`: 2 jobs, no Material3 lane. `Button` + `Material3`:
the Material3 lane is included.
- Qualified selections: `android:Material3` + `ios:Label` runs only the
Material3 lane on Android; `android:Shell1` also runs the Shell renderer
lane; `android:SafeAreaEdges` runs its dedicated lane;
`windows:CollectionView1` runs the CV1 lane; an Android-only
CollectionView pick never starts the Windows CV1 lane.
- `selectedPlatforms` containing `"x; Remove-Item"`: only template
booleans reach the build step.

**Tests:** `RunTests.Tests.ps1` has 39 Pester tests covering the
inventory and `#if` evaluator, pruning and qualification, the two-model
union (one model empty, neither, full only when chosen), AI-only rules,
the queue request and dropped-selection guard, the check plan, comment
rendering and updates, and static template checks. The `ReviewTrigger`,
`Recover-MissedReviewCommands` and `CopilotPipeline` suites pass. `gh aw
compile --strict` succeeds.

**Not verified before merge:**
- The slash command and the dispatcher's OIDC exchange on `dotnet/maui`
itself. GitHub only runs them from the default branch. After merge,
comment `/review run-tests` on a PR to confirm.
- The `check_run`-triggered comment update on `dotnet/maui` (the script
itself is verified; the half-hourly sweep is the backup).
- The `copilot-pat-pool` token selection in the new Opus workflow (the
fork used a single secret).

---------

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
… commit (dotnet#40483)

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

### Target Branch

- [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).

CI workflow infrastructure, so it targets `main`.

### Description of Change

Follow-up to dotnet#40468, found while testing `/review run-tests` on open PRs
after it merged.

`maui-pr-uitests` builds GitHub's test-merge commit
(`refs/pull/N/merge`). GitHub does not refresh it when `main` moves; it
waits for activity on the PR. Right after dotnet#40468 merged, every open PR's
merge ref still merged an older `main` (21 merged dotnet#40305's `main`, 20
merged an even older one). Some had been stale for hours. The pipeline
in those commits does not declare the new `uitest_*` parameters, so the
dispatcher stopped straight away with "merges an older main".

Changes:

- **Wait instead of failing.** `Get-VerifiedPullRequest` now treats a
merge ref whose pipeline cannot take the selection as "not ready yet".
It keeps polling for up to 10 minutes, which covers a refresh GitHub is
already computing. A missing merge of a new head still gives up after
about 3 minutes, as before. The dispatcher job timeout goes from 15 to
25 minutes to fit.
- **Check every parameter that will be sent.**
`Test-RunTestsPipelineSupportsSelection` also requires each
`uitest_<Category>` / `uitestPlatform*` name in the queue request.
Otherwise a category added to `main` later would reach Azure as an
"Unexpected parameter" 400 on PRs whose merge ref predates it.
- If GitHub still hasn't refreshed after 10 minutes, the comment says so
and suggests commenting again later or updating the branch.

### Validation

- `RunTests.Tests.ps1` and `CopilotPipeline.Tests.ps1`: 66 passed. A new
test covers parameters that are missing from the built pipeline,
including regex metacharacters.
- Real `/review run-tests` comments after dotnet#40468 merged, using the
current `main` dispatcher (without this PR):

  | PR | Merge ref merges | Selection | Result |
  | --- | --- | --- | --- |
| dotnet#40437 | new `main` (head pushed after the merge) | 9 categories, all
platforms | **Queued targeted build 1692555** as the trigger identity
(no 403). Azure shows `selectedRun=true`, the four platform booleans and
only the 9 `uitest_*` values; only the CollectionView, CV1 and
per-platform stages started |
| dotnet#40418 | new `main` | full suite (both models) | Full build 1692548 |
| dotnet#40369, dotnet#40344, dotnet#40288 | dotnet#40305's `main` | 5 / 4 / 2 categories |
Stopped: stale merge ref |
| dotnet#40420 | older `main` | 4 categories, Android | Stopped: stale merge
ref |

A `/review run-tests` comment, an API read and a no-op base edit did not
refresh a stale merge ref within 10+ minutes; a push to the PR head
refreshes it at once. Until GitHub refreshes the older PRs, they need an
update or push. This PR waits for any refresh GitHub is already
computing, explains the situation in the comment, and keeps a later
category addition from becoming an Azure 400.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…ures (dotnet#40485)

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

### Target Branch

- [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).

CI workflow infrastructure, so it targets `main`.

### Description of Change

Follow-up to dotnet#40468 and dotnet#40483, found while testing `/review run-tests`
on more PRs.

I updated dotnet#39935's branch so its test-merge commit has the new pipeline,
then commented `/review run-tests`. Both models selected 8 categories on
iOS and MacCatalyst. Both attempts (19:45 and 19:57 UTC) ended with:

> Could not queue maui-pr-uitests: The Azure DevOps request failed; see
the workflow log.

The log only shows `400 (Bad Request)`, and no build was created.
- The same request validates fine in Azure's pipeline preview.
- At the same moment, `review-trigger.yml` runs that use the same
trigger identity failed to get a token: `AADSTS53003: Access has been
blocked by Conditional Access policies. The access policy does not allow
token issuance.`
- So the 400 came from Microsoft Entra's token endpoint, not from Azure
DevOps.
- Entra's error body has `error_description`, not `message`, so
`Get-RunTestsAzdoErrorText` returned nothing.

Changes:

- **Report Entra's reason.** `Get-RunTestsAzdoErrorText` also reads
`error_description` and drops the trace and correlation ids.
- **Retry the sign-in.** `Get-RunTestsAzdoToken` retries the token
exchange up to 4 times, waiting 15, 30 and 45 seconds between attempts.
If it still fails, it throws an error with id
`RunTestsEntraSignInFailed`.
- **Say what failed.** `Invoke-RunTests.ps1` turns that error into
"Could not sign in to Azure DevOps: Microsoft Entra refused the token
(AADSTS…). Nothing was queued; comment `/review run-tests` again later."
The comment no longer suggests that Azure DevOps rejected the selection.

The Conditional Access block itself is a dnceng tenant policy on the
shared `AZDO_TRIGGER_CLIENT_ID` identity. It also affects `/review`
through `review-trigger.yml`. It can't be fixed in this repo.

### Validation

- `RunTests.Tests.ps1` and `CopilotPipeline.Tests.ps1`: 69 passed. New
tests cover:
  - the Entra error text;
- four sign-in attempts followed by the sign-in error id, with mocked
HTTP calls;
  - the dispatcher's message for a failed sign-in.
- Other real `/review run-tests` results today on `main`:
  - dotnet#40437 queued targeted build 1692555 with 9 categories;
- dotnet#40478 (`net11`) got the "can't run on PRs that target `net11` yet"
comment;
- dotnet#40369 and dotnet#40344, whose test-merge commits are stale, waited 10
minutes and then explained why.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 00f6cbdf Deployed Nov 24, 2026 by kubaflo via conclusion #3285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-window Window area-theme Themes, theming community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application Title Invisible in Dark Mode on Windows

5 participants