Skip to content

Add initial OpenSwiftUI render support#858

Merged
Kyle-Ye merged 58 commits into
mainfrom
feature/view_render
May 13, 2026
Merged

Add initial OpenSwiftUI render support#858
Kyle-Ye merged 58 commits into
mainfrom
feature/view_render

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Collaborator

@Kyle-Ye Kyle-Ye commented May 13, 2026

No description provided.

@Kyle-Ye Kyle-Ye requested a review from Mx-Iris as a code owner May 13, 2026 19:39
@Kyle-Ye Kyle-Ye enabled auto-merge (squash) May 13, 2026 19:39
@Kyle-Ye Kyle-Ye disabled auto-merge May 13, 2026 19:39
@Kyle-Ye Kyle-Ye merged commit a6adab4 into main May 13, 2026
4 of 8 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/view_render branch May 13, 2026 19:40
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 13, 2026

🤖 Augment PR Summary

Summary: This PR adds an initial, platform-backed rendering path for OpenSwiftUI based on DisplayList view updating, including early async-layer support.

Changes:

  • Updates the example app to run a new AsyncRenderExample to exercise transitions/animations
  • Adds DisplayList feature tracking (e.g. views/animations/dynamic content) and additional transform helpers
  • Introduces an async layer abstraction (DisplayListAsyncLayer) and expands the view cache to support async updates
  • Adds a large DisplayList.ViewUpdater overhaul with container management, subtree skipping, and async render flow
  • Builds out platform view utilities (subviews/add/remove/frame/geometry/shadow/clip/mask) and a missing-platform-view fallback
  • Adds a new MaskLayer implementation for non-rect clip masks
  • Implements Path.isEmpty and Path.boundingRect for several storage variants
  • Refines ResolvedStyledText dynamic detection/scheduling wiring
  • Adjusts imports/guards for render-only dependencies and adds QuartzCore private shims needed by the renderer
  • Adds unit tests for DisplayList.Item.matchesTopLevelStructure

Technical Notes: The renderer relies on QuartzCore/CoreView shims on Darwin and introduces several “WIP/Unimplemented” stubs intended to be completed in follow-up PRs.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@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. 2 suggestions posted.

Fix All in Augment

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

guard let storage, storage.isDynamic else {
return nil
}
return storage.updateSchedule
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 13, 2026

Choose a reason for hiding this comment

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

Sources/OpenSwiftUICore/View/Text/Text/Text+View.swift:515: ResolvedStyledText.schedule now calls storage.updateSchedule, but NSAttributedString.updateSchedule is currently _openSwiftUIUnimplementedFailure() (also in Sources/OpenSwiftUICore/View/Text/Util/String+Extension.swift:51), so dynamic text can crash at runtime when storage.isDynamic is true.

Severity: high

Other Locations
  • Sources/OpenSwiftUICore/View/Text/Util/String+Extension.swift:51

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

return AsyncResult(
view: info.view,
key: key,
changed: oldItem.version != newItem.version,
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 13, 2026

Choose a reason for hiding this comment

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

Sources/OpenSwiftUICore/Render/DisplayList/DisplayListViewCache.swift:395: AsyncResult.changed is based only on oldItem.version != newItem.version, which can cause async rendering to skip descending into children even when info.nextUpdate/layer.nextUpdate indicates time-based updates are due.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 1.78658% with 2034 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.16%. Comparing base (0c73297) to head (18541a3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/Render/DisplayList/DisplayListViewPlatform.swift 0.00% 742 Missing ⚠️
...Core/Render/DisplayList/DisplayListViewModel.swift 0.00% 506 Missing ⚠️
...re/Render/DisplayList/DisplayListViewUpdater.swift 0.00% 477 Missing ⚠️
Sources/OpenSwiftUICore/Shape/MaskLayer.swift 0.00% 77 Missing ⚠️
...enSwiftUICore/Render/DisplayList/DisplayList.swift 39.36% 57 Missing ⚠️
Sources/OpenSwiftUICore/Shape/ShapeLayer.swift 0.00% 50 Missing ⚠️
...Core/Render/DisplayList/DisplayListViewCache.swift 0.00% 44 Missing ⚠️
Sources/OpenSwiftUICore/Shape/Path.swift 0.00% 39 Missing ⚠️
...ore/Render/DisplayList/DisplayListAsyncLayer.swift 0.00% 13 Missing ⚠️
...urces/OpenSwiftUICore/Graphic/GraphicsFilter.swift 0.00% 8 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #858      +/-   ##
==========================================
- Coverage   27.20%   26.16%   -1.05%     
==========================================
  Files         673      677       +4     
  Lines       44165    46059    +1894     
==========================================
+ Hits        12017    12053      +36     
- Misses      32148    34006    +1858     

☔ 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 linked an issue May 14, 2026 that may be closed by this pull request
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.

Add OpenSwiftUI renderer

1 participant