Skip to content

[Candidate/11 sr2] Fixed the device test failure on the Windows platform - #40365

Merged
kubaflo merged 1 commit into
dotnet:candidate/11.0.1xx-sr2from
TamilarasanSF4853:candidate-11.0.1xx-sr2-failure
Nov 18, 2026
Merged

kubaflo merged 1 commit into
dotnet:candidate/11.0.1xx-sr2from
TamilarasanSF4853:candidate-11.0.1xx-sr2-failure

Conversation

@TamilarasanSF4853

Copy link
Copy Markdown
Contributor

Issue Details:
In #40175, the BoxView shadow rendering was updated on Windows to use the live composition visual for Win2D-based shapes instead of relying on RenderTargetBitmap. This affected the existing clipping test introduced in #37424, which used pixel assertions to verify that transformed BoxView content remained clipped to the Border's shape. Since RenderTargetBitmap does not reliably capture Win2D content, the test became unreliable.

Description of Changes:
Updated the clipping test introduced in #37424 to avoid screenshot-based pixel assertions affected by #40175. The test now verifies that the Border creates a ContentPanelClipHost, that its content (including the WrapperView when a shadow is applied) is hosted inside the clip host, and that the host's composition visual contains a valid CompositionGeometricClip with a CompositionPathGeometry. This ensures that transformed content remains clipped to the Border's shape, with and without shadows.

Fixes: #40116

@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

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@MauiBot

MauiBot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@TamilarasanSF4853 — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Android


🧪 Gate analysis — click to expand

⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

@MauiBot MauiBot removed 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 b1b49aa.

See inline comments for details.

// Transformed content (wrapped in WrapperView when it has a shadow) must be hosted in the clip host.
Assert.Same(clipHost, contentPanel.Content.Parent);
var clip = Assert.IsType<CompositionGeometricClip>(ElementCompositionPreview.GetElementVisual(clipHost).Clip);
Assert.NotNull(Assert.IsType<CompositionPathGeometry>(clip.Geometry).Path);

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.

[moderate] Regression Prevention and Test Coverage - Keep a check that content remains visible inside the aperture. ContentPanel.UpdateClip creates a nonnull CompositionPath even from an empty PathF, so a regression that clips away all content still satisfies every replacement assertion; the removed red-center assertion caught that case. The remaining nested-layout pixel test does not cover this theory's direct-content rotation, translation, or shadow cases. Add deterministic aperture/content checks or a capturable interior sentinel alongside these structural assertions so avoiding unreliable Win2D bitmap capture does not also accept an empty result.

@kubaflo

kubaflo commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

The original pixel assertions now pass at the candidate head, so this rewrite may no longer be needed.

#40353 (merged 11-18 10:48Z; at candidate head as 845e1465ca after the branch rewrite) fixed the shadow WrapperView to stay inside the Border's ContentPanelClipHost, and kept AssertPixelIsTransparent(10,10) / AssertPixelIsRed(50,50) unchanged.

Device build 1687629 on #40116 merge 021ce020 (contains 845e1465ca), Helix job 26ca33b4-2b65-454d-98f7-d3fb008fcfb4 (windows.11.amd64.client.open), TestResults-com_microsoft_maui_controls_devicetests_Border.xml:

  • packaged: 47 Border tests, 0 failed; Border clips transformed content to its shape - Issue 17523(scale: 3, rotation: 0, translationX: 0, translationY: 0, hasShadow: True) = Pass
  • unpackaged: 47 Border tests, 0 failed; same case = Pass

The last failure of that case (device 1687552, Windows packaged + unpackaged, Expected pixel (50, 50) to be red, but it was (0, 0, 0, 0)) was at 6830…, which predates #40353.

This PR also reports CONFLICTING against the rewritten candidate branch.

@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@TamilarasanSF4853 — test-failure analysis for commit b1b49aa.

Scope CI failures Commit b1b49aa


🧪 CI Analysis — click to expand
📊 maui-pr
  • 🟡 Needs human investigation — ShapeFillDoesNotLeak (Windows x64): “Shape should not be alive!” persists in the latest pinned Build Insights report despite green build status; all five target samples have truncated coverage.

🧪 maui-pr-devicetests

No failures found in final verified Helix results; earlier Windows attempts recovered, which does not establish unrelatedness.


🧪 maui-pr-uitests

All cases below are Mac element-wait timeouts. Five target samples have incomplete coverage and no equivalent failure evidence; the truncated patch also prevents excluding menu/shared-code changes.


🧭 Follow-up — actions and refresh

Next action: Compare the leak and menu cases on candidate/11.0.1xx-sr2 versus this head with identical configurations; restore complete patch/history evidence before attribution.

Maintainers: comment /review tests to refresh this report.

@kubaflo
kubaflo marked this pull request as ready for review November 18, 2026 19:38
@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
@MauiBot

MauiBot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@TamilarasanSF4853 — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Windows


🧪 Gate analysis — click to expand

⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 18, 2026
@kubaflo
kubaflo force-pushed the candidate-11.0.1xx-sr2-failure branch from b1b49aa to 00fa972 Compare November 18, 2026 19:48
@kubaflo
kubaflo force-pushed the candidate/11.0.1xx-sr2 branch from 86f3abf to f03e2a0 Compare November 18, 2026 19:48
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kubaflo
kubaflo force-pushed the candidate-11.0.1xx-sr2-failure branch from 00fa972 to f69266d Compare November 18, 2026 19:51
@kubaflo
kubaflo merged commit b45b3b4 into dotnet:candidate/11.0.1xx-sr2 Nov 18, 2026
2 of 12 checks passed
@kubaflo kubaflo mentioned this pull request Nov 18, 2026
1 task
kubaflo added a commit that referenced this pull request Nov 18, 2026
…orm (#40365)

Issue Details:
In #40175, the BoxView shadow rendering was updated on
Windows to use the live composition visual for Win2D-based shapes
instead of relying on RenderTargetBitmap. This affected the existing
clipping test introduced in #37424, which used pixel
assertions to verify that transformed BoxView content remained clipped
to the Border's shape. Since RenderTargetBitmap does not reliably
capture Win2D content, the test became unreliable.
 
Description of Changes:
Updated the clipping test introduced in #37424 to avoid
screenshot-based pixel assertions affected by #40175. The
test now verifies that the Border creates a ContentPanelClipHost, that
its content (including the WrapperView when a shadow is applied) is
hosted inside the clip host, and that the host's composition visual
contains a valid CompositionGeometricClip with a
CompositionPathGeometry. This ensures that transformed content remains
clipped to the Border's shape, with and without shadows.

Fixes: #40116

Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
kubaflo added a commit that referenced this pull request Nov 19, 2026
…orm (#40365)

Issue Details:
In #40175, the BoxView shadow rendering was updated on
Windows to use the live composition visual for Win2D-based shapes
instead of relying on RenderTargetBitmap. This affected the existing
clipping test introduced in #37424, which used pixel
assertions to verify that transformed BoxView content remained clipped
to the Border's shape. Since RenderTargetBitmap does not reliably
capture Win2D content, the test became unreliable.
 
Description of Changes:
Updated the clipping test introduced in #37424 to avoid
screenshot-based pixel assertions affected by #40175. The
test now verifies that the Border creates a ContentPanelClipHost, that
its content (including the WrapperView when a shadow is applied) is
hosted inside the clip host, and that the host's composition visual
contains a valid CompositionGeometricClip with a
CompositionPathGeometry. This ensures that transformed content remains
clipped to the Border's shape, with and without shadows.

Fixes: #40116

Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
kubaflo added a commit that referenced this pull request Nov 22, 2026
…orm (#40365)

Issue Details:
In #40175, the BoxView shadow rendering was updated on
Windows to use the live composition visual for Win2D-based shapes
instead of relying on RenderTargetBitmap. This affected the existing
clipping test introduced in #37424, which used pixel
assertions to verify that transformed BoxView content remained clipped
to the Border's shape. Since RenderTargetBitmap does not reliably
capture Win2D content, the test became unreliable.
 
Description of Changes:
Updated the clipping test introduced in #37424 to avoid
screenshot-based pixel assertions affected by #40175. The
test now verifies that the Border creates a ContentPanelClipHost, that
its content (including the WrapperView when a shadow is applied) is
hosted inside the clip host, and that the host's composition visual
contains a valid CompositionGeometricClip with a
CompositionPathGeometry. This ensures that transformed content remains
clipped to the Border's shape, with and without shadows.

Fixes: #40116

Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…orm (#40365)

Issue Details:
In #40175, the BoxView shadow rendering was updated on
Windows to use the live composition visual for Win2D-based shapes
instead of relying on RenderTargetBitmap. This affected the existing
clipping test introduced in #37424, which used pixel
assertions to verify that transformed BoxView content remained clipped
to the Border's shape. Since RenderTargetBitmap does not reliably
capture Win2D content, the test became unreliable.
 
Description of Changes:
Updated the clipping test introduced in #37424 to avoid
screenshot-based pixel assertions affected by #40175. The
test now verifies that the Border creates a ContentPanelClipHost, that
its content (including the WrapperView when a shadow is applied) is
hosted inside the clip host, and that the host's composition visual
contains a valid CompositionGeometricClip with a
CompositionPathGeometry. This ensures that transformed content remains
clipped to the Border's shape, with and without shadows.

Fixes: #40116

Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
@kubaflo kubaflo added this to the .NET 11 SR2 milestone Nov 24, 2026
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…orm (dotnet#40365)

Issue Details:
In dotnet#40175, the BoxView shadow rendering was updated on
Windows to use the live composition visual for Win2D-based shapes
instead of relying on RenderTargetBitmap. This affected the existing
clipping test introduced in dotnet#37424, which used pixel
assertions to verify that transformed BoxView content remained clipped
to the Border's shape. Since RenderTargetBitmap does not reliably
capture Win2D content, the test became unreliable.
 
Description of Changes:
Updated the clipping test introduced in dotnet#37424 to avoid
screenshot-based pixel assertions affected by dotnet#40175. The
test now verifies that the Border creates a ContentPanelClipHost, that
its content (including the WrapperView when a shadow is applied) is
hosted inside the clip host, and that the host's composition visual
contains a valid CompositionGeometricClip with a
CompositionPathGeometry. This ensures that transformed content remains
clipped to the Border's shape, with and without shadows.

Fixes: dotnet#40116

Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-border Border partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants