Fix SwipeItem IconImageSource color handling and rendering across platforms#35632
Conversation
<!-- 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>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35632Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35632" |
|
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. |
|
/review -b feature/refactor-copilot-yml -p ios |
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kubaflo
left a comment
There was a problem hiding this comment.
Could you verify the failing tests?
|
@kubaflo, I have committed the failures images |
|
/review -b feature/enhanced-reviewer |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@Shalini-Ashokan — new AI review results are available based on this last commit:
8c1ea28.
Committed the failures images To request a deterministic rerun after new comments or commits, comment/review rerun.
Review Sessions — click to expand
Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: IOS · Base: main · Merge base: b0ea772f
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue23074 Issue23074 |
✅ FAIL — 301s | ✅ PASS — 111s |
🔴 Without fix — 🖥️ Issue23074: FAIL ✅ · 301s
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 780 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 794 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 4.84 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Foldable/src/Controls.Foldable.csproj (in 4.98 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 5.83 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj (in 5.83 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 5.84 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 5.82 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 5.86 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 5.85 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/maps/src/Maps.csproj (in 5.86 sec).
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
Detected signing identity:
Code Signing Key: "" (-)
Provisioning Profile: "" () - no entitlements
Bundle Id: com.microsoft.maui.uitests
App Id: com.microsoft.maui.uitests
Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Optimizing assemblies for size. This process might take a while.
Build succeeded.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
1 Warning(s)
0 Error(s)
Time Elapsed 00:02:41.63
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 700 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 702 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 733 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 774 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 26 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 889 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 914 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 1.12 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 1.93 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.67 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 3.98 sec).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj (in 4.01 sec).
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.15] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 6/1/2026 4:34:12 AM FixtureSetup for Issue23074(iOS)
>>>>> 6/1/2026 4:34:16 AM SwipeItemFontAndSvgIconsRenderCorrectly Start
>>>>> 6/1/2026 4:34:19 AM SwipeItemFontAndSvgIconsRenderCorrectly Stop
>>>>> 6/1/2026 4:34:19 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed SwipeItemFontAndSvgIconsRenderCorrectly [3 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SwipeItemFontAndSvgIconsRenderCorrectly.png (0.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue23074.SwipeItemFontAndSvgIconsRenderCorrectly() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23074.cs:line 18
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue23074.trx
Total tests: 1
Failed: 1
Test Run Failed.
Total time: 1.4699 Minutes
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue23074.trx
🟢 With fix — 🖥️ Issue23074: PASS ✅ · 111s
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 502 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 467 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 504 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 545 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 555 ms).
6 of 11 projects are up-to-date for restore.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
Detected signing identity:
Code Signing Key: "" (-)
Provisioning Profile: "" () - no entitlements
Bundle Id: com.microsoft.maui.uitests
App Id: com.microsoft.maui.uitests
Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Optimizing assemblies for size. This process might take a while.
Build succeeded.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:57.72
Determining projects to restore...
Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 440 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 438 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 439 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 475 ms).
Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 496 ms).
8 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.80-ci+azdo.14247339
Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.06] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.17] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 6/1/2026 4:36:07 AM FixtureSetup for Issue23074(iOS)
>>>>> 6/1/2026 4:36:11 AM SwipeItemFontAndSvgIconsRenderCorrectly Start
>>>>> 6/1/2026 4:36:12 AM SwipeItemFontAndSvgIconsRenderCorrectly Stop
Passed SwipeItemFontAndSvgIconsRenderCorrectly [1 s]
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue23074.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 22.7976 Seconds
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue23074.trx
📁 Fix files reverted (5 files)
eng/pipelines/ci-copilot.ymlsrc/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.Android.cssrc/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.Windows.cssrc/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.cssrc/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.iOS.cs
UI Tests — SwipeView,ViewBaseTests
Detected UI test categories: SwipeView,ViewBaseTests
✅ Deep UI tests — 179 passed, 0 failed across 2 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
SwipeView |
67/67 ✓ | — |
ViewBaseTests |
112/112 ✓ | — |
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs) |
Pre-Flight — Context & Validation
Pre-Flight
PR Context
- PR: #35632 - Fix SwipeItem IconImageSource color handling and rendering across platforms
- Issue: #23074 - SwipeItem IconImageSource should allow more configuration; colored image icons were being auto-tinted when a background color was set.
- Platform selected for testing: iOS
- Gate: Already passed before this phase: tests fail without the fix and pass with the PR fix. Gate was not re-run.
Changed Areas
- src/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.iOS.cs - switches non-font images to original rendering and only tints font sources.
- src/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.Android.cs - applies color filter only for font sources.
- src/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.Windows.cs and SwipeItemMenuItemHandler.cs - load Windows icons through image source services.
- UI test and screenshots under src/Controls/tests/TestCases.* for SwipeItemFontAndSvgIconsRenderCorrectly.
Test Command
pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "SwipeItemFontAndSvgIconsRenderCorrectly"
Code Review Summary
- Verdict: LGTM
- Confidence: medium
- Key iOS assessment: The PR uses UIKit rendering modes correctly: font glyphs remain template images so tint works, while regular image sources render as original images to preserve authored colors. Clearing button.TintColor for non-font sources avoids stale tint on reused controls.
- Phase 2 hints: Explore alternatives that are materially different from the PR's current iOS handler rendering-mode branch, especially shared contrast logic changes or preprocessing non-font images before they reach the button.
Code Review — Deep Analysis
Code Review - PR #35632
Independent Assessment
What this changes: The PR changes SwipeItemMenuItemHandler image rendering so platform-specific swipe item icons no longer treat every image as a tintable template glyph. On iOS it switches non-font sources to UIImageRenderingMode.AlwaysOriginal, keeps AlwaysTemplate only for IFontImageSource, applies explicit font color when present, and otherwise keeps the existing text/background contrast tint. Android similarly gates SetColorFilter behind IFontImageSource. Windows routes icon loading through image source services instead of the synchronous ToIconSource path.
Inferred motivation: A colored image source used as a SwipeItem.IconImageSource was being recolored based on the swipe item background/text contrast logic. The fix aims to preserve authored raster/vector image colors while retaining legacy automatic contrast for font glyphs without explicit color.
Reconciliation with PR Narrative
Author claims: Fixes #23074 by applying tint only to FontImageSource; PNG/SVG preserve original colors; explicit font color is respected; font without color retains current fallback tinting. Adds iOS/Android/Mac/Windows screenshots and a UI screenshot test.
Agreement/disagreement: The code matches that behavior on iOS for the scenario under test. One non-blocking concern is that the shared UI test is wrapped in TEST_FAILS_ON_WINDOWS, which disables it broadly depending on symbol configuration rather than only excluding Windows, but the gate already proved the iOS test catches the regression.
Findings
No concrete blocking findings for the iOS implementation. The iOS handler's added branch is narrow, preserves existing font fallback behavior, and explicitly clears button tint for non-font images after rendering them as original images.
Devil's Advocate
A reused UIButton could retain tint from a prior font source; the PR clears TintColor for non-font sources, addressing that. ImageWithRenderingMode(AlwaysOriginal) should preserve image colors for PNG-derived UIImage values; for generated vector/raster assets the image source service has already produced a UIImage, so the rendering mode remains the appropriate final iOS control-level switch. The catch block remains pre-existing and broad, but this PR does not expand it.
Verdict: LGTM
Confidence: medium
Summary: The iOS code path is targeted and consistent with UIKit's template/original rendering semantics. Alternative exploration should focus on whether the decision belongs in shared text-color logic or image-source preprocessing instead of the iOS handler branch.
Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | maui-expert-reviewer | Bake font glyph color with CGBlendMode.SourceIn, then use AlwaysOriginal for all iOS swipe item icons | PASS | 1 file | Different from PR: no load-bearing UIButton.TintColor; more robust to later tint propagation, at the cost of a helper and extra render pass for fonts |
| PR | PR #35632 | Branch on image source type: AlwaysTemplate plus tint for fonts, AlwaysOriginal plus clear tint for non-font images | PASSED (Gate) | 4 handler files plus tests/screenshots | Original PR fix; simpler on iOS but still relies on TintColor for font glyph rendering |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| maui-expert-reviewer | 1 | Yes | SourceIn Color-Bake candidate. Tested and passed, so the loop stopped under the requested stop condition. |
Exhausted: No - stopped because Candidate #1 passed all iOS regression tests and is demonstrably stronger than the PR fix against later UIKit tint propagation.
Selected Fix: Candidate #1 - It preserves non-font icon pixels and font colors without depending on UIButton.TintColor after SetImageSource, while the PR fix still depends on runtime tint for font glyphs.
Report — Final Recommendation
Comparative Candidate Report
Candidates evaluated
| Candidate | Regression result | Summary | Rank |
|---|---|---|---|
pr |
PASS | Submitted PR fix. Preserves non-font image colors by using original rendering for non-font sources, keeps template+tint behavior for font glyphs, and includes cross-platform handler updates plus visual regression coverage. Expert review found no actionable issues. | 1 |
pr-plus-reviewer |
PASS | Same code as pr; the expert reviewer produced no actionable findings, so there was nothing to apply in the sandbox copy. |
2 |
try-fix-1 |
PASS | Alternative iOS implementation that bakes font glyph color into pixels with CGBlendMode.SourceIn and then uses AlwaysOriginal for all iOS SwipeItem icons. It passed the same iOS regression test and avoids relying on UIButton.TintColor for fonts, but adds a helper, an extra render pass, and changes the established font-image tinting mechanism for a hypothetical robustness gain. |
3 |
Analysis
All candidates with available regression results passed; no candidate needed to be demoted for failed regression tests. The raw PR fix remains the best candidate because it directly addresses the reported bug with the smallest behavioral change: regular image sources stop being tinted, while font image sources keep the platform-standard template rendering and tint behavior. It also keeps the implementation simple and consistent with UIKit expectations for template images.
pr-plus-reviewer is not meaningfully distinct from pr because the expert reviewer returned no actionable inline findings. It is ranked below pr only because it is an alias rather than a separate improvement.
try-fix-1 is a valid passing alternative, and its color-baking strategy is robust against later UIButton.TintColor propagation. However, that robustness is speculative relative to the submitted bug, and the approach adds rendering complexity plus a second image-processing path for font glyphs. Since the submitted PR already passes the gate and expert review found no correctness issues, the extra complexity is not justified.
Winner
Winner: pr
The submitted PR fix is the best balance of correctness, scope, and maintainability. It passes the regression gate, preserves authored non-font image colors, retains expected font-image tint behavior, and received an LGTM expert review with no inline findings.
Future Action — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
…tforms (#35632) <!-- 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! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details SwipeItem automatically applies a tint/filter to the icon when a background color is set. Because of that, a custom red icon can change to white/black instead of keeping its original color. ### Root Cause Android/iOS applied tint universally to all drawable types instead of only FontImageSource; Windows used synchronous conversion that rasterized font glyphs instead of preserving vector rendering. ### Description of Change Added platform-specific source-type checking: Android/iOS apply tint only to FontImageSource with fallback to item text color; Windows uses async LoadFileIconAsync to load all sources uniformly through image services, preserving font vector quality. ### Behavior change Currently, the icon color is always determined based on the background color, regardless of whether the icon is a PNG, SVG, or FontImageSource. With the changes in this PR, the behavior will be as follows: - If a PNG or SVG image is provided, no color changes will be applied. The image will be displayed using its original colors. - If a FontImageSource is provided with an explicit color, the specified color will be used. - If a FontImageSource is provided without a color, the existing behavior will be retained. |Scenario|Before|After| |--|--|--| | Png image with background color| <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/271c180c-444e-4919-b721-985f0a58f7e0" /> | <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/baf47387-c54a-4332-a6c4-141fb73ab327" />| | Svg image with background color| <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/61bd8b0f-462c-4461-8a18-033e45d497d5" />| <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/d9129899-4560-4450-946f-d820d1f6820e" />| |FontImage with color | <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/2afd4b8a-f276-4c56-92b2-0449301d39e1" />| <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/1991dce7-f767-4616-a2f1-9e7a35e4c3e9" />| | FontImage with without color|<img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/0b07e2fa-a3e1-4be9-b0be-7dad53d823c3" /> | <img width="718" height="1466" alt="image" src="https://github.com/user-attachments/assets/ec5da308-87a3-48b0-968a-bb68df4b9686" />| Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #23074 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/4e335c3a-bcbc-489d-a040-d8f375b82015" >| <video src="https://github.com/user-attachments/assets/60206583-184f-4ac5-8e31-08cfcd7ac512">| ---------
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
SwipeItem automatically applies a tint/filter to the icon when a background color is set. Because of that, a custom red icon can change to white/black instead of keeping its original color.
Root Cause
Android/iOS applied tint universally to all drawable types instead of only FontImageSource; Windows used synchronous conversion that rasterized font glyphs instead of preserving vector rendering.
Description of Change
Added platform-specific source-type checking: Android/iOS apply tint only to FontImageSource with fallback to item text color; Windows uses async LoadFileIconAsync to load all sources uniformly through image services, preserving font vector quality.
Behavior change
Currently, the icon color is always determined based on the background color, regardless of whether the icon is a PNG, SVG, or FontImageSource.
With the changes in this PR, the behavior will be as follows:
Validated the behavior in the following platforms
Issues Fixed
Fixes #23074
Output ScreenShot
23074-BeforeFix.mov
23074-AfterFix.mov