Skip to content

Revert PR #30068 — Fix FontImageSource centering regression on Windows#35642

Merged
kubaflo merged 5 commits into
dotnet:inflight/currentfrom
Shalini-Ashokan:Revert-fix-30004
May 28, 2026
Merged

Revert PR #30068 — Fix FontImageSource centering regression on Windows#35642
kubaflo merged 5 commits into
dotnet:inflight/currentfrom
Shalini-Ashokan:Revert-fix-30004

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!

This PR reverts the changes introduced by #30068, which caused an FontImageSource is not centered and gets clipped.

Root cause of Regression

PR #30068 introduced a regression in 10.0.60 where Image controls using FontImageSource are no longer centered and get clipped on Windows. The LayoutBounds-based canvas sizing produces a larger canvas than expected, causing glyphs to overflow and appear misaligned in certain scenarios.

Description of Change

PR #30068 fixed glyph centering by switching FontImageSourceService on Windows to use a fontSize × fontSize layout and LayoutBounds for canvas sizing, which caused some font glyphs to be cropped or tightly constrained in certain scenarios. Reverting to restore the previous rendering behavior.

Issues Fixed

Fixes #35618

PureWeen and others added 5 commits May 21, 2026 16:04
<!-- 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!

## What
Restrict the agentic-labeler to apply **exactly one `area-*` label** per
item, while still allowing multiple `platform/*` labels.

## Why
Backfilling the 26 items affected by the `max:1` bug (fixed in dotnet#35540)
revealed that the labeler occasionally applies multiple `area-*` labels
for ambiguous cases:

- **dotnet#35501** got both `area-layout` and `area-safearea`
- **dotnet#35490** got both `area-navigation` and `area-controls-tabbedpage`

The intended behavior is exactly one best-fit `area-*` per item (a
label-quota distinction not expressible via
`safe-outputs.add-labels.max:` — that field counts total labels, not
labels per prefix). The fix has to live in the agent's instructions.

## Changes

### `.github/skills/agentic-labeler/SKILL.md`
- Scope section: "Exactly one `area-*`" / "One or more `platform/*`".
- Area rules section: renamed heading, changed "pick one or more" →
"apply exactly one".
- New **tie-breaking heuristics** for the area-* selection:
- Specific control beats generic area (`area-controls-tabbedpage` over
`area-navigation`)
  - Sub-area beats parent area (`area-safearea` over `area-layout`)
  - Subject-matter focus beats incidental touch
  - When genuinely tied, prefer the user-visible feature
- Mixed-PR rule clarified: infra-primary PRs get only
`area-infrastructure` (no second product area).

### `.github/workflows/agentic-labeler.md`
- Added explicit reinforcement in the workflow prompt: "Apply exactly
one `area-*` label … and one or more `platform/*` labels".
- Fixed two stale `max: 1` comments left over from dotnet#35540 (the cap is
now `max: 10`).

### `.github/workflows/agentic-labeler.lock.yml`
- Regenerated via `gh aw compile`. Diff is frontmatter-hash + heredoc
rotations only — no semantic change to the compiled config.

## Validation
- Reviewed all 21 existing eval scenarios in `tests/eval.yaml` — none
assert multiple `area-*` labels, so no test updates needed.
- The `max: 10` cap in `safe-outputs` is preserved as a blast-radius
safeguard (one area + several platforms still fit comfortably).

## Follow-ups (not in this PR)
If accuracy of the "one area" rule drops below ~95% in eval runs,
consider adding a deterministic post-step that strips extra `area-*`
labels per a known precedence list (Option B from the design
discussion).

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

Extends the `maui-copilot` DevDiv pipeline (pipeline 27723) with a
3-stage architecture that runs real UI tests on platform-pool agents and
reports results directly in the AI summary PR comment.

### Pipeline Workflow

```
┌─────────────────────────────────────────────────────────┐
│  Stage 1: ReviewPR                                      │
│                                                         │
│  STEP 1: Branch Setup (checkout + cherry-pick PR)       │
│  STEP 2: Detect UI Test Categories                      │
│  STEP 3: Run Detected UI Tests (in-process, fast)       │
│  STEP 4: Regression Cross-Reference                     │
│  STEP 5: Gate — verify tests fail/pass before/after fix │
│  STEP 6: Code Review — deep analysis via Copilot agent  │
│                                                         │
│  Outputs → CopilotLogs artifact + detectedCategories    │
└──────────────────────┬──────────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────────┐
│  Stage 2: RunDeepUITests (platform-pool agent)          │
│                                                         │
│  iOS: AcesShared Tahoe + iOS 26.4                       │
│  Android: ubuntu-22.04 + KVM + AVD                      │
│                                                         │
│  Runs BuildAndRunHostApp.ps1 per detected category      │
│  Outputs → drop-deep-uitests artifact (TRX + diffs)     │
└──────────────────────┬──────────────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────────────┐
│  Stage 3: PostResults                                   │
│                                                         │
│  1. Download CopilotLogs (review content files)         │
│  2. Download drop-deep-uitests (TRX results)            │
│  3. Merge deep results into uitests/content.md          │
│  4. Post full AI Summary comment on PR                  │
│  5. Apply labels (s/agent-reviewed, etc.)               │
│                                                         │
│  One comment with everything — no patching needed       │
└─────────────────────────────────────────────────────────┘
```

### What's New

**Deep UI Test Execution (Stage 2)**
- Runs detected UI test categories on proper platform-pool agents (not
in-process on Linux)
- **iOS**: AcesShared Tahoe agents with iOS 26.4 simulator, iPhone 11
Pro (matching `ios-26` baselines from PR dotnet#35061)
- **Android**: ubuntu-22.04 with KVM, AVD boot with `-partition-size
2048`, `ignoreHiddenApiPolicyError` capability
- TRX results + snapshot-diff PNGs published as `drop-deep-uitests`
artifact

**Unified Comment Posting (Stage 3)**
- Comment posting and label application deferred to Stage 3 (after deep
tests complete)
- Single AI summary comment includes ALL results: code review + deep
test results
- Nested collapsible `<details>` for failed tests with full error +
stack trace
- Dynamic section title: `🧪 UI Tests — CollectionView, TabbedPage`
- Artifact download link for snapshot-diff PNGs

**Android Emulator Improvements**
- AVD boot step with proper partition size, ADB key pre-authorization,
boot wait
- `DEVICE_UDID` pass-through prevents double emulator boot
- Disk cleanup on hosted ubuntu agents (frees ~22GB)
- KVM enablement + `appium:ignoreHiddenApiPolicyError` for API 30

**iOS Simulator Improvements**
- Tahoe pool demand ensures macOS 26.x agents
- Explicit iOS 26.4 download via latest Xcode
- Auto-creates iPhone 11 Pro for baseline resolution match

### Validation

Tested across 30+ pipeline iterations on 6 PRs:

| PR | iOS | Android |
|---|---|---|
| 35358 (ViewBaseTests) | **112/112 ALL PASS** ✅ | **118/119 PASS** ✅ |
| 35359 (TabbedPage) | 44/50 (1 real failure) | 74/75 (1 real failure) |
| 35356 (CollectionView) | **415/417 PASS** ✅ | 593/619 (26 real
failures) |

---------

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

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

Backport of dotnet#35460 to `main`.

/cc @PureWeen

Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
@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 -- 35642

Or

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

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label May 27, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label May 27, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review May 27, 2026 13:57
@kubaflo kubaflo changed the base branch from main to inflight/current May 28, 2026 09:08
@kubaflo kubaflo merged commit 9a4b5ec into dotnet:inflight/current May 28, 2026
33 of 36 checks passed
@github-actions github-actions Bot added this to the .NET 10.0 SR8 milestone May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-image Image control community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Image with FontImageSource is not centered and gets clipped when WidthRequest/HeightRequest equals FontImageSource Size

4 participants