Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Dec 28, 2025

No description provided.

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 16.87500% with 266 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.46%. Comparing base (7289cc0) to head (0219839).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenSwiftUICore/Shape/Path.swift 14.75% 208 Missing ⚠️
Sources/OpenSwiftUICore/Shape/PathData.swift 0.00% 37 Missing ⚠️
...ces/OpenSwiftUICore/Shape/RoundedCornerStyle.swift 46.15% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #680       +/-   ##
===========================================
+ Coverage   13.82%   28.46%   +14.63%     
===========================================
  Files         559      585       +26     
  Lines       32559    35480     +2921     
===========================================
+ Hits         4502    10099     +5597     
+ Misses      28057    25381     -2676     

☔ 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.

@augmentcode
Copy link

augmentcode bot commented Dec 28, 2025

🤖 Augment PR Summary

Summary: This PR integrates ORBPath/RenderBox-backed path handling into OpenSwiftUI’s core Path and rounded-rect utilities.

Changes:

  • Updates SwiftPM pins for DarwinPrivateFrameworks/OpenCoreGraphics/OpenRenderBox to revisions that support the new path work.
  • Renames the RenderBox feature flag plumbing (env var RENDERBOX) and switches build defines to OPENSWIFTUI_RENDERBOX.
  • Adds a new CF_CGTYPES switch to control whether CFCGTypes-based CoreGraphics types are used (notably to avoid Linux conflicts).
  • Reworks Path storage to support ORBPath-backed data and a buffer/serialization path for ORBPath storage.
  • Introduces Swift PathData (union-like) for non-CF_CGTYPES builds and updates the C union definition for CF_CGTYPES builds.
  • Renames/finishes RoundedCornerStyle and adds ORBPath-based temporary-path support for rounded-rect containment on Darwin.
  • Extends the CoreGraphics overlay API: _CGPathCreateRoundedRect now takes a corner style enum and uses ORBPath/RBPath for continuous corners when enabled.
  • Reorders Darwin CI setup steps and expands unit tests for FixedRoundedRect and rounded-rect path creation.

Technical Notes: The implementation relies on unsafe buffer layout compatibility between Swift/C unions and ORBPath storage callbacks, and gates behavior by platform and CF_CGTYPES configuration.

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

Fix All in Augment

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

kind = .cgPath
//data = PathData(path)
_openSwiftUIUnimplementedFailure()
data = PathData(cgPath: .passUnretained(path))
Copy link

Choose a reason for hiding this comment

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

PathBox stores the CGPath using .passUnretained, but prepareBuffer() later calls data.cgPath.takeRetainedValue(), which assumes +1 ownership; this mismatch can cause over-release or use-after-free crashes.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

let storage = withUnsafeMutablePointer(to: &box.data) {
unsafeBitCast($0, to: ORBPath.Storage.self)
}
return storage.isEmpty
Copy link

Choose a reason for hiding this comment

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

In bufferCallbacks.isSingleElement, the closure returns storage.isEmpty, which looks like a logic bug and will misreport whether the path has a single element.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@Kyle-Ye Kyle-Ye merged commit 732d7ad into main Dec 28, 2025
11 of 12 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/path branch December 28, 2025 10:21
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