Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Jan 3, 2026

No description provided.

@augmentcode
Copy link

augmentcode bot commented Jan 3, 2026

🤖 Augment PR Summary

Summary: This PR introduces initial async rendering support by allowing parts of the view graph update + display list rendering pipeline to run off the main thread when it is safe to do so.

Changes:

  • Refactors the async render thread startup loop in DisplayLink to wait for the async runloop to become available.
  • Adds a SwiftUI symbol-locator stub for DisplayList.ViewRenderer.renderAsync and routes async rendering through it when available.
  • Implements allowsAsyncUpdate() checks for Attribute/WeakAttribute to gate async updates.
  • Implements ViewGraph.updateOutputsAsync and refactors output updating to support async mode with feature gating.
  • Adds per-feature state (needsUpdate, skipsAsyncUpdate) stored in the heterogeneous buffer element flags.
  • Makes UnsafeHeterogeneousBuffer storage fields private and adjusts iteration/append behavior; tests are updated to avoid relying on private fields by default.

Technical Notes: Async update is conservatively disabled when attributes/preferences/layout observers/features indicate main-thread requirements; when async is permitted, main-thread callbacks are still dispatched via Update.syncMain.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

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

@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

❌ Patch coverage is 7.76699% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.29%. Comparing base (4e2a39c) to head (3db2e6e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift 0.00% 54 Missing ⚠️
.../OpenSwiftUICore/View/Graph/ViewGraphFeature.swift 0.00% 20 Missing ⚠️
.../OpenSwiftUICore/View/Graph/ViewRendererHost.swift 0.00% 9 Missing ⚠️
Sources/OpenSwiftUICore/Graph/GraphHost.swift 0.00% 6 Missing ⚠️
...OpenSwiftUICore/Util/AttributeGraphAdditions.swift 0.00% 3 Missing ⚠️
...UICore/View/Graph/ViewGraphGeometryObservers.swift 0.00% 2 Missing ⚠️
...e/Render/DisplayList/DisplayListViewRenderer.swift 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4e2a39c) and HEAD (3db2e6e). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (4e2a39c) HEAD (3db2e6e)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #700       +/-   ##
===========================================
- Coverage   28.86%   14.29%   -14.57%     
===========================================
  Files         589      563       -26     
  Lines       35804    33190     -2614     
===========================================
- Hits        10335     4746     -5589     
- Misses      25469    28444     +2975     

☔ View full report in Codecov by Sentry.
📢 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 15e20e7 into main Jan 3, 2026
6 of 11 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/async_render branch January 3, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants