Skip to content

Fix UIHostingView environment resolution#920

Merged
Kyle-Ye merged 1 commit into
mainfrom
bugfix/env
Jun 22, 2026
Merged

Fix UIHostingView environment resolution#920
Kyle-Ye merged 1 commit into
mainfrom
bugfix/env

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Return the resolved and platform-configured environment from UIHostingViewBase.startUpdateEnvironment()
  • Add a regression test covering trait collection resolution when an inherited environment is present

@github-actions github-actions Bot added area: data-flow State, binding, environment, preference, observation, or property data flow. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: iOS iOS-specific behavior or support. type: bug Something is not working correctly. labels Jun 22, 2026
@augmentcode

augmentcode Bot commented Jun 22, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Fixes UIHostingViewBase.startUpdateEnvironment() to return the trait-resolved, platform-configured EnvironmentValues instead of the pre-resolution base.
Changes: Adds a regression test asserting trait-collection-derived values (layout direction, display scale) override an inherited environment during environment updates.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.93%. Comparing base (64924bc) to head (46e9874).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
- Coverage   25.94%   25.93%   -0.01%     
==========================================
  Files         720      720              
  Lines       50774    50774              
==========================================
- Hits        13172    13169       -3     
- Misses      37602    37605       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 95e957c into main Jun 22, 2026
6 of 9 checks passed
@Kyle-Ye Kyle-Ye deleted the bugfix/env branch June 22, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: data-flow State, binding, environment, preference, observation, or property data flow. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: iOS iOS-specific behavior or support. type: bug Something is not working correctly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant