Skip to content

[net11.0][Android] Update UITest snapshot baselines for Shell and NavigationPage toolbar hide scenarios - #38770

Merged
kubaflo merged 1 commit into
dotnet:net11.0from
praveenkumarkarunanithi:fix-net11test
Sep 22, 2026
Merged

kubaflo merged 1 commit into
dotnet:net11.0from
praveenkumarkarunanithi:fix-net11test

Conversation

@praveenkumarkarunanithi

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!

Description of Change

This PR addresses the UI test snapshot failures that occurred in the net11.0 branch and updates the baselines to match the resolved layout behavior after PR #38058.

In ToggleHasNavigationBar_HidesBar_Visual and ShellPages_NavBarVisibilityHide test cases, added the updated snapshots resulting from fix PR #38058. Previously in PR #36072, insets were redispatched immediately before the native AppBarLayout collapse finished layout, capturing an intermediate state. Deferring the inset dispatch in #38058 allows the layout to settle properly and restores the correct safe-area positioning.

Issues Fixed

Fixes Test cases:

  • ToggleHasNavigationBar_HidesBar_Visual
  • ShellPages_NavBarVisibilityHide

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

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

Or

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

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

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@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 Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15413659 is running for android.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@sheiksyedm
sheiksyedm marked this pull request as ready for review September 22, 2026 12:50
Copilot AI lite review requested due to automatic review settings September 22, 2026 12:50

Copilot AI 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.

Copilot wasn't able to review any files in this pull request.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Summary

@praveenkumarkarunanithi — new AI review results are available based on commit a0fce3d.

Gate No Tests Confidence Low Platform Android


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📋 Pre-Flight — Context & Validation

PR #38770 Pre-Flight

Context

  • Title: [net11.0][Android] Update UITest snapshot baselines for Shell and NavigationPage toolbar hide scenarios
  • Base/head: net11.0 <- fix-net11test (a0fce3d88aa3b0fdb19234ce4e92785febeb1eb4)
  • Materialized review commit: 3f71fe510c6fc76dd1426335fd2a3c3896376dde
  • Platform: Android
  • Purpose: Update expected screenshots after #38058 deferred inset dispatch until the native AppBarLayout collapse completed layout, replacing screenshots that captured an intermediate state.
  • Gate: Skipped because automated diff detection found no tests. The existing gate/content.md was intentionally not touched.

Direct Diff Inspection

The PR changes exactly two existing binary Android UI-test baselines and no source or test code:

  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/NavBarHidden.png
  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/ShellPages_NavBarVisibilityHide.png

Both old and new images are 1080x1735. ImageMagick comparison found:

Snapshot Differing pixels (AE) Normalized RMSE
NavBarHidden.png 372,520 0.274888
ShellPages_NavBarVisibilityHide.png 85,077 0.142799

The corresponding UI tests are:

  • ToggleHasNavigationBar_HidesBar_Visual
  • ShellPages_NavBarVisibilityHide

The bounded verification command is:

pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android -TestFilter "FullyQualifiedName~ToggleHasNavigationBar_HidesBar_Visual|FullyQualifiedName~ShellPages_NavBarVisibilityHide"

No additional mandatory regression tests were supplied in the STEP 5a request.

Candidate Constraints

EstablishBrokenBaseline.ps1 excludes snapshot paths (*snapshots*, *.png) from fix-file detection. Because this PR contains only PNG baselines, a conforming try-fix attempt is expected to report Blocked with No fix files detected rather than edit unrelated production code. Candidate attempts must preserve the unrelated pre-existing worktree changes under .github/scripts, .github/skills, and eng/scripts.


🔬 Code Review — Deep Analysis

Code Review — PR #38770

Independent Assessment

What this changes: Replaces the Android expected screenshots for ToggleHasNavigationBar_HidesBar_Visual and ShellPages_NavBarVisibilityHide. The capture geometry remains 1080×1735, but the rendered content moves below the top system inset instead of beginning partially behind it.

Inferred motivation: Commit b381b1c8b3 (#38058) changed hidden-toolbar inset redispatch to occur after the native AppBarLayout collapses. These baselines align the existing visual tests with that settled layout.

Reconciliation with PR Narrative

Author claims: The prior baselines captured an intermediate layout after #36072, while #38058 now defers inset dispatch until the AppBar collapse has laid out.

Agreement/disagreement: The code and pixels support the claim. Both old images visibly clip their first content row at the top edge; both replacements restore a normal status-bar inset. The PR changes no runtime or test logic and keeps the same device-size capture.

Prior Review Reconciliation

No prior ❌ Error findings found across top-level reviews, inline review comments, or PR issue comments.

Blast Radius Assessment

  • Runs for all instances: No runtime behavior changes; only two Android test expectations change.
  • Startup impact: None.
  • Static/shared state: None.
  • Adjacent scenarios: Visible-toolbar baselines are unchanged, so the scope is limited to the two hidden-toolbar transitions.

CI Status

  • Required-check result: Undetermined; gh pr checks --required could not authenticate and returned no check rows.
  • Gate result: Skipped because the PR contains only PNG baselines and diff detection found no tests.
  • Classification: Evidence gap. The existing UI tests are the correct regression scenarios, but this review has no completed run proving both replacement images match a fresh Android capture.
  • Action taken: Confidence capped at low. Gate was not re-run.

Findings

The one permitted MAUI expert pass produced no actionable inline findings; inline-findings.json is a valid empty array. No concrete defect was found in the submitted pixels.

💡 Suggestion — Make asynchronous screenshot settling explicit

Both consuming tests call VerifyScreenshot() without retryTimeout, while #38058 intentionally moves inset work into View.Post. The built-in Android delay and single retry may be sufficient, but using the repository-preferred bounded retryTimeout would better express and tolerate the asynchronous settling behavior. This is test-hardening feedback, not evidence that either replacement baseline is wrong.

Failure-Mode Probing

  • Hidden toolbar still captures the intermediate state: the new expected image would reject the old clipped state; a bounded retry would further reduce timing sensitivity.
  • Visible toolbar is toggled immediately afterward: NavBarVisible.png is unchanged, so the PR does not silently redefine the adjacent visible state.
  • Capture geometry changed: disproved; old and new files are all 1080×1735.
  • Baseline masks unrelated rendering changes: the differences are broad because the content shifts vertically, but visual inspection shows the key semantic change is restoration of the top safe-area position expected from #38058.

External Output Contract

Not applicable.

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: The replacements are visually and causally consistent with #38058, and no blocking code-review finding was identified. Approval is withheld only because the trusted Gate skipped the binary-only diff and required CI status could not be collected; a focused Android run of the two screenshot tests is needed to close that evidence gap.


🛠️ Try-Fix — Analysis & Comparison

PR #38770 Try-Fix Aggregate

Candidate 1 — Baseline-Gated Alternative (gpt-5.3-codex)

Result: Blocked

Approach: Attempt an alternative only after EstablishBrokenBaseline.ps1 establishes a restorable allow-list, rather than repeating the PR's direct Android snapshot replacement.

Mechanism-level difference: The candidate would change behavior only through files explicitly reverted by the baseline script, avoiding an expected-image update. Baseline establishment stopped before such a surface existed.

Files changed / diff: None; candidate diff is empty.

Verification: The baseline command failed with DIRTY WORKING DIRECTORY - Cannot establish baseline. The required focused Android UI-test filter was not run because proceeding without baseline state would violate the try-fix restoration boundary.

Failure analysis: Pre-existing unrelated worktree modifications caused the baseline precondition to fail. In addition, this snapshot-only PR changes paths excluded by the baseline detector (*snapshots*, *.png), so no eligible production fix is expected. Inline expert self-review recorded 0 findings. The exact restore command ran and reported Restored False because no baseline state had been created.

Full narrative: ../try-fix-1/content.md

Candidate 2 — Test-Side Screenshot Stabilization (gpt-5.6-sol)

Result: Blocked

Approach: Wait for Android navigation-bar/native AppBarLayout collapse layout and deferred inset propagation to settle before ToggleHasNavigationBar_HidesBar_Visual and ShellPages_NavBarVisibilityHide capture screenshots.

Prior approaches avoided: Unlike the PR, this candidate would change capture timing instead of accepting new pixels through PNG replacement. Unlike Candidate 1's generic baseline-gated hypothesis, it identifies a specific frame-sampling race and does not reopen or rerun Candidate 1.

Mechanism-level difference: The PR changes what frame is expected. Candidate 2 would causally order screenshot capture after collapse layout and deferred inset dispatch reach final geometry, preventing an intermediate frame from being sampled.

Files changed / diff: None; candidate diff is empty.

Verification: The baseline command again stopped on the preserved pre-existing dirty worktree before creating .github/.baseline-state.json or a RevertedFiles allow-list. The focused Android UI-test command was therefore not run; no full suite, gate, correction, or retest ran.

Failure analysis: This hypothesis was not disproved; it could not be implemented within the mandatory safety boundary. Editing test source without an allow-list would be unrestorable, while editing the excluded PNGs would repeat the PR. Inline expert self-review recorded 0 findings. The exact restore command ran and correctly reported Restored False because no baseline state existed.

Full narrative: ../try-fix-2/content.md

Aggregate Outcome

Two candidates were attempted in the required order and no further candidates were launched. Both are Blocked, with no tracked candidate changes and no empirical pass/fail result. The common blocker is the mandatory baseline script rejecting the pre-existing dirty worktree before it can evaluate this snapshot-only PR; the PR's only changed paths are also excluded by the baseline detector.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winner: pr-plus-reviewer

pr-plus-reviewer best preserves the submitted fix while making the two affected visual assertions resilient to the asynchronous layout settling introduced by #38058. The PR's replacement images are visually credible: the old baselines clip top content, the new 1080×1735 images restore the expected safe-area offset, and the expert review found no concrete defect. However, the submitted PR does not contain the bounded retry hardening, so selecting this candidate requires changes to PR HEAD.

Comparative Ranking

Rank Candidate Change Validation Assessment
1 pr-plus-reviewer Keeps both submitted PNGs and adds a 2-second retryTimeout to the two hidden-toolbar screenshot assertions Build/deploy passed; both tests failed in unchanged WaitForElement setup before reaching the modified assertions Best mechanism and narrowest hardening; result remains unverified rather than disproved
2 pr Replaces NavBarHidden.png and ShellPages_NavBarVisibilityHide.png with settled-layout captures Gate skipped; no focused test result Pixels and #38058's root cause align, but asynchronous capture stability is implicit and merge evidence is absent
3 try-fix-2 Proposed waiting for AppBar collapse/inset propagation before capture Blocked before edits; no diff and no tests Sound concept, but pr-plus-reviewer is its concrete implementation
4 try-fix-1 Generic baseline-gated alternative Blocked before edits; no diff and no tests No implementation or mechanism beyond the safety boundary

No candidate produced a passing regression run, so there is no passed candidate that a failed candidate could outrank. pr-plus-reviewer's two failures occurred before either changed line and therefore provide no candidate-specific regression signal; they are still recorded as failed validation and cap confidence.

Expert Review

  • inline-findings.json contains []; the single permitted MAUI expert pass found no actionable line-addressable issue in the binary-only submitted diff.
  • Old and new captures have identical dimensions.
  • The visible-toolbar adjacent baseline remains unchanged.
  • The new images match #38058's intended post-collapse safe-area geometry instead of the visibly clipped intermediate state.

Required Change

Apply pr-plus-reviewer/reviewer.patch, which adds the repository-preferred bounded retryTimeout to:

  • ToggleHasNavigationBar_HidesBar_Visual for NavBarHidden
  • ShellPages_NavBarVisibilityHide

Do not add arbitrary sleeps or tolerance. The next CI run should confirm that both tests reach and pass their screenshot assertions; this review does not claim they passed locally.

Confidence

Low. The design comparison favors pr-plus-reviewer, but Gate skipped the raw PR and the one focused candidate run failed during page setup before exercising either the PNGs or reviewer changes.


📱 UI Tests — Button,Label,Layout

Detected UI test categories: Button,Label,Layout

✅ Deep UI tests — 422 passed, 0 failed, 7 skipped across 3 categories on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Button 104/106 (2 skipped) ✓ —
Label 123/125 (2 skipped) ✓ —
Layout 195/198 (3 skipped) ✓ —
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

🧭 Next Steps — reviewer changes required

The reviewer-enhanced candidate identified changes that are not yet in the submitted PR.

Why: The PR's two Android baselines match the settled safe-area geometry from #38058, and pr-plus-reviewer strengthens the affected assertions with bounded retries for that asynchronous layout. Its only validation run failed in unchanged setup waits before reaching either modified assertion, so the improvement is preferred with low confidence rather than claimed as passing.

Address the actionable findings in this review before merging.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Sep 22, 2026
@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@praveenkumarkarunanithi — test-failure analysis for commit a0fce3d.

Scope CI failures Commit a0fce3d


🧪 CI Analysis — click to expand
📊 maui-pr

No failures found.


🧪 maui-pr-devicetests

No results available.


🧪 maui-pr-uitests

No results available.


🧭 Follow-up — actions and refresh

Next action: Comment /azp run maui-pr-devicetests and /azp run maui-pr-uitests to collect current results.

Maintainers: comment /review tests to refresh this report.

@kubaflo
kubaflo merged commit 9d821e2 into dotnet:net11.0 Sep 22, 2026
44 checks passed
@github-actions github-actions Bot added this to the .NET 11.0-rc2 milestone Sep 22, 2026
@sheiksyedm sheiksyedm added the community ✨ Community Contribution label Oct 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — a0fce3d8 Deployed Sep 22, 2026 by praveenkumarkarunanithi via conclusion #2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-navigationpage area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) test-failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants