Repository navigation
[maui-bot-fix] Fix for #36933 - [iOS/MacCatalyst] DatePicker and TimePicker Background is not cleared when set to null… - #451
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 735ac9a2-7bec-4baa-ad19-c298e5bc795a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 735ac9a2-7bec-4baa-ad19-c298e5bc795a
Adversarial validation summary - NEEDS CHANGESI reviewed exact head Causal gate
The same committed test and runtime harness were used in both arms; only the submitted product change was reverted. The narrow solid-color fix is therefore genuine. Test and oracle problems
These results do not support the PR's Blocking runtime findings
Recommendations
Live evidenceThe recording uses live native DatePicker and TimePicker controls with the same harness in both arms. Exact head shows solid PASS, gradient PASS, ImageBrush FAIL; the product-only revert shows solid FAIL, gradient PASS, ImageBrush FAIL. Each probe visibly holds its applied background before clearing and then reports the measured native color and layer state. The separate iOS CoreSimulator run independently confirms the ImageBrush transparent-versus- pr451-adversarial-runtime-evidence-v2.mp4Verdict: request changes and prefer the already-merged handler-scoped fix. The submitted patch proves a narrow solid-color repair, but its tests overstate coverage, ImageBrush remains unfixed on both claimed Apple platforms, and the global restoration mechanism is unnecessarily broad. |
GPT adversarial reviewIndependent GPT-5 mini review, GPT-5.4 mini challenge, and GPT-5.3 Codex adjudication when the models materially disagreed. This is a comment-only review, not an approval. Rating: 4/10 · Verdict: Rating4 / 10 Empirical test evidenceRECORDED_VERIFIED four-arm device evidence was independently audited but not locally rerun. The committed test passes for the narrow solid-color/null case on iOS Simulator. Findings
Suggestions
CI coverage: The fork's failing |
| public OriginalBackgroundColor(UIColor? color) => Color = color; | ||
|
|
||
| public UIColor? Color { get; } | ||
| } |
There was a problem hiding this comment.
This records/restores UIView background state globally for any view using UpdateBackground. That broadens the behavior change well beyond DatePicker/TimePicker and can affect unrelated controls with different background lifecycles. Please either scope this to the picker handlers or document/cover the wider contract.
| } | ||
| } | ||
|
|
||
| // Holds the BackgroundColor a platform view had before MAUI first painted over it, so the |
There was a problem hiding this comment.
❌ Image background clearing is not symmetrically restored
The image background path clears the native background but does not show a matching restore of the captured original color when the image source is removed. That leaves a transparent/stale view state risk for ImageBrush/ImageSource transitions to null.
Important
This is AI-generated reproduction evidence with a proposed fix. The first commit adds a test that fails on the unfixed baseline; the second changes product code so it passes. Both the test and the fix need human review before merge.
Evidence level
Evidence level:
certified-oracleAll four arms agree: the test fails as reported, passes with the reported trigger removed, passes with a minimal product fix applied, and fails again once that fix is taken away. Its failure is caused by the defect the fix repairs.
Reproduced issue
604d9de36e05a40c36ab05cdcd68f2c6286fa260— the trusted device reproduction and the failing-test verification both ran against this commitMicrosoft.Maui.DeviceTests.Issue36933.ClearingBackgroundRestoresPlatformDefaultIssue36933— an issue-keyed class token; use the exact test above when a runner needs a precise selectorTestFilter=Category=Issue36933— the stock device-test runner filters by category only, so use this form on device; the class token above selects nothing therenative background remained orange after Background was clearedRecorded evidence (iOS Simulator)
Open the full MP4 recording · Evidence manifest
The authoritative proof is the trusted targeted test failing with the expected assertion above. The recording corroborates that; for defects with no visible symptom it may show only the app-reported verdict rather than the defect itself.
This recording is of the trusted Sandbox reproduction app that established the behavior on the iOS Simulator, not of the committed test executing. Its on-screen text therefore comes from that Sandbox app and will not match the assertion payload emitted by the committed test. Treat it as corroboration of the symptom, not as exact-head evidence for the commit in this pull request.
Reproduction steps
Safety and validation
Proposed fix
This pull request carries two commits. The first adds the failing reproduction on its own, so its parent can be checked out and the test watched to fail. The second changes product code so the same test passes.
Regression cross-reference. No line this fix deletes was added by a recent bug-fix pull request.
Files changed by the fix commit:
src/Core/src/Platform/iOS/ViewExtensions.cs